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

Create successful ePaper yourself

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

SDO_MIGRATE.TO_CURRENT<br />

Usage Notes for Object-Relational Model Upgrade<br />

All geometry objects in tabname will be upgraded so that their SDO_GTYPE <strong>and</strong><br />

SDO_ETYPE values are in the format of the current release:<br />

■ SDO_GTYPE values of 4 digits are created, using the format (dltt) shown in<br />

Table 2–1 in Section 2.2.1.<br />

■ SDO_ETYPE values are as discussed in Section 2.2.4.<br />

The procedure also orders geometries so that exterior rings are followed by their<br />

interior rings, <strong>and</strong> saves them in the correct rotation (counterclockwise for exterior<br />

rings, <strong>and</strong> clockwise for interior rings).<br />

Usage Notes for Relational Model Upgrade<br />

Examples<br />

Consider the following when using this procedure:<br />

■ The new table must be created before calling this procedure.<br />

■ The procedure converts geometries from the relational model to the<br />

object-relational model.<br />

■ A commit operation is performed by this procedure.<br />

■ If any of the upgrade steps fails, nothing is upgraded for the layer.<br />

■ layer is the underlying layer name, without the _SDOGEOM suffix.<br />

■ The old SDO_GID is stored in gidcolumn.<br />

■ SDO_GTYPE values of 4 digits are created, using the format (dltt) shown in<br />

Table 2–1 in Section 2.2.1.<br />

■ SDO_ETYPE values are created, using the values discussed in Section 2.2.4.<br />

■ The procedure orders geometries so that exterior rings are followed by their<br />

interior rings, <strong>and</strong> saves them in the correct rotation (counterclockwise for<br />

exterior rings, <strong>and</strong> clockwise for interior rings).<br />

The following example changes the definitions of geometry objects in the ROADS<br />

table from the release 8.1.5 or higher format to the format of the current release.<br />

SQL> execute sdo_migrate.to_current('ROADS');<br />

17-4 <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!