How to download proper polygons from osm-boundaries?

Avatar
  • updated
  • Not a bug

I would like to download proper borders on country level. I only need two countries, but osm-boundaries does not seem to get me there...

The issue is described here on stackoverflow, but essentially non of the settings I can place here allow me to get a proper polygon of the landmass of a country, as long as it isn't an island.

Pinned replies
Avatar
Magnus
  • Answer
  • Not a bug

Just read your Stackoverflow post as well. It's not possible to see what database you are using, but you should probably try another. OpenStreetMap is broken fairly often. OSM-Boundaries provides data as is, ie we do not repair it. That's one of the reasons to why we provide historical data.

Land-only is probably very broken in the April database from 2023, because the costline in OSM didn't work properly at the time.

Avatar
Thomas Becker

As you suggested, I went back to an older OSM snapshot and the version from January 2023 works like a charm. Now landOnly does include also the islands.

Avatar
Thomas Becker

Hi Magnus, actually in two ways... ;-)

1. the url produced for the download is 

https://osm-boundaries.com/Download/Submit?apiKey=MY-API-KEY&db=osm20230403&osmIds=-54409&format=GeoJSON&srid=4326&landOnly

2. while your example url works for Skåne, it does not include the islands.


However, the second point can be overcome by altering the setting from land to water.

Also, the recursive key does not appear in the generated download url , and the download dialog does not include a setting for that.

I assume 'recursive' means recursive with respect to the administrative level. Since I am only interested in level 2, recursive would create a substantial overhead.

Avatar
Magnus
  • Answer
  • Not a bug

Just read your Stackoverflow post as well. It's not possible to see what database you are using, but you should probably try another. OpenStreetMap is broken fairly often. OSM-Boundaries provides data as is, ie we do not repair it. That's one of the reasons to why we provide historical data.

Land-only is probably very broken in the April database from 2023, because the costline in OSM didn't work properly at the time.