NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm busy extracting the country boundaries for several southern African countries from PBF files downloaded from GeoFabrik using QGIS.

I'm doing this by filtering the multipolygon layer on admin level, then running the dissolve algorithm on the filtered layer. This has worked for South Africa, Zimbabwe and Botswana, but I cannot get the correct result for Mozambique. I cannot seem to find a filter query that gets me the country's borders that I see on Open Street Maps and I'm not sure why, it's almost as if the country doesn't have any polygons to represent its provinces, but that doesn't make sense because I can see it on the Open Street Maps website.

Does anyone know why Mozambique is so different from its neighbors and what I can do to get the country's boundary?

Thanks

asked 10 Jan '20, 22:40

Walter's gravatar image

Walter
16223
accept rate: 0%


It can sometimes happen that one small part of the country boundary lies outside of the Geofabrik extract and then the boundary cannot be built. I am the maintainer of the Geofabrik service and will have a look; in the meantime, why not try out this OSM boundaries service: https://wambachers-osm.website/boundaries/

permanent link

answered 10 Jan '20, 23:26

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Cool thanks for taking a look. I checked out the extract of Mozam found here: https://download.openstreetmap.fr/extracts/africa/mozambique.osm.pbf and it has similar problems, although I can get much better polygons from the admin level filter using this one (just not the polygons I need). But I'll use that boundaries service you suggested in the mean time, thanks for the help.

(11 Jan '20, 15:07) Walter

Here's how it can be perform with Overpass:

area["ISO3166-1"~"MZ|ZW"]; //Mozambique/Zimbabwe
rel(pivot)->.countries;
rel(area)[admin_level=4];
out geom;
.countries out geom;;

https://overpass-turbo.eu/s/PG4

permanent link

answered 12 Jan '20, 17:30

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 12 Jan '20, 17:33

Thanks for the query, but If I open the query the vector overlay shows that the returned geometry seems to be the maritime boundaries and not the land based coastline, so I don't get the detail of the coastline for Mozambique using this query.

(12 Jan '20, 18:18) Walter

You asked for "country boundaries" It returns them. You made mention of "provinces", It also returns those. You said you were "filtering by admin_level". It filters by admin_level. Coastlines don't usually contain admin_level tags. The ' boundaries service' recommended by Frederik returns the same boundaries as the OP routine.

(12 Jan '20, 18:47) DaveF

Maybe I'm using the wrong terminology to describe what I need, but if I filter on admin level for several other countries I do get the polygons that represent the coastline for that country, it just seems to be failing for Mozambique. Using the boundaries service returned the correct coastline boundary polygons when set to "land".

(12 Jan '20, 20:49) Walter

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×132
×129
×67
×26

question asked: 10 Jan '20, 22:40

question was seen: 2,057 times

last updated: 12 Jan '20, 20:49

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum