Creating a graph structure from GIS data in Python

I want to implement the direction of travel in Python using something like Djikstra's shortest path. The algorithm requires the presentation of data in the structure of the graph. However, the source GIS data (for example, form files or OpenStreetMap data , however, present their data in different ways. So I was wondering if there is any Python library that can convert GIS data to the chart structure?

In Java, I found that GeoTools has what I described . Is there a similar library in Python?

+3
source share
1 answer

I have not used it yet, but there is a function that generates directed graphs from shapefiles in Networkx: http://networkx.lanl.gov/reference/readwrite.nx_shp.html . If this does not do what you need, it can offer a solution. Uses Python OGR bindings to read data.

See also Graphserver http://bmander.github.com/graphserver/ .

+2
source

Source: https://habr.com/ru/post/1787298/


All Articles