[postgis-users] AsKML() how to create kml from postgis data
Jose Gomez-Dans
jgomezdans at gmail.com
Fri Sep 14 00:04:55 PDT 2007
Hi,
On 9/14/07, Maciej Skorczewski <maciej.skorczewski at procad.pl> wrote:
> How should i use AsKML() function to create KML files (w try show
> postgis data in google maps nad google earth)
The AsKML() function gives you the geometry in XML format (reprojected
to WGS84, if that's needed). You need to add the other bits to make it
into a full-fledged XML document. For each placemark, you get a
<MultiGeometry></Multigeometry> bit. You need to add the rest of the
XML, either working through the DOM, or just by creating the XML on
the fly.
I have a python class that we use to produce these maps. It's based on
GDAL/OGR, Matplotlib and so on. It is commented in Spanish, but if
there is demand, I can put it up in the PostGIS wiki page.
Cheers,
Jose
More information about the postgis-users
mailing list