[OSM-dev] Osmarender feature on only one side of road
Martijn van Oosterhout
kleptog at gmail.com
Mon Jul 2 10:20:51 BST 2007
On 7/2/07, 80n <80n80n at gmail.com> wrote:
> Ideally what is needed is a method of offsetting a path. It's possible to
> offset text using the dy attribute as you have already noticed. AFAIK there
> is no similar method of offsetting the path itself. The problem is
> fundamentally an SVG problem, if you can find a way of creating SVG that
> will do the job then Osmarender can be modified to generate the appropriate
> SVG instructions.
It seems to me you should be able to use viewport transformations to
do this. If you draw a line:
<line x1="0" y1="1.5" x2="400" y2="1.5" />
Then this will draw a line 50 pixels offset:
<g transform="translate(0,50)">
<line x1="0" y1="1.5" x2="400" y2="1.5" />
</g>
You can create general transformation matrices but I don't know
XSLT/SVG calculation capabilities, but I feel it must be possible...
Have a nice day,
--
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev
mailing list