25.04.2013 Views

View PDF

View PDF

View PDF

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SDO_GEOM.SDO_BUFFER<br />

Usage Notes<br />

Examples<br />

■ arc_tolerance and an arc tolerance value. See the Usage Notes for the SDO_<br />

GEOM.SDO_ARC_DENSIFY function in this chapter for more information about<br />

the arc_tolerance keyword.<br />

For example: 'unit=km arc_tolerance=0.05'<br />

If the input geometry is geodetic data and if arc_tolerance is not specified, the<br />

default value is the tolerance value multiplied by 20. Spatial uses the arc_tolerance<br />

value to perform arc densification in computing the result. If the input geometry is<br />

Cartesian or projected data, arc_tolerance has no effect and should not be<br />

specified.<br />

If this parameter is not specified for a Cartesian or projected geometry, or if the arc_<br />

tolerance keyword is specified for a geodetic geometry but the unit keyword is not<br />

specified, the unit of measurement associated with the data is assumed.<br />

This function returns a geometry object representing the buffer polygon.<br />

This function creates a rounded buffer around a point, line, or polygon, or inside a<br />

polygon. The buffer within a void is also rounded, and is the same distance from the<br />

inner boundary as the outer buffer is from the outer boundary. See Figure 1–7 for an<br />

illustration.<br />

If the buffer polygon geometry is in a projected coordinate system, it will contain arcs;<br />

and if you want to transform that geometry to a geodetic coordinate system, you must<br />

first densify it using the SDO_GEOM.SDO_ARC_DENSIFY function, and then<br />

transform the densified geometry.<br />

With geodetic data, this function is supported by approximations, as explained in<br />

Section 6.10.3.<br />

With geodetic data, this function should be used only for relatively small geometries:<br />

geometries for which the local tangent plane projection that is used for internal<br />

computations does not introduce significant distortions or errors. This limits the<br />

applicable domain of source geometries, whether line strings or polygons, to<br />

approximately the area of Texas (United States), France, or Manchuria province<br />

(China).<br />

The following example returns a polygon representing a buffer of 1 around cola_a.<br />

Note the rounded corners (for example, at .292893219,.292893219) in the returned<br />

polygon. (The example uses the non-geodetic definitions and data from Section 2.1.)<br />

-- Generate a buffer of 1 unit around a geometry.<br />

SELECT c.name, SDO_GEOM.SDO_BUFFER(c.shape, m.diminfo, 1)<br />

FROM cola_markets c, user_sdo_geom_metadata m<br />

WHERE m.table_name = 'COLA_MARKETS' AND m.column_name = 'SHAPE'<br />

AND c.name = 'cola_a';<br />

NAME<br />

--------------------------------<br />

SDO_GEOM.SDO_BUFFER(C.SHAPE,M.DIMINFO,1)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z)<br />

-------------------------------------------------------------------------------cola_a<br />

SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 8, 1, 2, 2, 5, 2, 1,<br />

7, 2, 2, 11, 2, 1, 13, 2, 2, 17, 2, 1, 19, 2, 2, 23, 2, 1), SDO_ORDINATE_ARRAY(<br />

0, 1, .292893219, .292893219, 1, 0, 5, 0, 5.70710678, .292893219, 6, 1, 6, 7, 5.<br />

70710678, 7.70710678, 5, 8, 1, 8, .292893219, 7.70710678, 0, 7, 0, 1))<br />

24-12 Oracle Spatial Developer’s Guide

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

Saved successfully!

Ooh no, something went wrong!