Hey everyone,
I am using a local copy of osm-website to edit imported osm.pbf map data with id-editor, I have limited the layers visibility on idEditor side (e.g only roads from db are shown for editing), but despite this, the api is still making calls for All the data and its taking an extremely long time to work with it.
are there any solution to limit the database requests to requested layers only (when editing) ? Something like an overpass api but for editing api ?
i think another solution would be to only import the layers i want to work with, but i would rather not do this as it’ll require merging with main files later anyway.
No, there isn’t. You would literally need to use the overpass-api and there’s a rabbit hole of things that would need to change to make that work in your setup.
The obvious question is if you are even using the right approach, it might be helpful if you could outline what you actually want to do.
Hi Simon,
Thank you for your response, as mentioned, i am using a local copy of osm-website to make edits to imported osm.pbf map data with built-in id-editor, the map editor is hosted and i want to allow other people to edit the maps i have loaded into this database, so josm is out of the question as people won’t bother to install anything on their systems. But even though we don’t need to edit huge areas, even single city editing becomes nearly impossible this way.
And i don’t really want to over-complicate the process of importing and exporting from this database, it would be nice if i could just download the data other people have edited and use it, instead of later merging it with other data that compliments this map
Logically, for someone who is familiar with osm-website codebase it shouldn’t be all that difficult to filter requests to database based on what’s being filtered on idEditor side ? It’s just a matter of sending a filter setting in an api request to rails and rails filtering the database request. Not sure why its not the case…
Regardless of if it is difficult or not to integrate filtering in the editing API or not (probably at least a man month or so), you don’t actually want to do that and you misunderstand what the filtering does both in iD as in JOSM, Vespucci etc.
You in general do not want to edit incomplete data as that will lead to inconsistencies if not out right brokeness. The classical case is deleting nodes that are members of ways that haven’t been downloaded. Editors simply don’t render layers that have been filtered out, but they don’t “detach” objects from each other.
For example if I delete a node from a landuse polygon that has been glued to a building, the node will still be deleted from the building outline even if I have filtered out buildings in the editor.
Anyway, back to your original issue, I would suggest trying out if using CGImap - OpenStreetMap Wiki for the relevant API support helps with performance, just as it does for the production OSM API.
Thank you Simon, yeah i did consider that there could be a deeper reason why something as simple as that, is not implemented, hence the question mark.
Thank you for the explanation.