Oracle Spatial provides different types of converters to convert the geometry data to GML (both Version 2.1 and Version 3.1.1), KML, and the well-known text and binary (WKT and WKB) representations. These converters are provided as PL/SQL functions and Java APIs. In this section, we will show examples of using these converters to generate GML and KML documents. The WKT and WKB examples will be very similar and are left as an exercise for the reader.
We first look at the KML converter using the following SQL example:
Select SDO_UTIL.To_Kmlgeometry(geom) gml_feature From land_parcels Where fid= 16; GML_FEATURE -------------------------------------------------------------------- <Polygon><extrude>0</extrude><tessellate>0</tessellate><altitudeMode>relativeToGround</altitudeMode><outerBoundaryIs><LinearRing> <coordinates>6006491.42346619,2121789.41749893 6006423.35503277,2121779.7587256 6006442...