1 Geometry outputs

 

1.1 geo.asWkt

Returns the geometry in WKT (Well-Known Text) format.

<geo.asWkt>
    <geom_column /> *
</geo.asWkt>
Example
Copy
<select>
    <columns>
        <geo.asWkt>a.the_geom</geo.asWkt>
    </columns>
    <from table='dual' alias='a' />
</select>
 

1.2 geo.asWkb

Returns the geometry in WKB (Well-Known Binary) format

<geo.asWkb>
    <geom_column /> *
</geo.asWkb>
Example
Copy
<select>
    <columns>
        <geo.asWkb>a.the_geom</geo.asWkb>,
         <geo.asWkb>
            <geo.polygon>
               <coords>0 0,0 1,1 1,1 0,0 0</coords>
               <srid>4326</srid>
            </geo.polygon>
         </geo.asWkb>
    </columns>
    <from table='dual' alias='a' />
</select>
 

1.3 geo.asKml

Returns the geometry in KML format.

<geo.asKml>
    <geom_column /> *
</geo.asKml>
Example
Copy
<select>
    <columns>
        <geo.asKml>a.the_geom</geo.asKml>
    </columns>
    <from table='dual' alias='a' />
</select>
 

1.4 geo.asGml

Returns the geometry in GML format.

<geo.asGml>
    <geom_column /> *
</geo.asGml>
Example
Copy
<select>
    <columns>
        <geo.asGml>a.the_geom</geo.asGml>
    </columns>
    <from table='dual' alias='a' />
</select>
 

1.5 geo.asSvg

Returns the geometry in SVG format. In particular, it returns the content of the "d" attribute of the tag "<svg:path d='' .... >".

<geo.asSvg>
    <geom_column /> *
</geo.asSvg>
Example
Copy
<select>
    <columns>
        <geo.asSvg>a.the_geom</geo.asSvg>
    </columns>
    <from table='dual' alias='a' />
</select>
 

1.6 geo.asGeoJSON

Returns the geometry in asGeoJSON format.

<geo.asGeoJSON>
    <geom_column /> *
</geo.asGeoJSON>
Example
Copy
<select>
    <columns>
        <geo.asGeoJSON>a.the_geom</geo.asGeoJSON>
    </columns>
    <from table='roads' alias='a' />
</select>