{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SELECT SDO_GEOM.SDO_INTERSECTION(C_a.shape, C7C.shape, 0.005) FROM cola_markets c_a, cola_markets C_c WHERE c_a.name = 'cola_a' AND c_c.name : 'colaic'; SELECT SDO_GEOM.SDO_DISTANCE(c_b.shape,c_d.shape,0.005) FROM cola_markets c_b, cola_markets c_d WHERE c_b.name = 'cola_b' AND c_d.name 1 'cola_d'; SELECT name FROM cola markets c WHERE c.shape.SDO~GTYPE = 2003; up z,\:v CU no %cat cola5.sql —— a certain number of access functions are present SET SERVEROUTPUT ON desc MDSYS.SDOiGEOMETRY —- note that SDOiGEOMETRY has member fns GET_GTYPE(),GET_DIMS() DECLARE -- the following declares a shape type colaInfo colaflmarkets.shape%type; BEGIN SELECT c.shape INTO colaInfo FROM co;a_markets c WHERE c.name ='cola_d'; ~— now we can apply a supplied function for SDO_GEOMETRY objects //,‘ 21 DBMSioUTPUT.PUT_LINE('gtype is ' I! colaInfo.GETwGTYPE()); ’ 1V BMSioUTPUT.PUT7LINE('dimensions is ' |\colaInfo.GET_DIMS()); E I D , D J'1_u. SHOW ERRORS SELECT name, SDO_GEOM.SDOHAREA(shape, 0.005) FROM colaimarkets; SELECT SDO_GEOM.SDO_INTERSECTION(c_a.shape, c_c.shape, 0.005) FROM colaimarkets cfla, colaimarkets c_C WHERE c_a.name = 'colaia' AND c_c.name = 'colawc'; %cat cola6.sql —— This illustrates the use of some 'new' methods in SDOiGEOMETRY. —— Get7WKT and Get7WKB can create these spatial formats from the entries —— in colaimarkets, and capture them in suitable variables in PL/SQL ,, Then we can use the two new constructors to enter these values into —— cola markets with new names. DECLARE cola_b_wkb BLOB; cola_b_wkt_clob CLOB; coia_b_wkt_varchar VARCHAR2(255); colagbygeom SDO_GEOMETRY; BEGIN —— Get colaib geometry into CLOB, VARCHARZ, and BLOB objects, A w w w l l i x § 4:; T ...
View Full Document

{[ snackBarMessage ]}