mapmeld / iD

Developing GeoServices tool for OSM iD Editor
http://mapmeld.com/iD
ISC License
7 stars 1 forks source link

More Flexible Field Translation #70

Open blackboxlogic opened 4 years ago

blackboxlogic commented 4 years ago

Firstly, the ability to overlay data from a data source in iD is amazing.

While using it, I had trouble with the translation from the data-source schema to OSM's schema. A simplified example of this is OSM's addr:street=*. The data-source I was using had three fields:

From this data-source, I would want to perform a translation (from E -> East, ST -> Street) and a concatenation producing the single tag "addr:street"="East Main Street". I didn't see a way to do that within your branch, nor does it seem practical to include this level dexterity directly into iD.

The approach I'm considering to this problem is to set up a schema translation service ("STS"). iD would make its requests to STS, which would relay the requests to the target data-source. STS would receive the response and perform the necessary translations (into OSM's schema), then re-serialize that and send it to iD which has been patiently waiting.

Questions:

mapmeld commented 4 years ago

I agree that this would be useful. Your concatenation example, or something based on string templating "${}", SQL SELECT syntax, or something similar, would be a good feature for iD as a whole. When I was working on this branch, I was aware of the differences, but more features = a more complex UI on top of everything else in the PR. The goal was to allow a data import without going through the full process of downloading and re-uploading data.