uesgraphs
uesgraphs copied to clipboard
Import from_shapefile
What is the problem?
- not really a problem, but I'd like to generate UES Graph from Shapefiles (https://de.wikipedia.org/wiki/Shapefile)
Why do we want to solve it?
- currently UESgraph does not import import of shapefiles
- Shapfiles are well known format to exchange geospatial data
How do we want to solve it?
- Probably going to write a similar function as
from_osm
. Any other suggestions? - https://github.com/RWTH-EBC/uesgraphs/blob/master/uesgraphs/uesgraph.py#L1014
Maybe there is already a package on PyPI that reads shapefiles to Python? Then there's the challenge of clearly defining how a shapefile for uesgraphs import should look like, but it would be a great enhancement.
@marcusfuchs yes, of course I already had a look. there are plenty of solutions to that. Probably the most convenient is geopandas (really nice package on the first sight). But as you already mentioned it is not easy to interpret shapefiles as they might only contain geometries an abstract names (as in my case) and not the semantic type of the object. thus, it is not easy to define which polygons are buildings and which have other functions. I'll investigate a little further but not 100 % sure I'm going to implement something like this in uesgraph for now. Geopandas looks so powerful that it could be enough for my use case.