Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get shape country (without maritime limit...only terrain) in Overpass?

I am trying to get the shape of country in Overpass API without the maritime limit in http://overpass-turbo.eu

And I have this query but it shows the maritime:

relation
  ["boundary"="administrative"]
  ["admin_level"="2"]
  ["name:en"="Spain"];
(._;>;);
out body; 
like image 439
tres.14159 Avatar asked Oct 20 '25 17:10

tres.14159


1 Answers

I found it, thanks to OpenStreetmap spanish mailing list and the doc (it is in spanish) https://iceosm2016.readthedocs.io/en/latest/ .

area["name"="España"]->.country;
rel["name"="España"]["type"="boundary"]["admin_level"="2"];
(
way(r)["maritime" != "yes"]({{bbox}});
way(area.country)["natural"="coastline"]({{bbox}});
);
out geom;
like image 138
tres.14159 Avatar answered Oct 27 '25 05:10

tres.14159