[postgis-users] SELECT AsSvg(the_geom) FROM myTable

James Macgill j.macgill at geography.leeds.ac.uk
Mon Jul 29 15:36:51 PDT 2002


I've just taken a look at your page, it does look to have huge potential.

One of the best things about SVG is the amount of styling information that 
can be applied to each entity.

I notice your maps are well styled and I'm interested to know how you set 
that up. Would you be looking to style the SVG primitives once they came 
back from the database or would you somehow like to allow for styling at 
the database end?

I know its not direct, but I recently added SVG output to geotools2 as a 
module which takes geographic features and a Styled Layer Descriptor (SLD) 
document to produce a styled SVG file.

SLD is a recently proposed standard from the OpenGIS consortium.

There is a very basic example at: 
http://www.geotools.org/modules.php?op=modload&name=News&file=article&sid=130&mode=thread&order=0&thold=0

That example was built using the gmldatasource module, but it could just as 
easily have come from the postgis module.

However, this gets away from your goal, which is a database only 
solution.  The point I was aiming for is that an SVG output would ideally 
be a combination of geometires and style information and I would be very 
interested in seeing if postgis could either store or use SLD in the 
generation of SVG output.

all the best

James

At 10:16 29/07/2002 -0700, Paul Ramsey wrote:
>Klaus,
>It looks pretty simple. Am I right that polygons are not being handled
>any differently than lines? It looks like SVG is little more than some
>'M's and the coordinates... We would probably also want to break MULTI*
>geometries into their primitive parts and return them that way, yes?
>
>Klaus Foerster wrote:
> >
> > Hello PostGIS users!
> >
> > Beeing part of the Scalable Vector Graphics (SVG) community i'm quite 
> interested
> > in delivering svg content directly from the database - here is what i 
> ended up with:
> >
> > http://geo4.uibk.ac.at/~klaus/svg/postgis/
> >
> > Do you think it is possible to implement a function like AsSvg() in the 
> next release
> > of PostGIS? A lot of SVG developers are waiting for something like that 
> - at least I
> > am, that's why I dared to edit postgis_inout.c without any knowledge of 
> C ;-)
> >
> > tell me what you think about my proposal
> >
> > Klaus Foerster

-- 
James Macgill
Center for Computational Geography
Spell Checker (c) Creative Spelling inc (aka my dyslexic brain)
http://www.geotools.org  the open source java mapping toolkit.








More information about the postgis-users mailing list