[postgis-users] AsSVG()

strk at refractions.net strk at refractions.net
Mon Sep 13 01:38:25 PDT 2004


On Sun, Sep 12, 2004 at 09:34:37PM +0200, Klaus Förster wrote:
> hi strk, 
> 
> > Now, for the second argument (rel), I'm not really understanding
> > it. A quick look at SVG spec shows there are absolute or relative
> > paths, but it talks about using 'M' or 'm' for moves and 'L' or
> > 'l' for linetos, while the AsSVG() function 'omits' the 'L' for
> > absolute and keep using 'M' for relative...
> AsSvg() does not use 'relative m' but starts each segment with an
> absolute position like AsText() does as well. Using 'absolute M'
> means that the following coordinate(s) will be specified using
> absolute values, so if you want relative notation you have to write
> an 'l' after the first (absolute) coordinate-pair and if you want
> absolute notation you may omit the "L" without consequences.
> 
> According to the spec the command letter can be eliminated on
> subsequent commands if the same command is used multiple times
> in a row - so that's why L or l do not occur before each pair of
> coordinates.

I understand now. Thank you.

> 
> > Also for POINT output the argument is used in a completely
> > different way.
> > Is this correct/accepted/intended ?
> well, there's no point-element in SVG so I decided to approximate a
> POINT using a circle with cx and cy as default. text-, symbol- or
> use-elements on the other hand require x and y - this notation will
> is accomplished using relative notation. 
> 
> as far as MULTIPOINT is concerned, there's no real solution right now.
> querying MULTIPOINTS will deliver strings like cx=5 cy=5 cx="10" cy="20"
> maybe one could add a separator (,) between subsequent points?

I think SVG gurus should answer this. What I can do is add the current
POINT behaviour in the documentation (currently missing).

--strk;



More information about the postgis-users mailing list