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

Wrong OSM id for relations #170

Open
chourmo opened this issue Jan 18, 2022 · 3 comments
Open

Wrong OSM id for relations #170

chourmo opened this issue Jan 18, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@chourmo
Copy link

chourmo commented Jan 18, 2022

The osm id for relations is not the value from OpenStreetMap.

from pyrosm import OSM, get_data

filepath = get_data("Marseille")  
osm_ref = OSM(filepath)  

parks = osm_ref.get_data_by_custom_criteria(
    custom_filter={"leisure": ["park"]},
    filter_type="keep",
    keep_ways=True,
    keep_relations=True,
)  
parks = parks.loc[parks.osm_type == "relation"]  

Results has 2 rows with id 1428478507 and 19033931325.

There is no relation id with these values in openstreetmap www.openstreetmap.org/relation/1428478507 and www.openstreetmap.org/relation/19033931325

The right osm ids are 3048922 and 11959147

@dhodcz2
Copy link

dhodcz2 commented Apr 19, 2022

I am encountering the same issue as well. After loading NewYorkCity, the way IDs seem to be correct, but all of the relation IDs seem to be incorrect.

From 'newyorkcity.osm.pbf':

wikipedia,id
en:4 World Trade Center,9494583065
en:5 Beekman Street,9513062783
en:Alexander Hamilton U.S. Custom House,9498278818
en:Castle Clinton,9505670327

All of these IDs are incorrect. The way IDs are however correct. I cannot find any documentation that would suggest that the relation IDs are given differently than the way IDs.

I can trace this issue to the pyrosm package and not the files themselves. Using osmium with greenland-latest.osm.pbf, I get normal relation IDs, however the relation IDs from pyrosm are nonsensical.

@hbruch
Copy link

hbruch commented May 22, 2023

Any news on this issue?

@AnBowell
Copy link

AnBowell commented Apr 12, 2024

Any news on this issue?

I've managed to implement a fix for this and have opened a pull request. It seems to be working for me so far: #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants