Closed Luz5020 closed 4 months ago
Naming the dwelling using JOSM does fix the "no name!" issue but still causes a crash `Traceback (most recent call last):
File "C:\Users\username\Downloads\OSM-TPF2-Importer-main\python\main.py", line 34, in
File "C:\Users\username\Downloads\OSM-TPF2-Importer-main\python\convert_data.py", line 131, in convert places[tags["place"]].append({ KeyError: 'city_block'`
Actually I'm encountering the "city_block" error on every .osm file. Might be an issue on my end but I haven't figured it out yet. There should be no need to crop because the osm and heightmap are made from identical areas. Could also be an issue that the converter can't handle things tagged "city_block"
Appending "city_block" to the places list (line 37 in convert_data.py) seems to work, now the missing key is "islet". I'm guessing the tool was built with a set of keys and some places on osm have keys not present in the tool.
After adding "islet" and "proposed" the tool seems to be running for a bit but finally crashes when using optimize_edges, the error thrown is: Cannot remove
Edge(10005273149,1468335003) is short (7.266), remove it
Traceback (most recent call last):
File "\python\main.py", line 37, in
File "\python\optimize_edges.py", line 30, in optimize add_curve_tangents(paths_street, g)
File "\python\optimize_edges.py", line 172, in add_curve_tangents e12 = g.edges[n1, n2]["data"]
File "\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\networkx\classes\reportviews.py", line 1085, in getitem return self._adjdict[u][v]
KeyError: 2667036457
No idea if this is an issue on the osm data or the tool, I'd appreciate any help with this ^^.
Going back to the original osm file I had used in the very first attempt, now the isolated dwelling doesn't cause a crash anymore. However the optimize edges still fails
Thanks, can confirm. For Frankfurt I didn't encounter any city_block or islet (nodes). Therefore, I did not consider it. This will probably be a general issue of this tool - some OSM data can always be unexpected and I cannot test the whole world.
Nevertheless, the error is easy to fix. The code should be more robost at this point, of course. I will take care of it.
The other error was a bit harder to find and solve. The cause are tracks on streets. They use sometimes the same nodes, which leads to troubles with the graph.
Please try again with the newest version, it should work now.
Tried it with both osm files now, works. tysm
Description:
After getting the osm data from https://heightmap.skydark.pl/ with the coordinates 10.89326 long and 48.37110 lat with a size of 16.384 the converter keeps crashing because there seems to be an "isolated_dwelling" with no name. I have tried fixing it by removing the dwelling from the osm file by using JOSM but the issue persists, I'm guessing JOSM doesn't cleanly remove the data that is causing the issue.
Replicate:
Possible Solutions:
Is there any way to properly handle this? I'm guessing with the large OSM Data that such small issues will happen to many users.