My favorites | Sign in
Project Logo
             
Search
for
Updated Feb 14, 2008 by yecarrillo
Labels: Phase-Design
Extrude_Tesselate_and_Altitudemode_Support  
Proposal for supporting Extrude, Tesselate, and Altitudemode options in PostGIS KML generator.

Overview

Add the possibility to customize KML code produced by PostGIS with altitude mode (altitudeMode), allow lines and paths to follow the terrain (tessellate), and how to connect primitive to the ground (extrude).

Details

The options will be added with a third parameter to the function:

ST_AsKML(geometry, [precision], [options])

options is an optional integer value intended to avoid ambiguous combinations:

Value extrude tessellate altitudeMode
024 False False clampToGround
025 False False relativeToGround
026 False False absolute
034 False True clampToGround
035 False True relativeToGround
036 False True absolute
124 True False clampToGround
125 True False relativeToGround
126 True False absolute
134 True True clampToGround
135 True True relativeToGround
136 True True absolute

Examples

Changes in code

Tests

New tests will be added to kml.sql to provide full compatibility of new feature.

Timeline

New feature will be added before 31 march 2008.

Links


Comment by dane.springmeyer, Feb 14, 2008

yecarrillo,

Looks great. From your matrix I see how complicated this process is due to the styling options not all being boolean (<altitudeMode>).

Once I studied it for a bit, I do agree that is will reduce overall confusion. I figure the other option would be having everything be boolean except <altitudeMode>, doing something like ST_AsKML(geometry,precision?,bool?,bool?,1/2/3?) or ST_AsKML(geometry,precision?,bool?,bool?,c/r/a?)

So, do you imagine these all being optional like precision is optional?

It seems like your examples above do not clearly differentiate whether you are specifying the precision or the first value for the options?..

Unless you've written the algorithm smart enough to assume that if there are ≥ 2 digits then options? are specified and if there is 1 digit then you are specifying precision! If so thats slick.

Otherwise an extra comma will need to be placed between the precision and options, right?

Comment by yecarrillo, Feb 14, 2008

Both [precision] and [options] are optional values. The criteria is: if integer <=15 is precision value if integer <=24 is options value

Comment by brian.darkblueb, Feb 19, 2008

(from PostGIS mailing list)

looks like you just need a bit each for extrude and tesselate and 2 bits for altitude mode 4 low bits for precision gives 0-15 so it all fits in one byte, y?

the choice of values could be easier of you avoid all of the lower 4 bits

Comment by ihabhamzi, Jul 17, 2008

hello

IS this now implemented in POSTGIS, is any body use it.

Thanks

Ihab Hijayzi

Comment by tylerickson, Nov 17, 2008

I am also interested in seeing this functionality implemented. The lack of this functionality prevents the data from being rendered in 3-D KML browsers, which is one of the main reasons to put your data in these browsers.

Comment by febriiswanto, Jul 13, 2009

Dear all,

The same question with Ihab: Have this functionality been impelemented in PostGIS? It will be a great help for me.

Thanks.

Febri


Sign in to add a comment
Hosted by Google Code