Geometric functions available in XML syntax will be described bellow.
 

1 Geometry constructors

 

1.1 geo.fromText

Returns the specified geometry from the WKT (Well-Known Text) representation.

<geo.fromText>
    <type> *
        <type /> *
    </type>
    <coords> *
        <coords /> *
    </coords>
    <srid> *
        <srid /> *
    </srid>
</geo.fromText>
Example
Copy
<select>
    <columns>
        <geo.fromText type='LINESTRING'>
            <coords>1313 242, 0 0</coords>
            <srid>4326</srid>
        </geo.fromText>,
        <geo.fromText type='POINT'>
            <coords>1 4</coords>
            <srid>4326</srid>
        </geo.fromText>,
    </columns>
    <from table='cdataemp' />
</select>
 

1.2 geo.point2D

Returns a 2D point from the indicated coordinates (according to the WKT representation).

<geo.point2D>
    <coords> *
        <coords /> *
    </coords>
    <srid> *
        <srid /> *
    </srid>
</geo.point2D>
Example
Copy
<select>
    <columns>
        <geo.point2D>
           <coords>1313 24245</coords>
           <srid>4326</srid>
        </geo.point2D>
    </columns>
    <from table='cdataemp' />
</select>
 

1.3 geo.line

Returns a 2D line from the indicated coordinates.

<geo.line>
    <coords> *
        <coords /> *
    </coords>
    <srid> *
        <srid /> *
    </srid>
</geo.line>
Example
Copy
<select>
    <columns>
        <geo.line>
           <coords>391 294, 2489 242,42345  4543, 35 454 </coords>
           <srid>4326</srid>
        </geo.line>
    </columns>
    <from table='dual' />
</select>
 

1.4 geo.polygon

Returns a polygon from the indicated coordinates.

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