GameDevelopmentToolset icon indicating copy to clipboard operation
GameDevelopmentToolset copied to clipboard

When I modified the OSM file with JOSM, the import failed.

Open guosaisaiss opened this issue 6 years ago • 1 comments

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.

guosaisaiss avatar Jul 10 '19 09:07 guosaisaiss

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

guosaisaiss avatar Jul 11 '19 07:07 guosaisaiss