TopoJSON to KML Converter
When you've built a D3 choropleth from TopoJSON and need to show the underlying boundaries to a non-developer stakeholder in Google Earth.
Common issues converting TopoJSON to KML
- TopoJSON's arc-sharing is expanded during conversion — the output KML is typically 5–10× larger than the source. Gzip on transit recovers most of that.
- Quantized coordinates are de-quantized using the topology's transform metadata. Sub-quantization precision is lost (typical default: 11m at the equator).
- Multiple objects in the topology become separate <Folder> elements in the KML — each object's features land inside its folder, named after the object's key.
- Feature properties become <ExtendedData> entries on each <Placemark>.
Frequently asked questions
How are multiple topology objects handled?
Each top-level object becomes a <Folder> in the KML, named after the object's key in topology.objects. Features inside that object render as Placemarks within the folder.
Will the output preserve quantization precision?
Quantization is reversed on read — coordinates are de-quantized using the topology's `transform` metadata. The resulting precision depends on the original quantization level.
Can I open it in Google My Maps?
Yes, up to the 5 MB free-tier limit. TopoJSON typically expands 5–10× when written as KML, so check the output size before importing.
Are feature ids preserved?
Yes. The topology feature id becomes the Placemark id attribute.