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

OsmAndMapCreator should exclude objects with action='delete' from OBF file #558

Open
mattmccutchen opened this issue Dec 30, 2022 · 1 comment

Comments

@mattmccutchen
Copy link

I generally prepare my OSM changes using JOSM and test them before upload by loading a custom OBF file into OsmAnd; I documented the process at https://wiki.openstreetmap.org/wiki/Testing_changes_before_upload#OsmAnd. Today, I made a change that deleted a POI, but the POI still appeared in OsmAnd during my test. I saw the problem with OsmAndMapCreator-main.zip as of today (2022-12-30). Here are example OSM and OBF files that demonstrate the problem.

This is not some weird interaction with other data like osmandapp/OsmAnd#13543: to be completely sure of avoiding such issues, I've changed my workflow to use a separate installation of OsmAnd with no OBF files installed except the one I'm testing.

AFAICT, the problem is simply that OsmAndMapCreator isn't smart enough to exclude POIs that JOSM has marked as action='delete'. (I didn't test whether this affects other kinds of objects as well.) Please consider adding this feature to facilitate testing changes before upload. Or let me know if there is a different process I should be following to test my changes in OsmAnd that avoids the problem.

A workaround is to make a copy of the OSM file with action='delete' objects removed before running OsmAndMapCreator. I edited the objects out manually, but it could probably be automated if it's worth the work, via XSLT if not some OpenStreetMap-specific tool.

@vshcherb
Copy link
Member

vshcherb commented Jan 2, 2023

xslt is pretty easy of course as transformation - https://stackoverflow.com/questions/53742345/is-it-possible-to-run-the-xslt-file-through-shell-script. With OsmAndMapCreator it needs to be parsed somehow and as MapCreator is used as bash tool mostly it's probably worth to enhance that pipeline with other tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants