oemof / DHNx

District heating system optimisation and simulation models
MIT License
27 stars 12 forks source link

import osmnx example not working #130

Closed ltrentmann closed 1 year ago

ltrentmann commented 1 year ago

Running the import osmnx example I get the following error: Seems like there is a problem with the data format, korrekt? pyproj/_transformer.py expects that x, y, z, and time are the same size - which they are obviously not! Where ist the problem? As input from the osmnx file there are just long. lat. postion of the coordiantes.

INFO:root:Cartopy is not installed. Background maps will not be drawn. Downloading street network... Traceback (most recent call last): File "j:/Trentmann/04_Modelle/DHNx-dev/DHNx-dev/examples/import_osmnx/import_osmnx.py", line 15, in io.load() File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\dhnx\input_output.py", line 401, in load graph = self.download_street_network() File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\dhnx\input_output.py", line 196, in download_street_network graph = ox.graph_from_point( File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\osmnx\graph.py", line 168, in graph_from_point G = graph_from_bbox( File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\osmnx\graph.py", line 89, in graph_from_bbox G = graph_from_polygon( File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\osmnx\graph.py", line 441, in graph_from_polygon poly_proj, crs_utm = projection.project_geometry(polygon) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\osmnx\projection.py", line 60, in project_geometry gdf_proj = project_gdf(gdf, to_crs=to_crs, to_latlong=to_latlong) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\osmnx\projection.py", line 116, in project_gdf gdf_proj = gdf.to_crs(utm_crs) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\geopandas\geodataframe.py", line 1364, in to_crs geom = df.geometry.to_crs(crs=crs, epsg=epsg) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\geopandas\geoseries.py", line 1124, in to_crs self.values.to_crs(crs=crs, epsg=epsg), index=self.index, name=self.name File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\geopandas\array.py", line 779, in to_crs new_data = vectorized.transform(self.data, transformer.transform) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\geopandas_vectorized.py", line 1114, in transform new_coords_z = func(coords_z[:, 0], coords_z[:, 1], coords_z[:, 2]) File "C:\Users\ga87ces.conda\envs\DHNx-dev\lib\site-packages\pyproj\transformer.py", line 430, in transform self._transformer._transform( File "pyproj/_transformer.pyx", line 459, in pyproj._transformer._Transformer._transform pyproj.exceptions.ProjError: x, y, z, and time must be same size