Python module that converts LineStrings and MultiLineStrings of a GeoJSON FeatureCollection to DECK.GL’s LineLayer ‘from-to’
- Python 3 - 3.6. Python 3.7 doesn’t work due to pyproj’s lack of support for Python 3.7 which is a dependency of geopandas which has it’s own related issue to this
$ pip install geojson2fromto
$ geojson2fromto data.geojson [from-to-data.json]
Note: To use the resulting JSON with Deck.GL’s LineLayer the
coordinateSystem
prop of the LineLayer has to be set to
COORDINATE_SYSTEM.LNGLAT_EXPERIMENTAL
$ [email protected]:weaselandfox/geojson2fromto.git $ cd geojson2fromto $ pipenv install
$ pipenv shell $ python ./geojson2fromto input.geojson [output.json]
Make sure you have activated a virtualenv (run $ pipenv shell
)
$ pytest
MIT © Weasel & Fox