pyrosm
pyrosm copied to clipboard
Wrong OSM id for relations
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
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.
Any news on this issue?
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: https://github.com/HTenkanen/pyrosm/pull/234