geojson 1.0
Encoder/decoder for simple GIS features
Latest Version: 1.0.1
This package contains:
The reference implementation of the Python geo interface:
Functions for encoding and decoding GeoJSON (http://geojson.org) formatted data.
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)'
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| geojson-1.0.tar.gz (md5) | Source | 2008-08-02 03:39:36 | 11KB | 1534 | |
- Author: Sean Gillies <sgillies at frii com>
- Home Page: http://trac.gispython.org/lab/wiki/GeoJSON
- Keywords: gis geography json
- License: BSD
- Categories
- Package Index Owner: seang
- DOAP record: geojson-1.0.xml
Log in to rate this package.
