-
QuestionHello, My goal is to extract all versions of boundary relations as valid The ProblemI have successfully implemented a pipeline for Nodes and Ways using a persistent SQLite cache for node coordinates (handling the timeline logic manually). However, I am struggling to reconstruct Polygons (Relations). When I use What I have tried
My Assumptions / ConfusionIt seems Questions
Any guidance or pointers to examples for handling Historical Polygon Assembly would be greatly appreciated. Environment:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
First a warning because there is often confusion about what the OSM history files can be used for: If you want to research how actual boundaries changed over time, OSM data is not a great resource. The reason is that more changes in OSM are due to how OSM is getting this data and improving it over time than with actual changes in the real world. Generally working with OSM history data is difficult and there are many problems of data quality and changes in the tags OSM uses and there aren't great tools around. Most tools will not work with OSM history data. Osmium/PyOsmium does have some functionality for that but there are a lot of limitations when it comes to history data. Some of them are due to the fact that there just aren't that many people who want to work with the history data, some are due to the technically challenges. Osmium/PyOsmium can not assemble polygons based on the OSM history file. There is no code in Osmium/PyOsmium that can get the correct versions of the member ways of relations or the nodes in ways needed for assembly. So either you have to implement all of that yourself, which is difficult, or you have to find a different way. The usual way to handle history data is to pick specific date/times and do the processing for them independently. So you can, say, do your processing for every day (or every month or so) in the time frame you are interested in by using To reduce the amount of data you need to work with, you should be able to use If you actually need to capture all the changes in OSM, you'll need to create the output for every change in the relation itself or any of its way members and their node members. That's left as an exercise for the reader. You can also have a look at the Ohsome which might work for you, I don't know much about what it is doing. |
Beta Was this translation helpful? Give feedback.
First a warning because there is often confusion about what the OSM history files can be used for: If you want to research how actual boundaries changed over time, OSM data is not a great resource. The reason is that more changes in OSM are due to how OSM is getting this data and improving it over time than with actual changes in the real world.
Generally working with OSM history data is difficult and there are many problems of data quality and changes in the tags OSM uses and there aren't great tools around. Most tools will not work with OSM history data. Osmium/PyOsmium does have some functionality for that but there are a lot of limitations when it comes to history data. Some of them a…