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.

Figure 7–7 Creating a Geometric Segment<br />

Indexing of LRS Data<br />

In Figure 7–7, the geometric segment has the following definition (with measure<br />

values underlined):<br />

SDO_GEOMETRY(3302, NULL, NULL,<br />

SDO_ELEM_INFO_ARRAY(1,2,1),<br />

SDO_ORDINATE_ARRAY(5,10,0, 20,5,NULL, 35,10,NULL, 55,10,100))<br />

Whenever a geometric segment is defined, its start <strong>and</strong> end measures must be<br />

defined or derived from some existing geometric segment. The unsigned measures<br />

of all shape points on a geometric segment will be automatically populated.<br />

The LRS API works with geometries in formats of <strong>Oracle</strong> <strong>Spatial</strong> before release<br />

8.1.6, but the resulting geometries will be converted to the <strong>Oracle</strong> <strong>Spatial</strong> release<br />

8.1.6 or higher format, specifically with 4-digit SDO_GTYPE <strong>and</strong> SDO_ETYPE<br />

values. For example, in <strong>Oracle</strong> <strong>Spatial</strong> release 8.1.6 <strong>and</strong> higher, the geometry type<br />

(SDO_GTYPE) of a spatial object includes the number of dimensions of the object as<br />

the first digit of the SDO_GTYPE value. Thus, the SDO_GTYPE value of a point is 1<br />

in the pre-release 8.1.6 format but 2001 in the release 8.1.6 format (the number of<br />

dimensions of the point is 2). However, an LRS point (which includes measure<br />

information) has three dimensions, <strong>and</strong> thus the SDO_GTYPE of any point<br />

geometry used with an LRS function must be 3301.<br />

7.3 Indexing of LRS Data<br />

Start Measure<br />

(5, 10, 0) (35, 10, NULL)<br />

End Measure<br />

(55, 10, 100)<br />

Start Point End Point<br />

(20, 5, NULL)<br />

If LRS data has four dimensions (three plus the M dimension) <strong>and</strong> if you need to<br />

index all three non-measure dimensions, you must use a spatial R-tree index to<br />

index the data, <strong>and</strong> you must specify PARAMETERS('sdo_indx_dims=3') in the<br />

CREATE INDEX statement to ensure that the first three dimensions are indexed.<br />

Note, however, that if you specify an sdo_indx_dims value of 3 or higher, the<br />

only <strong>Spatial</strong> operator that can be used on the indexed geometries is SDO_FILTER;<br />

the other operators described in Chapter 12 cannot be used. (The default value for<br />

the sdo_indx_dims keyword is 2, which would cause only the first two<br />

dimensions to be indexed.) For example, if the dimensions are X, Y, Z, <strong>and</strong> M,<br />

specify sdo_indx_dims=3 to index the X, Y, <strong>and</strong> Z dimensions, but not the measure<br />

Linear Referencing System 7-9

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

Saved successfully!

Ooh no, something went wrong!