TopoJSON to CSV Converter
Pull the attribute table out of a topology for use in a non-spatial tool — Excel, Google Sheets, pandas — typically for tabular analysis or reporting.
Common issues converting TopoJSON to CSV
- Polygon and LineString features can't fit in a single CSV row of lat/lng — for non-Point geometries the converter emits the centroid as the lat/lng pair. Set this expectation with stakeholders.
- Feature properties become CSV columns. Union of all keys across all features is taken; rows missing a key emit an empty cell.
- Multiple objects in the topology are concatenated into a single CSV with all features. Add a `_object` column post-conversion if you need to distinguish them.
- Numeric properties round-trip cleanly; nested object properties (rare in TopoJSON) are JSON-stringified into the cell.
Frequently asked questions
What's in the lat/lng columns for a Polygon?
The centroid of the polygon. For MultiPolygon, the centroid of the largest member. This is approximate — use it for marker placement on a map, not for boundary analysis.
Are feature ids preserved?
Yes — output has an `_id` column (prefixed to avoid collision with user properties) when the source has feature ids.
How are mixed-type topologies handled?
All features become rows. Point features get exact lat/lng; line/polygon features get centroid lat/lng. The geometry type is captured in a `_type` column.
Can I round-trip CSV → TopoJSON → CSV?
For Point data, yes — losslessly (modulo float-formatting). For line/polygon data, no — the centroid step is one-way.