O'Reilly logo

Applying and Extending Oracle Spatial by Siva Ravada, Simon Gerard Greener

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exporting formats – GML, WKT, and GeoJSON

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required