der-stefan / OpenTopoMap

A topographic map from OpenStreetMap and SRTM data
https://opentopomap.org
Other
471 stars 119 forks source link

Water outlines #141

Open der-stefan opened 6 years ago

der-stefan commented 6 years ago

Water area outlines should not be drawn between polygons of the same type. Example: https://opentopomap.org/#map=14/51.88499/4.29141

This is not so easy to fix: Water outlines are currently rendered on top of the polygons. If the outlines are rendered below the fill color, they would only be outside of them. In order to have the same line width, the outlines would have to increase, thereby increase the overall polygon size.

The same problem is with forest outlines.

der-stefan commented 6 years ago

For clarification: outline

bbnt commented 6 years ago

First I must complement you on a great project! You have created a very beautiful and useful topographic map!

On my development instance of OTM, I removed the outlines of all water polygons to include the water ways. The result is pretty good.

screen shot 2018-03-25 at 10 15 49 pm

verses original https://www.opentopomap.org/#map=15/53.56720/-351.44485

der-stefan commented 6 years ago

That looks fine, but it is not what we want: We want to have water outlines... I have no clue how to solve the problem of neighboring water polygons so far. Issue stays open.

tomass commented 5 years ago

At least for vector tiles you can merge neighbouring geometries with _stunion for a specific tile.

SELECT st_union(way) AS geom,
  FROM planet_osm_polygon
 WHERE way && !bbox!
   AND ("natural" = 'water' or landuse in ('reservoir', 'basin') or waterway = 'riverbank')

This merges all water polygons into one for the specific tile thus avoiding merging all water around the globe. I cannot see why this would not work for Mapnik/raster tiles. Two rivers (with separate waterway=riverbank polygon) meet here: paveikslas Downsides: