python模块将geojson转换为deck.gl的linelayer使用的“from to”格式
geojson2fromto的Python项目详细描述
Python module that converts LineStrings and MultiLineStrings of a GeoJSON FeatureCollection to DECK.GL’s LineLayer ‘from-to’
要求
- Python3-3.6。python 3.7不能工作,因为pyproj’s lack of support for Python 3.7是 geopandas的依赖性 它有it’s own related issue这个
安装
$ pip install geojson2fromto
用法
$ geojson2fromto data.geojson [from-to-data.json]
注意:对deck.gl的linelayer coordinateSystemprop的linelayer必须设置为 COORDINATE_SYSTEM.LNGLAT_EXPERIMENTAL
dev安装
$ git@github.com:weaselandfox/geojson2fromto.git $ cd geojson2fromto $ pipenv install
dev用法
$ pipenv shell $ python ./geojson2fromto input.geojson [output.json]
测试
确保已激活virtualenv(运行$ pipenv shell)
$ pytest
许可证
麻省理工学院Weasel & Fox