Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python error while importing certain coordinates #514

Open
WispBart opened this issue Aug 7, 2024 · 1 comment
Open

Python error while importing certain coordinates #514

WispBart opened this issue Aug 7, 2024 · 1 comment

Comments

@WispBart
Copy link

WispBart commented Aug 7, 2024

While trying to import building data from Berlin I encountered the error below.

I've tracked the problematic data to the following coordinates:
Min Lat: 52.5563
Max Lat: 52.5625
Min Long: 13.455
Max Long: 13.4675

I've exported the region and added it as an attachment.
berlinpasedagplatz.zip

Error: Python: Traceback (most recent call last):
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\__init__.py", line 250, in execute
    return self.importOsm(context)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\__init__.py", line 351, in importOsm
    a.render()
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\app\blender.py", line 464, in render
    m.render()

  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\manager.py", line 81, in render
    self.renderer.render(building, self.data)
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\renderer.py", line 135, in render
    self.renderElement(outline, building, osm)
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\renderer.py", line 164, in renderElement
    self._renderElement(element, building, roof, data, osm)
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\renderer.py", line 175, in _renderElement
    if roof.make(osm):
       ^^^^^^^^^^^^^^
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\roof\profile.py", line 620, in make
    slotR.trackUp(roofIndices)
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\roof\profile.py", line 465, in trackUp
    index = self.trackUp(roofIndices, index, part[-1])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\WispBart\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blosm\building\roof\profile.py", line 456, in trackUp
    elif part[-1] != parts[index+1][1][0]:
                     ~~~~~^^^^^^^^^
IndexError: list index out of range```
@vvoovv
Copy link
Owner

vvoovv commented Aug 9, 2024

Hi @WispBart

It is this building that causes the error.

image

A think that a more appropriate roof tag for this building is roof:shape=hipped. It's also a quick way to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants