[postgis-users] AsSVG()

Klaus Förster klaus.foerster at uibk.ac.at
Sun Sep 12 12:34:37 PDT 2004


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.

> 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?

klaus
> 
> --strk;
> 
> On Fri, Sep 10, 2004 at 11:50:06AM +0200, strk at refractions.net wrote:
> > Thanks to Klaus Forster (sorry for the "o"... can't rely on
> > 8bit chars) whose gave permission to include use his code
> > the AsSVG() function will be included in next postgis release.
> >
> > About accuracy control I think it would be better to have
> > a separate function controlling it (apply_grid ?) and leave
> > assvg() with it's own SVG-specific arguments.
> >
> > What do people think about this ?
> >
> > --strk;
> >
> > On Fri, Sep 10, 2004 at 03:13:04PM +0900, Andreas Neumann wrote:
> > > Hello,
> > >
> > > I would also strongly encourage the inclusion of the AsSVG() patch into
> > > the main source tree of Postgis. Being able to control the accuracy (nr
> > > of decimal places) is also very important for me. Thanks for providing
> > > the patch!
> > >
> > > I personally use SVG and Postgis a lot in SVG mapping projects (see f.e.
> > > http://www.carto.net/geog234/lab7/index.svg - be careful with loading
> > > the contour lines (those are not well optimized for web-use))
> > >
> > >
> > > I am currently in Japan at the SVG.Open, UBIMap and CSIS Symposium.
> > >
> > > SVG for webmapping is very popular in Japan and just recently strongly
> > > recommended in Japan as a standard way to display spatial data on the
> > > web and mobile devices. Furthermore the two biggest mobile companies
> > > (NTT, KDDI) invest a lot in SVG for mobile devices.
> > >
> > > http://www.svgopen.org/2004/proceedings_en.html (look for goSVG and LBS
> > > services) and www.jamaps.com
> > >
> > > KDDI is strongly pushing SVG to also become a international standard for
> > > Location  based services.
> > >
> > > Finally: SVG can also be used for digitizing geographic data and feed it
> > > into Postgis: http://www.carto.net/papers/svg/digi/ - that project is
> > > still immature and at an early stage, but I think the idea might be
> > > interesting.
> > >
> > > So, please include it in the Postgis distribution - it is very important!
> > >
> > > Andreas
> > >
> > > btw: KDDI (second largest mobile provider in Japan) also uses Postgres
> > > for providing LBS data. Currently they don't use Postgis, since they
> > > only serve point-locations so far.
> > >
> > > --
> > > --
> > > ----------------------------------------------
> > > Andreas Neumann - Department of Cartography
> > > Swiss Federal Institute of Technology (ETH)
> > > ETH Hoenggerberg, CH-8093  Zurich, Switzerland
> > > Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
> > > e-mail: neumann at karto.baug.ethz.ch
> > > www: http://www.karto.ethz.ch/neumann/
> > > SVG.Open: http://www.svgopen.org/
> > > Carto.net: http://www.carto.net/
> > >
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list