osm4j icon indicating copy to clipboard operation
osm4j copied to clipboard

Reading changesets

Open sdicke opened this issue 3 years ago • 2 comments

Is there a way to read changes from changesets with osm4j? I searched for a way and tried to read them with EntityContainer, but it seams that there is no type available and any serialisation try failed with no generated output.

sdicke avatar Jan 12 '23 03:01 sdicke

Hey @sdicke, yes it's possible, but you need to use the replication module of the library: https://github.com/topobyte/osm4j/tree/master/replication

This is the Maven artifact: https://mvn.topobyte.de/de/topobyte/osm4j-replication/1.0.0/

Unfortunately, I don't have a public project lying around that's using it that I can share and haven't gotten to write example code. There is some testing code though in https://github.com/topobyte/osm4j/tree/master/replication/core/src/test/java/de/topobyte/osm4j and it's probably best to currently learn about how to use that part of the library by looking at the examples.

You can either run ./gradlew cleanEclipse eclipse and import the whole project into Eclipse or just open the project using IntelliJ. Make sure to always open the root project and not just the replication module.

sebkur avatar Jan 12 '23 09:01 sebkur

Thank you for your answer. I will try it.

sdicke avatar Jan 12 '23 13:01 sdicke

Closing this due to inactivity. Feel free to reopen if the solution did not work for you.

sebkur avatar Jan 07 '25 20:01 sebkur