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.

Files for topojson, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size topojson-1.2-py2.py3-none-any.whl (78.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size topojson-1.2.tar.gz (23.9 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page