Comments (4)
If there is a version 2, there must have been a version 1. So "modify" is arguably right. If the two OSM files came from the OSM database, this constellation could never happen, it only happens when there are extracts or so. This is one of those cases where the file format isn't really thought through. Anyway, any program reading this change file will do the same operation anyway, so it shouldn't make a difference.
This is definitely something where we can not "fix" in Osmium, because the reason this comes out this way is deeply embedded into the way Osmium handles changes. Unlike Osmosis, which has "data streams" and "change streams", Osmium only has "objects", the change format is synthesized when writing out an .osc file simply using "create" when version==1 and "modify" when version > 1.
from osmium-tool.
The diff between two osm files describes "how to get there from here". If file A doesn't have an object, then you do not get to file B by "modifying" that non-existing object! I dont understand why "If the two OSM files came from the OSM database this constellation could never happen" - surely you can have an object not be there in planet file A and be at version 2 in planet file B?
from osmium-tool.
Because there must have been a version 1. The only version that is ever created out of thin air is version 1. All other versions are modifications of that first version. Yes, we can argue about the the exact definition of the change file and of what "create" and "modify" etc. mean, but in the end all a change file is, is a bunch of OSM objects. And everything that doesn't have a smaller version number than what's existing in your planet file or database, will be added to that planet file or database (and a "delete" is a kind of add in this case, because it adds a newer version marked as "deleted") replacing any older versions if they existed. There is no difference between how "create" or "modify" are handled really, and "delete" is also only special in so far as it basically sets the "visible" flag to false.
from osmium-tool.
I have clarified this behaviour in the documentation.
from osmium-tool.
Related Issues (20)
- Half as fast as osmfilter HOT 5
- Run osmium on Windows HOT 2
- Port program_options to cxxopts HOT 4
- osmium extract keeps some ways outside of the polygon HOT 7
- memory optimisation for extract using roaringbitmap? HOT 20
- `delete` uses past instead of future version in OsmChange file HOT 3
- Duplicate IDs after merge-changes HOT 4
- Windows build: GetObject error and where to publish the solution HOT 5
- Improve the way `linear_tags` and `area_tags` work HOT 11
- osmium extract: Too many open files HOT 4
- Merged .poly files with overlapping regions leave empty island HOT 3
- Can not parse timestamp HOT 5
- Waterway relations export HOT 4
- Build Failure on Apple MacBook Pro M1 Max HOT 6
- Crash when trying to extract Britanny (via GeoJSON) from France HOT 2
- osmium-extract geofabric osm data with bbox returns empty file HOT 2
- Problem with merged output HOT 4
- Test failures with zlib-ng HOT 7
- PBF error: illegal blob size HOT 5
- Fails to build with GCC 14 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osmium-tool.