OpenSnowMap-org / mapnik-opensnowmap.org

ski map mapnik style and scripts
10 stars 4 forks source link

Work with offset on ways instead of relations #19

Closed yvecai closed 5 years ago

yvecai commented 5 years ago

Since the beginning (pistes-nordiques.org), my goal was to renders nordic piste relations (route) with a colour tag side-by-side, like this: routes_offset

This works from offsets manually defined in a text file and used in the route relation style. The geometry of the route being created either with a ST_LineMerge in Imposm DB or directly by Osm2pgsql. Also, the nordic pistes as ways are not rendered if they belong to such a coloured route. This is a problem if I'd like to render the pistes differently from the ways attributes, like piste:grooming or piste:difficulty.

I have found a way to post-process the DB to have the offsets built-in in the way table, thus I can just get rid off the relation table and duplicate the ways belonging to one or several relations. At a first sight, it's working:

ways_offset

This means that I will soon (yeah, let say for next winter) be able to add more dashed patterns to the ways to better reflect the grooming and difficulty attributes. Here is a png mockup, the svg file is here if you want to make proposals on how you would like to see the pistes (http://www.opensnowmap.org/download/test_grooming_difficulties_mockup_01.svg): test_grooming_difficulties

This first draft would be like :

piste:difficulty=intermediate or beyond on a yellow background, still the black ! for intermediate and red ! for beyond.

I welcome other ideas !