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.SIMPLIFY<br />

Examples<br />

For example, the measure values in a returned LRS geometry will probably not<br />

reflect actual measures in that geometry. In this case, depending on your application<br />

needs, you might have several options after the simplification operation, such as<br />

ignoring the new measure values or redefining the new LRS geometry to reset the<br />

measure values.<br />

This function uses the Douglas-Peucker algorithm, which is explained in several<br />

cartography textbooks <strong>and</strong> reference documents. (In some explanations, the term<br />

tolerance is used instead of threshold; however, this is different from the <strong>Oracle</strong><br />

<strong>Spatial</strong> meaning of tolerance.)<br />

The returned geometry can be a polygon, line, or point, depending on the geometry<br />

definition <strong>and</strong> the threshold value. The following considerations apply:<br />

■ A polygon can simplify to a line or a point <strong>and</strong> a line can simplify to a point, if<br />

the threshold value associated with the geometry is sufficiently large. For<br />

example, a thin rectangle will simplify to a line if the distance between the two<br />

parallel long sides is less then the threshold value, <strong>and</strong> a line will simplify to a<br />

point if the distance between the start <strong>and</strong> end points is less than the threshold<br />

value.<br />

■ In a polygon with a hole, if the exterior ring or the interior ring (the hole)<br />

simplifies to a line or a point, the interior ring disappears from (is not included<br />

in) the resulting geometry.<br />

■ Topological characteristics of the input geometry might not be maintained after<br />

simplification. For a collection geometry, individual elements that did not<br />

overlap before simplification might now overlap. If overlapping of elements<br />

occurs in a multipolygon, the geometry is invalid because Open GIS<br />

Consortium rules state that polygon elements may not overlap in a<br />

multipolygon. Under certain conditions, single polygon geometries might also<br />

become invalid.<br />

The following example simplifies the road shown in Figure 7–20 in Section 7.7.<br />

Because the threshold value (6) is fairly large given the input geometry, the<br />

resulting LRS line string has only three points: the start <strong>and</strong> end points, <strong>and</strong> (12,<br />

4,12). The measure values in the returned geometry are not meaningful, because this<br />

function considers only two dimensions.<br />

SELECT SDO_UTIL.SIMPLIFY(<br />

SDO_GEOMETRY(<br />

3302, -- line string, 3 dimensions (X,Y,M), 3rd is linear ref. dimension<br />

NULL,<br />

19-32 <strong>Oracle</strong> <strong>Spatial</strong> User’s <strong>Guide</strong> <strong>and</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!