Skip to main content

Encoder/decoder for simple GIS features

Project description

This package contains:

Geojson provides geometry, feature, and collection classes, and supports pickle-style dump and load of objects that provide the lab’s Python geo interface. Here’s an example of a round-trip through the GeoJSON format:

>>> import geojson
>>> p = geojson.Point([0.0, 0.0])
>>> p
Point(coordinates=[0.0, 0.0])
>>> data = geojson.dumps(p)
>>> data
'{"type": "Point", "coordinates": [0.0, 0.0]}'
>>> q = geojson.loads(data, object_hook=geojson.GeoJSON.to_instance)
>>> q
Point(coordinates=[0.0, 0.0])

The geometry classes interoperate with Shapely via the geo interface:

>>> from shapely.geometry import asShape
>>> x = asShape(p)
>>> x.wkt
'POINT (0.0000000000000000 0.0000000000000000)'

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

geojson-1.0.tar.gz (11.7 kB view details)

Uploaded Source

File details

Details for the file geojson-1.0.tar.gz.

File metadata

  • Download URL: geojson-1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for geojson-1.0.tar.gz
Algorithm Hash digest
SHA256 a4712a360b668f8e6f8d6beac022063f809dbc3d16788489ab415ab457d77fb3
MD5 2d36a78208ac6e85e3b6abace6fcceb0
BLAKE2b-256 7b25db1e5dc12ebfd5283f6f7669553c0156f2e81c17bebd6326fac10e4a1f81

See more details on using hashes here.

Supported by

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