0
$\begingroup$

I'm using Blender GIS to import raw OSM ways data after dividing a map into tiles and exporting the tiles one at a time. After exporting the tiles into raw OSM data, I iterate through each <node> element to check if a previous tile has had that node in it, as to not import duplicate buildings and roads in Blender. If the node has previously been exported, I delete it from it's parent. Then I iterate through the <nd> references in <ways> and delete the ones that has already been referenced before.

This method worked fine for the first 3 tiles I tried. Then the 4th and 5th tile gets corrupted when trying to import them with Blender GIS.

Python: Traceback (most recent call last):
  File "Blender\3.0\scripts\addons\BlenderGIS-225\operators\io_import_osm.py", line 592, in execute
    self.build(context, result, geoscn.crs)
  File "Blender\3.0\scripts\addons\BlenderGIS-225\operators\io_import_osm.py", line 443, in build
    seed(way.id, way.tags, pts)
  File "Blender\3.0\scripts\addons\BlenderGIS-225\operators\io_import_osm.py", line 251, in seed
    face = bm.faces.new(verts)
TypeError: faces.new(...): sequence incorrect size, expected [3 - -1], given 2

location: <unknown location>:-1

I've tried looking for any additional references to <way> <nd>'s in the raw OSM data but I can't find any. Is my approach wrong? What is the issue here?

$\endgroup$

1 Answer 1

0
$\begingroup$

I should not have removed any <nd> elements from <ways>. Only remove the <node> elements.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .