Add member label-node to metadata
Thanks for creating OSM-Boundaries! It helps a lot!
There's one thing which I still need to do as a separate step after downloading data from here: Getting the recommended label position directly from OSM. It would be great if this could be integrated in the metadata somehow to save that extra step.
Maybe it could be added to the Tags or as a separate property, like
"properties": { "osm_id": -365331, "label_position": { "lat":42.6384261,"lon":12.6742970 }, ...}
Here's what I'm doing currently (example Italy)
Manual approach:
- get ID from the country I'm interested in from the OSM-B data, e.g. Italy 365331
- Visit Page https://www.openstreetmap.org/relation/365331
- Observe orange circle north of Rome which is the label position
- Scroll to bottom, expand Members Section
- Scroll again (or search for "label"), find "Node Italy (26347360) as label"
- Click link and get position from page
Scripted:
- Download https://www.openstreetmap.org/api/0.6/relation/#{osm_id.abs}.json, e.g. https://www.openstreetmap.org/api/0.6/relation/365331.json
- find elements[0].members where role=="label"
- download https://www.openstreetmap.org/api/0.6/#{type}/#{ref}.json, e.g. https://www.openstreetmap.org/api/0.6/node/26347360.json
- find lat, lon
This sounds quite interesting. Right now I don't know how possible it is for us, or how to implement it. Our lack of knowledge around OSM itself is a bit of a threshold. But based on your instructions of how you do it manually, we should be able to figure out how it looks in the underlying data.
We will do some research to see what we can do about this.