Skip to main content

topojson - a powerful library to encode geographic data as topology in Python!🌍

Project description

topojson

PyPI version License build status

Encode geographic data as topology in Python!

Topojson is a library that is capable of creating a topojson encoded format of merely any geographical object in Python.

With topojson it is possible to reduce the size of your geographical data. Mostly by orders of magnitude. It is able to do so through:

  • Eliminating redundancy through computation of a topology
  • Fixed-precision integer encoding of coordinates and
  • Simplification and quantization of arcs

Usage

The package can be used in multiple different ways, with the main purpose to create a TopoJSON topology.

See the Python Topojson Documentation Site for all info or this Notebook with some examples, such as the following:

simplifying with and without topology

Top row (right) presents linestring simplification on a computed Topology and (left) on the geographical object directly. Bottom row presents visual impact on file size reduction between (left) Raw GeoJSON and (right) Topological optimized TopoJSON.

Installation

Installation can be done by:

python3 -m pip install topojson

This package topojson has the following hard dependencies:

  • numpy
  • shapely

Further, optional soft dependencies are:

  • altair (enlarge the experience by visualizing your TopoJSON output)
  • simplification (more and quicker simplification options)
  • geojson (parse string input with GeoJSON data)
  • geopandas (with fiona version >=1.8.6!, parse your TopoJSON output directly into a GeoDataFrame)
  • ipywidgets + (lab)extension (make your life complete with the interactive experience)

Get in touch

For now, just use the Github issues. That can be:

  • usage questions
  • bug reports
  • feature suggestions
  • or anything related

Finally, see the Python Topojson Documentation Site for more info.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topojson-1.3.tar.gz (24.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topojson-1.3-py2.py3-none-any.whl (78.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file topojson-1.3.tar.gz.

File metadata

  • Download URL: topojson-1.3.tar.gz
  • Upload date:
  • Size: 24.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for topojson-1.3.tar.gz
Algorithm Hash digest
SHA256 4b14089347f4aa717dc31ddbf04270d26b884c29afca1fb7f96d53b400bae4a3
MD5 91aa63b386bdc0f8044952e783d7e711
BLAKE2b-256 7d722f2f9c86aef1167bf2271005c4c99530c81e01d56e55262b11955633dfa8

See more details on using hashes here.

File details

Details for the file topojson-1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: topojson-1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for topojson-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d204b704a12586a4961c06a69cbdd7872fc20ce62be53a0f6815517fb99b3480
MD5 0afb7eaee094a4ff5696bf94c5f9813e
BLAKE2b-256 94ce1b4b2d865245bce5ab76af35f7da3f8816aaf6d45b047d1bf0aadadbb31b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page