GameDevelopmentToolset
GameDevelopmentToolset copied to clipboard
When I modified the OSM file with JOSM, the import failed.
When I delete one building region in OSM files, importing the new OSM file will fail.
**Error Invalid source /obj/geo1/sop_osm_import1/read_in_map_data Error: Python error: Traceback (most recent call last): File "", line 315, in File "", line 179, in build IndexError: list index out of range
if way.nodes[0] == way.nodes[-1]: closed = True**
I am not very clear about the role of the code here.
Got it. Cause when I delete one region in JSOM, the Nodes array of a Way became empty, the code here will tell me "index out of range". So I add some codes before,
if(len(way.nodes) == 0):
del way
continue