topo2geo
CLI for converting TopoJSON files to GeoJSON
Installation
pip install topo2geo
Usage
[~]$ topo2geo input.topojson output.geojson
Multilayered Topojsons
If the topojson contains mulitple layers (i.e. there are multiple values in the "objects" key). Then seperate geojson files will be output with the layer name.
For example a topojson containing states and counties:
{
"type": "Topology",
"objects": {
"county": {
"type": "GeometryCollection",
"geometries": [...]
},
"state": {
"type": "GeometryCollection",
"geometries": [...]
}
}
}
would produce two geojson files, output_geo_county.json and output_geo_state.json
Troubleshooting
If you experience a "segmentation fault" one thing to try is explained here:
pip install shapely --no-binary shapely
Credits
Originally written by sgillies and perrygeo. Converted to Python3 and packaged into a CLI by kylepollina.
Sources:
- https://gist.github.com/perrygeo/1e767e42e8bc54ad7262
- https://github.com/sgillies/topojson/blob/master/topojson.py
License - https://github.com/topojson/topojson/blob/master/LICENSE.md
Metadata
Release files for topo2geo 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| topo2geo-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for topo2geo-0.4.4-py3-none-any.whl |
Release files / topo2geo-0.4.4-py3-none-any.whl
| Download URL | topo2geo-0.4.4-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df1067bc7c76c498a29e458a3ca9bb521c78ea3383e4a594c7b4b97bc1f56153
|
|
BLAKE2b-256 checksum How to use checksums |
f8327f509e8a778c19c11d6f689e24ceb98679cf414035aa98840d50d8a45aed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Security for topo2geo 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.