[OSM-talk] Osmarender 1.3 with support for symbols and nested rules

Etienne Cherdlu openstreetmap-L at gj0.net
Tue Apr 11 00:03:37 BST 2006


Funny you should ask that...  I've just spent the last couple of hours
reading the SVG specs about text on a path, with this very much in
mind.

It looks feasible, so I'll be having a go at it in the next few days. 
 One problem is that not all SVG viewers have implemented textPaths,
so it will be necessary to use the Adobe SVG viewer or something else
to actually see the street names.

So far it seems Firefox and the GIMP do not support textPaths, Adobe
and Inkscape do.

Etienne



On 4/10/06, Andy Robinson <Andy_J_Robinson at blueyonder.co.uk> wrote:
> Etienne,
>
> Your latest map (plus the xslt) is looking very nice.
>
> Have you looked at street names on the ways or segments yet? I think if we
> could get a close in, fully featured, "OpenStreetMap" which has the sort of
> street detail you see on an A to Z then it would waken up a few to the
> potential here.
>
> I just haven't had time to delve deeper into the xml and xsl or svg yet, ok
> a brush over the surface allowed me to play around with your hard work, but
> I was merely tinkering.
>
> Text on lines didn't seem to be a big problem in SVG from what I could see,
> is that the case?
>
> If you haven't added much in the way of street names to your data yet you
> could have a look at the central area I have with them at:
>
> http://www.openstreetmap.org/api/0.3/map?bbox=-1.8350,52.5425,-1.7989,52.562
> 5
>
> Most of the ways clustered in the centre of this area have "name" keys.
>
> FYI, I'm currently working on getting a first draft "Birmingham" map
> rendered. Basically the area boundered by the M6Toll to the north, M42 to
> the East and South and Worlverhampton to the West. Big area, lots of ways
> and segments to tag, and that's just what's already there!
>
> Cheers,
>
> Andy
>
> Andy Robinson
> Andy_J_Robinson at blueyonder.co.uk
>
> >-----Original Message-----
> >From: talk-bounces at openstreetmap.org [mailto:talk-
> >bounces at openstreetmap.org] On Behalf Of Etienne Cherdlu
> >Sent: 10 April 2006 09:06
> >To: talk at openstreetmap.org
> >Subject: [OSM-talk] Osmarender 1.3 with support for symbols and nested
> >rules
> >
> >Folks
> >I've just put up Osmarender 1.3 on the wiki.
> >
> >This version has support for several new features:
> >1) You can defined symbols in your rules file for churches and post
> >offices etc and render them according to a rule.  Example:
> >
> >  <rule k="amenity" v="place_of_worship">
> >    <symbol xlink:href="#church" />
> >  </rule>
> >
> >2) You can define nested rules which allows rendering based on a
> >combination of two different key values.  For example:
> >  <rule k="amenity" v="place_of_worship">
> >    <rule k="denomination" v="anglican"><symbol xlink:href="#church"
> >/></rule>
> >    <rule k="denomination" v="jewish"><symbol xlink:href="#synagogue"
> >/></rule>
> >  </rule>
> >
> >This is an "and" clause.  If (amenity="place_of_worship" and
> >demonination="anglican") then draw a church.
> >
> >3) Nested rules and symbols enable one way streets to be described
> >using the following pattern:
> >  <rule k="highway" v="motorway">
> >    <rule k="oneway" v="1"><line class='motorway oneway' /></rule>
> >    <rule k="oneway" v="-1"><line class='motorway otherway' /></rule>
> >  </rule>
> >
> >The key oneway=1 draws an arrow in the same direction the segment was
> >originally drawn.  oneway=-1 draws an arrow in the opposite direction
> >to the way the segment was originally drawn.
> >
> >4) A width key can now be specified on a segment to override the
> >normal width at which it is rendered.  This is mainly to provide a way
> >of specifying the width of rivers.  So, for example, <tag k="width"
> >v="30"/> would draw a 30px wide river segment.  Currently there is no
> >scaling mechansim so it will always be 30px wide whatever the scale of
> >the map.  This is not ideal.
> >
> >5) An SVG <defs> element can now be included in the rules file
> >containing style, symbol, marker and other elements.  The old <style>
> >tag in the rules file is now deprecated.
> >
> >6) Finally, I have put up a new version of the osm-map-features.xml
> >rules file that contains implementations of all of the new features
> >described above.
> >
> >--
> >Etienne
> >
> >_______________________________________________
> >talk mailing list
> >talk at openstreetmap.org
> >http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
>
>
>


--
Etienne
(Forgot to reply to the list again)




More information about the talk mailing list