跳转到主要内容

GeoJSON功能分类

项目描述

https://travis-ci.org/sgillies/fio-taxa.svg https://coveralls.io/repos/github/sgillies/fio-taxa/badge.svg?branch=master

fio_taxa对GeoJSON功能进行分类。

给定一系列功能,fio_taxa查找并返回该序列中独特的功能类型集合。独特性由几何类型以及功能“属性”成员中的名称和值类型集合确定。不属于GeoJSON规范的外部成员不予考虑。

用法

fio_taxa有一个函数: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')

命令行界面

fio_taxa向Fiona的“fio”程序添加了一个“taxa”命令。

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

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

fio_taxa-1.0.0.tar.gz (2.7 kB 查看哈希值)

上传时间:

构建分布

fio_taxa-1.0.0-py3-none-any.whl (4.7 kB 查看哈希值)

上传时间: Python 3

fio_taxa-1.0.0-py2-none-any.whl (4.7 kB 查看哈希值)

上传时间: Python 2

由以下组织支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面