I'm using the Overpass API of OpenStreetMap. I'm pretty new to this and I'm struggling to find a solution here since hours.
I have two different sets of nodes, .a1
and .a2
. I add a certain tag to each of them using convert and print them out afterwards. Here is my code:
[out:json][timeout:250];
//gather results
(
(node["place"="city"](47.8,5.6,50.6,11.2);)->.a1;
(node["place"="ocean"](0,-180,90,0);)->.a2;
foreach.a1(
convert node ::=::, ::id = id(), tileId = 0;
out;
);
foreach.a2(
convert node ::=::, ::id = id(), tileId = 1;
out;
);
);
My big problem is, that the returning data from the API is suddenly missing the values for "lat" and "lon" of the nodes. So the coordinates of the nodes are missing. If I print the nodes out, without using convert
before, the coordinates are still there.
I tried doing something like:
convert node ::=::, ::id = id(), ::geometry = geometry(), tileId = 0;
out;
but it failed.