GeoServer with OSM data not showing water

Hello,

I’m testing GeoServer as WMS server.
First I downloaded OSM data from Geofabrik Download Server

After that I filled a PostgreSQL database with that data:

osm2pgsql -s -H localhost -P 5432 -U postgres -W -d osm_neth_germ_belg merged.osm.pbf -E 3857 --keep-coastlines

Then I split the data in separate tables for creating different layers in GeoServer.
My query to create a separate water layer:


insert into osm.water(osm_id, name, geom) 
  SELECT planet_osm_polygon.osm_id, 
    planet_osm_polygon.name,  
    st_multi(planet_osm_polygon.way)::geometry(MultiPolygon, 3857) as way
  FROM planet_osm_polygon
  WHERE planet_osm_polygon."natural"   = 'water'::text
     OR planet_osm_polygon."natural"   = 'coastline'::text
     OR planet_osm_polygon."natural"   = 'strait'::text
     OR planet_osm_polygon."natural"   = 'wetland'::text
     OR planet_osm_polygon."natural"   = 'shoal'::text
     OR planet_osm_polygon."natural"   = 'bay'::text
     OR planet_osm_polygon."natural"   = 'beach'::text
     OR planet_osm_polygon."waterway"  = 'dock'::text
     OR planet_osm_polygon."place"     = 'sea'::text
     OR planet_osm_polygon."landuse"   = 'water'::text
     OR planet_osm_polygon.water    IS NOT NULL 
     OR planet_osm_polygon.waterway IS NOT NULL
     OR planet_osm_polygon.wetland  IS NOT NULL;

I have a problem with my water layer.
Not all waters are added to that layer. Example:
The water “Westerschelde Netherlands” is not colored blue. See image.

Does anybody knows what’s going wrong?

Excuse my English, it’s not my native language.

17 posts - 3 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/geoserver-with-osm-data-not-showing-water/3297