HTenkanen/pyrosm

Get buildings merged parts and creates a new ID

Stoofik opened this issue · 1 comments

Describe the bug
When extracting buildings from osm.pbf data using simple get_buildings(), some more complex buildings that are split to multiple parts in original osm.pbf are merged together and completely new ID is created... There is no mention about this behavior in the documentation, which can produce quite confusing results, where original shapes and ID's are completely wiped out. It happens when big building is comprised of smaller parts, for example Hyatt Regency O'Hare Chicago (14160856) this complex of buildings is made from 7 individual parts, each with its unique ID. But result has an ID that doesn't correspond with anything... In my case some 87bilion something...

To Reproduce
Steps to reproduce the behavior:

  1. Load osm.pbf - In my Case Chicago
  2. Extract buildings with get_buildings()
  3. Save gdf to file
  4. Check newly created shape

Expected behavior
If the output is created from the bigger complex - Hyatt Regency O'Hare Chicago (14160856). Then keep the ID as is. But better - split it to individual buildings that are represented in osm and keep their IDs...

Environment:

  • OS: Windows
  • Python package source: Conda
  • Versions of Python: 3.10.4

Additional context
This behavior is quite unexpected, and if it is a feature not a bug, it should be mentioned in the documentation. But I think my proposed behavior is more logical and would not create confusion with new id.

@Stoofik : Thanks for reporting this. This issue is most likely related to the issue with incorrect relation ids as reported in #170.