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.
Usage
fio_taxa has one function: fio_taxa.classify().
>>> import json
>>> from fio_taxa import classify
>>> src = open('tests/data/trio.geojson')
>>> collection = json.loads(src.read())
>>> 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fio_taxa-1.0.0.tar.gz
(2.7 kB
view details)
Built Distributions
File details
Details for the file fio_taxa-1.0.0.tar.gz
.
File metadata
- Download URL: fio_taxa-1.0.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd3b565075c3ce07d24707f360e6ed2e66fd92b71f5900ffab3a025b83911563 |
|
MD5 | 9a23f7ca0c1c5c9f2078926889a53875 |
|
BLAKE2b-256 | 674067fa6735b46652436c15d5410388dbaa3d498c796ec3b0a0eaa69758d030 |
Provenance
File details
Details for the file fio_taxa-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: fio_taxa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0b3ce18de35c603aa91d5f62c1bf763cc0f53b362bd41d3264ac58eae5c3232 |
|
MD5 | b1cdfbcc31d000b6da60b39849e2162a |
|
BLAKE2b-256 | 2a3fb7ae9445eb1f35fb85dd6df2522b8dd6cd70243d1256ecb63fe154a76aa8 |
Provenance
File details
Details for the file fio_taxa-1.0.0-py2-none-any.whl
.
File metadata
- Download URL: fio_taxa-1.0.0-py2-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126b9a3881fd82ae9455330eda81397942734dc8c93c68cae5a6db2f5a0a52bf |
|
MD5 | a3ccd73027ec60ba8ca39d4ae15bd1da |
|
BLAKE2b-256 | 102a9ddb817b0f5f2077f7195676aaa391588b002b44e4dded35441d78226d1c |