You are not logged in.

#1 2020-03-22 01:51:59

JoséJúnior
Member
Registered: 2020-03-22
Posts: 2

osm2pgsql / Postgres and PostGIS / Brazil

Hi, I'm trying to getting data from Open Street Map to analysis.
Everything is going fine, I have used osm2pgsql to insert data to Postgres with PostGIS extension, all data is downloaded from geofabrik.de and the process works correct.
But when I make the selects seems like the data is incomplete.
On Postgres database a make this select:

select osm_id, name, way
from public.planet_osm_polygon
where admin_level = '4' and osm_id < 0;

And received all Brazilian states, expect Mato Grosso and Mato Grosso do Sul.
Seems like they are missing, but when a make the same select on public.planet_osm_line i receive this states and all others.
It's a problem with the data or is normal?

Offline

#2 2020-03-24 22:27:41

mboeringa
Member
Registered: 2014-06-29
Posts: 346

Re: osm2pgsql / Postgres and PostGIS / Brazil

Boundaries of states, provinces etc. are defined as relations in OSM. Unfortunately, they do get broken from time to time, and may end up as such in the extract you used. If the boundaries are important / big ones, they usually get fixed quite fast, so re-loading the data a second time might solve it.

Additionally, if your only interest is boundaries, then Wambacher's OSM Boundaries website (https://wambachers-osm.website/boundaries/) is an excellent source for download of pre-processed boundary polygons. Mato Grosso and Mato Grosso do Sul are available on his site.

Offline

#3 2020-03-25 13:50:29

JoséJúnior
Member
Registered: 2020-03-22
Posts: 2

Re: osm2pgsql / Postgres and PostGIS / Brazil

Thanks for the answer!

Offline

Board footer

Powered by FluxBB