This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to exclude water on polygon export?

0

Hi to all, my request; alt text

var request = $"https://nominatim.openstreetmap.org/reverse?q=&polygon_kml=1&format=xml" + $"&place_id={feature.properties.place_id}" + $"&osm_id={feature.properties.osm_id}" + $"&lat={feature.geometry.coordinates[1].ToString(CultureInfo.InvariantCulture).Replace(",", ".")}" + $"&lon={feature.geometry.coordinates[0].ToString(CultureInfo.InvariantCulture).Replace(",", ".")}&class=boundary&type=administrative&osm_type=R";

And my output kml is; alt text

But i wan't without water like this; alt text

How can i request a polygon area without water?

asked 16 Jan '20, 09:37

roslyncompiler's gravatar image

roslyncompiler
11113
accept rate: 0%

edited 17 Jan '20, 09:01

I'm afraid your links haven't worked. Perhaps you could update the question to provide them.

(16 Jan '20, 13:13) SK53 ♦

Which links? Screenshots? This is the request;

var request = $"https://nominatim.openstreetmap.org/reverse?q=&polygon_kml=1&format=xml" + $"&place_id={feature.properties.place_id}" + $"&osm_id={feature.properties.osm_id}" + $"&lat={feature.geometry.coordinates[1].ToString(CultureInfo.InvariantCulture).Replace(",", ".")}" + $"&lon={feature.geometry.coordinates[0].ToString(CultureInfo.InvariantCulture).Replace(",", ".")}&class=boundary&type=administrative&osm_type=R";

(17 Jan '20, 08:43) roslyncompiler

The image hoster seems to be a bit unreliable. Reloading the images a couple of times made them show up here.

(17 Jan '20, 08:48) TZorn

I've changed to host. Sorry about that.

(17 Jan '20, 08:56) roslyncompiler

One Answer:

1

Nominatim can't do that. (The /reverse endpoint also doesn't support the place_id, osm_type, osm_id, class and type you're sending.)

answered 16 Jan '20, 13:38

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

So just to make sure, are there no way get only land area in nominatim?

(17 Jan '20, 08:45) roslyncompiler

Yes, no way. Nominatim only returns places from the OSM data, it doesn't change the boundaries/polygons.

(17 Jan '20, 12:46) mtmail

Source code available on GitHub .