|
Extrude_Tesselate_and_Altitudemode_Support
Proposal for supporting Extrude, Tesselate, and Altitudemode options in PostGIS KML generator.
OverviewAdd 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). DetailsThe 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:
<Point> <extrude>1</extrude> <tessellate>1</tessellate> <altitudeMode>absolute</altitudeMode> <coordinates>-75.5521729775749,10.4203366345305,100</coordinates> </Point> <LineString> <extrude>0</extrude> <tessellate>1</tessellate> <altitudeMode>clampToGround</altitudeMode> <coordinates>-75.5884516874785,6.23081171191744,50 -75.5925764681848,6.20903425257533,200</coordinates> </LineString> <Point> <coordinates>-75.552173,10.4203366,100</coordinates> </Point> Changes in codeTestsNew tests will be added to kml.sql to provide full compatibility of new feature. TimelineNew feature will be added before 31 march 2008. Links |
Sign in to add a comment
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?
Both [precision] and [options] are optional values. The criteria is: if integer <=15 is precision value if integer <=24 is options value
(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
hello
IS this now implemented in POSTGIS, is any body use it.
Thanks
Ihab Hijayzi
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.
Dear all,
The same question with Ihab: Have this functionality been impelemented in PostGIS? It will be a great help for me.
Thanks.
Febri