Skip to main content

Classification of GeoJSON features

Project description

fio_taxa classifies GeoJSON features.

Given a sequence of Features, fio_taxa finds and returns the set of unique kinds of Features in the sequence. Uniqueness is determined by geometry type and by the set of names and types of values in a Feature’s ‘properties’ member. Members foreign to the GeoJSON specification are not considered.


fio_taxa has one function: fio_taxa.classify().

>>> import json
>>> from fio_taxa import classify
>>> src = open('tests/data/trio.geojson')
>>> collection = json.loads(
>>> for taxon in classify(collection['features']):
...     print(taxon)
((('aqueduct', 'str'),), 'LineString')
((('architect', 'str'), ('name', 'str')), 'Polygon')
((('name', 'str'),), 'Point')

Command line interface

fio_taxa adds a “taxa” command to Fiona’s “fio” program.

$ cat tests/data/trio.seq | fio taxa
{"geometry": "Polygon", "properties": {"architect": "str", "name": "str"}}
{"geometry": "Point", "properties": {"name": "str"}}
{"geometry": "LineString", "properties": {"aqueduct": "str"}}

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 fio_taxa, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size fio_taxa-1.0.0-py2-none-any.whl (4.7 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size fio_taxa-1.0.0-py3-none-any.whl (4.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fio_taxa-1.0.0.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page