Hi,
in the OWS5 OGC thread we're experimenting with an extension to
TextSymbolizer that would allow for better control on the generated
KML.
One of the extensions should allow for the specification or
arbitrary text bits that the server will interpret and use according
to the output format. This could be used as a replacement for time
templates, and for extrudes. For example:
<sld:TextSymbolizer>
<sld:OtherText target="kml:extrude">
<ogc:PropetyName>height</ogc:propertyName>
</sld:OtherText>
</sld:TextSymbolizer>
to specify the height of the current geometry. Now, to actually
encode this I have to:
* encode the z among the coordinates
* add a few elements between the geometry tags, for example:
<Polygon>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-122.366278,37.818844,30
-122.365248,37.819267,30
-122.365640,37.819861,30
-122.366669,37.819429,30
-122.366278,37.818844,30
</coordinates>
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>
-122.366212,37.818977,30
-122.365424,37.819294,30
-122.365704,37.819731,30
-122.366488,37.819402,30
-122.366212,37.818977,30
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
As you can see I'm going out of the gml spec. For the
normal kml output I know how to handle this, I just need
to modify a few methods in the old style encoders and preprocess
the geometry so that the z coordinate in the geometries is
filled.
But ows5 kml output uses GML3 encoding as well, and here
come the troubles, because xml-xsd is schema driven, and
we're going out of the schema here. What do I have to do
in order to inject the extra elements into the geometry
encoding? Are propertyExtractors a solution?
Please keep in mind that I won't be adding the extra
attributes to all features, but only to those whose
text symbolizer specifies an extrusion.
Well, let me know. Chris, if doing the gml3 version is too
hard, what about adding a parameter that controls the
kind of geometry that we output, and do the extrusion
only for gml2?
Cheers
Andrea