Skip to content

Directly edit POIs on OSM

nic547 requested to merge nic547/osmybiz:merge_directly_editing into develop

This MR allows OSMyBiz to update POIs directly on OpenStreetMap, rather than taking the detour via Notes.

When editing a business the data is either from overpass or from the watchlist. For simplicity sake both these cases are treated equal. Overpass doesn't return the version of an element, so MyBiz needs to load the element from OSM to get it's version information. (This is also used to update the details, because Overpass data can be somewhat behind). This version information is used for optimistic locking by osm.

The existing code for creating nodes has been updated to be able to modify elements as well.

Existing tags that are not understood by OSMyBiz are simply left unchanged. While parsing a POI, "unknown tags" are processed too. Unfortunately those "unknown tags" can also include tags from object presets, so while writing the changes those duplicates have to be filtered out.

Merge request reports