[OSM-dev] t at h maplint for coastlines

Lars Aronsson lars at aronsson.se
Thu Apr 26 11:11:15 BST 2007

Currently, most imported coastlines appear as fat red lines in the 
maplint layer of tiles at home, because they have tagged nodes and 
segments.  If I remove the tags from nodes and segments, many 
coastlines will be surrounded by thin red lines because they have 
"unordered segments".  If I use JOSM's menu action "reorder 
segments" to order the segments, the coastline disappears!  This 
is quite frustrating.  Ways with highway=*, railway=* and 
waterway=canal are rendered as thin lines by maplint, but ways 
tagged as natural=coastline are not.

Fortunately, this is easy to fix.  In all four files 
tilesAtHome/maplint/rules-*.xml I have added the following:

 <!-- in one of the layer sections -->
      <rule e="way" k="natural" v="coastline">
            <line class='natural-coastline'/>

 <!-- in the style section -->
            .natural-coastline {
                stroke-width: 1.5px;
                stroke-linecap: butt;
                stroke-linejoin: round;
                stroke: #000080;
                fill: none;
                stroke-dasharray: 5px, 1px;
                stroke-dashoffset: 0;
                stroke-opacity: 0.5;

I don't know what these things mean. I wanted long dashes with 
short breaks (5 to 1 ratio), but I get quite short and fat dashes 
of blue.  Anyway, it looks OK and is a lot more useful than seeing 
nothing.  As an example, see the Falsterbo peninsula in Sweden,

Could this be injected into SVN, please?

I don't know how "layers" work in Osmarender, and can't decide 
which the proper layer section for this might be.

Note that I only render *ways* tagged as coastline, not segments. 
I don't know whether this is controversial. I personally think 
that tagged segments is a bug, and that this tag 
(natural=coastline) belongs on a way.

  Lars Aronsson (lars at aronsson.se)
  Aronsson Datateknik - http://aronsson.se

More information about the dev mailing list