[postgis-users] Re: [postgis-devel] Proposal for supporting Extrude, Tessel
Dane Springmeyer
blake at hailmail.net
Thu Feb 21 11:20:29 PST 2008
Guido,
Thanks for you thoughts.
However, this proposal is not about styling.
It is specifically about geometry and its rendering in KML. The
elements proposed for addition specify how to interpret XML components
WITHIN the geometry elements.
If you have, for example, a polygon geometry with Z values as
elevation in PostGIS you'd like to send to KML, the <altitudeMode> tag
must be present and set to absolute or relativeToGround to enable this
Z value.
This is quite different from the <Styles> tag which is separate from
the geometry in the KML schema.
You are right that this addition is not essential. As I found that I
needed these tags within my geometry elements I figured out how to use
Python and the Genshi Templating engine with XPATH to insert them. I
posted a whole page with background and an example of how I did this
on the PostGIS wiki (http://postgis.refractions.net/support/wiki/index.php?PostgisAndPython
).
However, my response after figuring out XPATH and Genshi, is that it
would ideal to just bypass that extra hack and send valid 3D geometry
directly from the AsKML() function. You don't loose anything by adding
these options. But with their addition you gain the major ease of
being able to create valid 3D KML by wrapping the PostGIS geometry
like this:
<KML header> <KML Styles> <ST_AsKML() 3D geometry from PostGIS><KML
Footer>
Cheers,
Dane
On Feb 20, 2008, at 11:20 PM, guido.lemoine at jrc.it wrote:
> In effect, this issue is about styling of KML, and not so
> much about the real data itself. I wonder whether postgis
> should be concerned with that too much.
>
> askml() produces only partial KML fragments anyway, so you
> always have to make an effort, external to postgis, to
> produce valid KML for display in GE (e.g. using XSLT).
> This may as well include styling.
>
> I'm not suggesting this is not a good idea, but IMHO, it's
> not essential.
>
> GL
>
>
>> -- Original Message --
>> From: Dane Springmeyer <blake at hailmail.net>
>> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>> Date: Tue, 19 Feb 2008 09:45:14 -0800
>> Subject: [postgis-users]
>> Re: [postgis-devel] Proposal for supporting Extrude, Tesselate,
>> and Altitudemode options in PostGIS KML generator
>> Reply-To: PostGIS Users Discussion <postgis-users at postgis.refractions.net
>> >
>>
>>
>> As far as the KML proposal and syntax, I think both Paul and Martin's
>
>> suggestions are good improvements.
>>
>>> What about providing a string parameter which can supply the various
>
>>> options in a human-readable format?
>>> E.g. "extrude=1 tesselate=0 altitudeMode=clampToGround"
>>>
>>> Easy to read, easy to parse, easy to extend...
>>
>> If I had to choose between them I think the ease of reading of this
>> approach above is the nicest, if not most grass=like.
>>
>> Thanks so much to Eduin for pulling this together.
>>
>> Anyone have more thoughts?
>>
>> Cheers,
>>
>> Dane
>> _______________________________________________
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080221/1b4ce332/attachment.html>
More information about the postgis-users
mailing list