This is mainly for Google, as I couldn’t find anything that actually did this in OSM. I’d have thought there would be an option to draw the borders of a state/country etc including the coastline and land borders, but apparently not.

Here’s the code for Overpass Turbo:

rel["ISO3166-2"="GB-SCT"]["type"="boundary"]["boundary"="administrative"]["admin_level"="4"];
(
  way(r)["maritime" != "yes"];
  area["ISO3166-2"="GB-SCT"][admin_level=4];
  way(area)["natural"="coastline"];
);

out geom;

You can see it here: https://overpass-turbo.eu/s/1rGa

I think this will work with any of the ISO 3166-2 codes, eg: GB-SCT, GB-ENG, IT-78, etc – as long as OSM supports them.

Let me know if you found it useful!

Leave a Reply

Your email address will not be published. Required fields are marked *