[OSM-talk] RFC: Tagging and rendering Australian highway numbers

Artem Pavlenko artem at mapnik.org
Wed Jul 25 15:36:22 BST 2007


On 25 Jul 2007, at 13:53, Cameron Patrick wrote:

> G'day again,
>
> Along with the experimenting with Mapnik I've been doing, I've also  
> been
> trying to add the correct symbols for Australian highway numbers.
> Unfortunately, it's a bit of a mess because there are several  
> different
> types of them, each with different colours and their own 'shield'
> symbols.
>
> But first, the cool stuff - here's a map of Perth with ref= rendered
> using the right symbols:
>
>         http://largestprime.net/cameron/osm-tmp/perth-z12.jpg
>

Looks good.
> You can see the blue-and-white state routes and green-and-yellow
> national routes (Great Eastern and Great Northern highways here).  The
> icons come from Wikimedia Commons and are public domain.  The downside
> is that I'm using a different image for each route number, which  
> doesn't
> scale particularly well, because it entails a new mapnik rule for  
> each.
>
> You also see that the city turns into somewhat of a sea of route  
> shields
> in the zoomed-out view; and there are plenty of roads with route  
> numbers
> assigned which aren't shown in that image above!  Some kind of control
> over this in Mapnik would be handy.
>

You should use 'min_distance' property in (Shield/Text)Symbolizer  
(available in r492)

<Rule>
       <Filter>[highway] = 'motorway' and [length] = 2</Filter>
       <MaxScaleDenominator>500000</MaxScaleDenominator>
       <MinScaleDenominator>100</MinScaleDenominator>
       <ShieldSymbolizer name="name" face_name="DejaVu Sans Bold"  
size="11" fill="#809bc0" placement="line" file="/Users/artem/symbols/ 
motorway_shield.png" type="png" width="24" height="17"  
min_distance="40" />
     </Rule>
     <Rule>
       <Filter>[highway] = 'motorway' and [length] = 3</Filter>
       <MaxScaleDenominator>500000</MaxScaleDenominator>
       <MinScaleDenominator>100</MinScaleDenominator>
       <ShieldSymbolizer name="name" face_name="DejaVu Sans Bold"  
size="11" fill="#809bc0" placement="line" file="/Users/artem/symbols/ 
motorway_shield2.png" type="png" width="31" height="17"  
min_distance="40"/>
     </Rule>

It seems to work OK for me.

Artem

> There's also been quite a few 'standards' that people have used for
> tagging the route numbers, with additional, er, excitement from the  
> fact
> that a single stretch of road can have multiple routes assigned to it.
> Does anyone on talk-au have any opinions there?  From what I've seen
> driving around (and from consulting Wikipedia), here are the various
> types of route signs in use in Australia:
>
>  * State routes (white text on blue shield for numeric; white text  
> on green
>    rectangle for alphanumeric e.g. M5, A8)
>  * Australian routes (black text on white shield; AFAIK Highway One is
>    the only one of these that exists)
>  * National routes (yellow text on green shield)
>  * Tourist routes (white text on brown shield)
>  * Metroads (blue number inside a hexagon - only in Sydney and  
> Brisbane)
>
> I'm not sure whether it'd be best to use different tags for each type
> (e.g. ref=2, national_ref=94, etc) or to have a more detailed value  
> for
> ref, e.g. "ref=Metroad 5", "ref=National M1".
>
> Cameron
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>

Artem Pavlenko
http://mapnik.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070725/b3dd1ca0/attachment.html>


More information about the talk mailing list