support i/o to topojson format
See original GitHub issueTopojson is pretty handy for data visualisation when working with adjacent polygons (think- counties in the state/country). While there is a separate topojson package (https://github.com/calvinmetcalf/topojson.py), I am pretty sure geopandas will benefit from direct I/o functionality. I will be happy to PR, but will be thankful for the suggestions first.
- do you feel fine with adding
topojsonmodule as an optional dependency?? - what will be the best way to use topojson?
2.1
with open('file.json', 'w') as f:
df.to_json(f, topo=True)
2.2
with open('file.json', 'w') as f:
df.to_topojson(f)
as for reading, it seems reasonable to try parse topojson if geojson parsing fails?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (8 by maintainers)
Top Results From Across the Web
support TopoJSON as export format · Issue #199 · koopjs/koop
The TopoJSON output is now supported by koop-output-geojson. All reactions.
Read more >Converting Shapefiles to TopoJSON - Looker Community
This article demonstrates how to convert a shapefile to TopoJSON using a free online tool called Mapshaper 5. For a drawing tool that...
Read more >TopoJSON / Formats / Placemark
Have feedback or a question that isn't answered here? Contact us by email. ... The modern way to collaborate on, manage, and edit...
Read more >ArcGIS GeoService API could deliver TopoJSON format
Specifically, I want to deliver confidential data with special handling requirements (e.g. HIPAA) from my ArcGIS Enterprise deployment directly ...
Read more >geojsonio: Convert Data from and to 'GeoJSON' or 'TopoJSON'
input-output ... Convert spatial data files to GeoJSON from various formats. Description ... service, and "local" means we use sf.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Documentation about supported formats is indeed sparse. PR to improve that certainly welcome!
Normally I would say: the support depends on fiona, but even in the
fiona.supported_driversI don’t see topojson being mentioned (although that might be because until recently gdal support was under the geojson driver:http://www.gdal.org/drv_topojson.html).If fiona supports reading, it might also support it for writing.
just realized topojson is supported for reading (
read_file), while I found no documentation on that.