10.12.2012 Views

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SDO_UTIL.REMOVE_DUPLICATE_VERTICES<br />

Format<br />

Description<br />

Parameters<br />

Usage Notes<br />

Examples<br />

SDO_UTIL.REMOVE_DUPLICATE_VERTICES<br />

geometry IN SDO_GEOMETRY,<br />

tolerance IN NUMBER<br />

) RETURN SDO_GEOMETRY;<br />

Removes duplicate (redundant) vertices from a geometry.<br />

geometry<br />

Geometry from which to remove duplicate vertices.<br />

tolerance<br />

Tolerance value (see Section 1.5.5).<br />

SDO_UTIL.REMOVE_DUPLICATE_VERTICES<br />

When two consecutive vertices in a geometry are the same or within the tolerance<br />

value associated with the geometry, <strong>Spatial</strong> considers the geometry to be invalid.<br />

The <strong>Spatial</strong> geometry validation functions return the error ORA-13356 in these<br />

cases. You can use the REMOVE_DUPLICATE_VERTICES function to change such<br />

invalid geometries into valid geometries.<br />

If the input geometry does not contain any duplicate vertices, it is returned.<br />

The following example removes a duplicate vertex from the input geometry, which<br />

is the same geometry as cola_b (see Figure 2–1 <strong>and</strong> Example 2–1 in Section 2.1)<br />

except that it has been deliberately made invalid by adding a third vertex that is the<br />

same point as the second vertex (8,1).<br />

SELECT SDO_UTIL.REMOVE_DUPLICATE_VERTICES(<br />

SDO_GEOMETRY(<br />

2003, -- two-dimensional polygon<br />

<strong>Spatial</strong> Utility Subprograms 19-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!