sdo_gtype norāda ģeometrijas tipu · web view2015/09/01 · 7,5, 7,10, 10,10,...

35
SDO_GEOMETRY tipa objektu izmantošana grafisko datu glabāšanai (relāciju – objektu modelis) Slāņa tabula NUMURS GEOMETRIJA NOSAUKUMS Ģeometriju SDO_GEOMETRY tipa

Upload: hathien

Post on 29-Mar-2018

227 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GEOMETRY tipa objektu izmantošana grafisko datu glabāšanai (relāciju – objektu modelis)

Slāņa tabulaNUMURS

GEOMETRIJA NOSAUKUMS

Ģeometriju dati

SDO_GEOMETRY tipa objekti

Page 2: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GEOMETRY tipa objektu datu konceptuālais modelis

2

Page 3: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

Ģeometrisko objektu tips SDO_GEOMETRY un tā elementi (saskāņā ar specifikāciju Geometry Object Model for the OGIS Simple Features for SQL)

create type SDO_GEOMETRY as object( SDO_GTYPE number, SDO_SRID number, SDO_POINT SDO_POINT_TYPE, SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY, SDO_ORDINATES SDO_ORDINATE_ARRAY);

create type SDO_POINT_TYPE as object( X number, Y number, Z number);

create type SDO_ELEM_INFO_ARRAY as varray(1048576) of number;

create type SDO_ORDINATE_ARRAY as varray(1048576) of number;

3

Page 4: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

SDO_GTYPE norāda ģeometrijas tipu

SDO_GTYPE vērtība tiek norādīta ar četru simbolu palīdzību: DLTT, kurD – dimensiju skaits;L – norāde LRS (Linear Referencing System) tipa ģeometrijām. Parastām ģeometrijām vērtība – 0.TT – no 00 līdz 09 norāda ģeometrijas tipu.

SDO_GTYPE=2003 2 dimensiju poligons (3)SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1003,1, 19,2003,1)1003 – poligona ārējā kontūra2003 – poligona iekšējā kontūra19 – poligona iekšējās kontūras pirmās koordinātes kārtas numurs masīvā SDO_ORDINATES = (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10,

10,10, 10,5, 7,5).

4

Page 5: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Ģeometriju tipu norādes (SDO_GTYPE)

Kodējums Ģeometrijas tips AprakstsDL00 UNKNOWN_GEOMETRY Spatial ignores this geometry.DL01 POINT Geometry contains one point.DL02 LINE or CURVE Geometry contains one line string

that can contain straight or circular arc segments, or both. (LINE and CURVE are synonymous in this context.)

DL03 POLYGON or SURFACE Geometry contains one polygon with or without holes or one surface consisting of one or more polygons. In a three-dimensional polygon, all points must be on the same plane.

DL04 COLLECTION Geometry is a heterogeneous collection of elements. COLLECTION is a superset that includes all other types.

DL05 MULTIPOINT Geometry has one or more points. (MULTIPOINT is a superset of POINT.)

DL06 MULTILINE or MULTICURVE

Geometry has one or more line strings. (MULTILINE and MULTICURVE are synonymous in this context, and each is a superset of both LINE and CURVE.)

DL07 MULTIPOLYGON or MULTISURFACE

Geometry can have multiple, disjoint polygons (more than one exterior boundary). or surfaces (MULTIPOLYGON is a superset

5

Page 6: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Kodējums Ģeometrijas tips Aprakstsof POLYGON, and MULTISURFACE is a superset of SURFACE.)

DL08 SOLID Geometry consists of multiple surfaces and is completely enclosed in a three-dimensional space. Can be a cuboid or a frustum.

DL09 MULTISOLID Geometry can have multiple, disjoint solids (more than one exterior boundary). (MULTISOLID is a superset of SOLID.)

6

Page 7: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

SDO_SRID norāda izmantojamo koordināšu sistēmu

Parasti netiek izmantots. Vērtība = 0.

SDO_GTYPE = 2003 2 dimensiju poligons (3)SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1003,1, 19,2003,1)1003 – poligona ārējā kontūra2003 – poligona iekšējā kontūra19 – poligona iekšējās kontūras pirmās koordinātes kārtas numurs masīvā SDO_ORDINATES = (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5).

7

Page 8: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

SDO_POINT norāda punkta koordināšu vērtības

create type SDO_POINT_TYPE as object( X number, Y number, Z number);

SDO_GTYPE = 2001 2 dimensiju punkts (1) SDO_SRID = NULLSDO_POINT = SDO_POINT_TYPE(12, 14, NULL) 2 punkta koordinātesSDO_ELEM_INFO = NULLSDO_ORDINATES = NULL

insert into GEOMETRIJAS values (90, SDO_GEOMETRY(2001, NULL,SDO_POINT_TYPE(12, 14, NULL), NULL, NULL), '1. punkts');select *from GEOMETRIJAS c where c.GEOMETRIJA.SDO_POINT.X = 12;G_NUM GEOMETRIJA(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES G_NOS---------------------------------------------------------------------------------------------------------------------- 90 SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(12, 14, NULL), NULL, NULL) 1. punkts

8

Page 9: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

SDO_ORDINATES – ģeometriju definējošo punktu koordināšu (ne tikai ordināšu) norādīšana

. . . SDO_ORDINATES SDO_ORDINATE_ARRAY,. . .

create type SDO_ORDINATE_ARRAY as varray(1048576) of number;Divu dimensiju ģeometrijām:{X1, Y1, X2, Y2, X3, Y3, X4, Y4, X1, Y1}. Triju dimensiju ģeometrijām:{X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, X4, Y4, Z4, X1, Y1, Z1}.

SDO_GTYPE = 2003 2 dimensiju poligons (3)SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1003,1, 19,2003,1)1003 – poligona ārējā kontūra2003 – poligona iekšējā kontūra19 – poligona iekšējās kontūras pirmās koordinātes kārtas numurs masīvā SDO_ORDINATES = (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5).

9

Page 10: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE

SDO_SRID

SDO_POINT

SDO_ELEM_INFO--------------------------------------SDO_STARTING_OFFSET

SDO_ETYPESDO_INTERPRETATION

SDO_ORDINATES----------------------X1,Y1,X2,Y2, ...

SDO_ELEM_INFO definē ģeometrijas elementa aprakstu

Ģeometrijas elementa apraksts tiek definēts un pierakstīts kā viens vai vairāki tripleti (trīs skaitļi atdalīti ar komatu): N, M, Z, N, M, Z, …

N - SDO_STARTING_OFFSET tipa objekts. Pirmās izmantojamās koordinātes pozīcija SDO_ORDINATES masīvā. Parasti sākumā tiek izmantota pirmā vērtība: SDO_GEOMETRY.SDO_ORDINATES(1).

M - SDO_ETYPE tipa objekts. Norāda elementa tipu:1, 2, 1003, 2003 – vienkārši elementi; 4, 1005, 2005 – salikti elementi.

1003 un 2003, pirmais cipars norāda ārējais (1) vai iekšējais (2) elements.1003 – ārejais poligona kontūrs (apejas virziens: pretēji pulkstenim).2003 – iekšējais poligona kontūrs (apejas virziens: pulkteņrādītāja virzienā).

Z - SDO_INTERPRETATION norāda pieraksta interpretāciju:1) ja ir salikts elements (4, 1005, or 2005), norāda tripletu skaitu;2) ja nav salikts elements (1, 2, 1003, or 2003), norāda elementa

sastāvdaļu tipu (piemēram, taisnas līnijas vai loki).

10

Page 11: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_GTYPE = 2003 2 dimensiju poligons (3)SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1003,1, 19,2003,1)1 – arējā poligona pirmā izmantojamā koordināte1003 – ārējais kontūrs pologons1 – punktu savienojums taisna līnija

19 – iekšējā kontūra pirmās koordinātes kārtas numurs masīvā 2003 – iekšējā kontūra poligons

1 – punktu savienojums taisna līnijaSDO_ORDINATES = (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5).

11

Page 12: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_ELEM_INFO sastāvdaļu vērtības

SDO_ETYPE

SDO_INTERPRETATION Paskaidrojums (angliski)

1 1 Point type.1 0 Orientation for an oriented point. 1 n > 1 Point cluster with n points.2 1 Line string whose vertices are connected by straight

line segments.2 2 Line string made up of a connected sequence of

circular arcs.Each circular arc is described using three coordinates: the start point of the arc, any point on the arc, and the end point of the arc. The coordinates for a point designating the end of one arc and the start of the next arc are not repeated. For example, five coordinates are used to describe a line string made up of two connected circular arcs. Points 1, 2, and 3 define the first arc, and points 3, 4, and 5 define the second arc, where point 3 is only stored once.

1003 or 2003

1 Simple polygon whose vertices are connected by straight line segments. You must specify a point for each vertex; and the last point specified must be exactly the same point as the first (within the tolerance value), to close the polygon. For example, for a 4-sided polygon, specify 5 points, with point 5 the same as point 1.

1003 or 2003

2 Polygon made up of a connected sequence of circular arcs that closes on itself. The end point of the last arc is the same as the start point of the first arc.Each circular arc is described using three coordinates: the start point of the arc, any point on the arc, and the end point of the arc. The coordinates for a point designating the end of one arc and the start of the next arc are not repeated. For example,

12

Page 13: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_ETYPE

SDO_INTERPRETATION Paskaidrojums (angliski)

five coordinates are used to describe a polygon made up of two connected circular arcs. Points 1, 2, and 3 define the first arc, and points 3, 4, and 5 define the second arc. The coordinates for points 1 and 5 must be the same (tolerance is not considered), and point 3 is not repeated.

1003 or 2003

3 Rectangle type (sometimes called optimized rectangle). A bounding rectangle such that only two points, the lower-left and the upper-right, are required to describe it. The rectangle type can be used with geodetic or non-geodetic data. However, with geodetic data, use this type only to create a query window (not for storing objects in the database).

1003 or 2003

4 Circle type. Described by three distinct non-colinear points, all on the circumference of the circle.

4 n > 1 Compound line string with some vertices connected by straight line segments and some by circular arcs. The value n in the Interpretation column specifies the number of contiguous subelements that make up the line string.The next n triplets in the SDO_ELEM_INFO array describe each of these subelements. The subelements can only be of SDO_ETYPE 2. The last point of a subelement is the first point of the next subelement, and must not be repeated.

1005 or 2005

n > 1 Compound polygon with some vertices connected by straight line segments and some by circular arcs. The value n in the Interpretation column specifies the number of contiguous subelements that make up the polygon.The next n triplets in the SDO_ELEM_INFO array describe each of these subelements. The subelements can only be of SDO_ETYPE 2. The end point of a subelement is the start point of the next subelement, and it must not be repeated. The start and end points of the polygon must be exactly the same point

13

Page 14: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

SDO_ETYPE

SDO_INTERPRETATION Paskaidrojums (angliski)

(tolerance is ignored).1006 or 2006

n > 1 Surface consisting of one or more polygons, with each edge shared by no more than two polygons. A surface contains an area but not a volume. The value n in the Interpretation column specifies the number of polygons that make up the surface.The next n triplets in the SDO_ELEM_INFO array describe each of these polygon subelements.A surface can be two-dimensional or three-dimensional..

1007 n = 1 or 3 Solid consisting of multiple surfaces that are completely enclosed in a three-dimensional space, so that the solid has an interior volume. A solid element can have one exterior surface defined by the 1006 elements and zero or more interior boundaries defined by the 2006 elements. The value n in the Interpretation column must be 1 or 3.Subsequent triplets in the SDO_ELEM_INFO array describe the exterior 1006 and optional interior 2006 surfaces that make up the solid element.If n is 3, the solid is an optimized box, such that only two three-dimensional points are required to define it: one with minimum values for the box in the X, Y, and Z dimensions and another with maximum values for the box in the X, Y, and Z dimensions. For example:SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1007,3), SDO_ORDINATE_ARRAY(1,1,1, 3,3,3))

14

Page 15: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Ģeometrijas objekta definēšanas piemērs. Tainstūris (rectangle)

SDO_GTYPE = 2003 2 dimensiju poligons (3) SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1, 1003, 3) 1 – pirmā koordināte1003 – viens poligons3 – taisnstūrisSDO_ORDINATES = (1,1, 5,7).Kreisais apakšējais un labai augšējais punkts

insert into GEOMETRIJAS values(21, 'taisnstūris', SDO_GEOMETRY(2003, NULL, NULL,SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(1,1, 5,7) ));

Page 16: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Poligons ar caurumu (gredzens) (ne divi poligoni)

SDO_GTYPE = 2003 2 dimensiju poligons (3)SDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1003,1, 19,2003,1)1003 – poligona ārējā kontūra2003 – poligona iekšējā kontūra19 – poligona iekšējās kontūras pirmās koordinātes kārtas numurs masīvā SDO_ORDINATES = (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5).

insert into GEOMETRIJAS values(6, SDO_GEOMETRY( 2003, -- divu dimensiju poligons NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1, 19,2003,1), -- poligons ar caurumu SDO_ORDINATE_ARRAY(2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4, 7,5, 7,10, 10,10, 10,5, 7,5) ), '1. gredzns' );

Pirmā jadefinē poligona ārējā kontūra.

16

Page 17: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Salikta (compaund) līnija

SDO_GTYPE = 20022 dimensiju līniju segmenti (2) SDO_SRID = NULL.SDO_POINT = NULL.SDO_ELEM_INFO = (1,4,2, 1,2,1, 3,2,2).

1,4,2 – salikta līnija no diviem elementiem1,2,1 – taisnu līniju segments, koordinātes sākas ar pirmo pozīciju (1)3,2,2 – loks, koordinātes sākas ar 3 pozīciju

SDO_ORDINATES = (10,10, 10,14, 6,10, 14,10).

insert into GEOMETRIJAS values(11, SDO_GEOMETRY( 2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,4,2, 1,2,1, 3,2,2), SDO_ORDINATE_ARRAY(10,10, 10,14, 6,10, 14,10) ), 'salikta līnija' );

17

Page 18: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Salikts (compaund) poligons

SDO_GTYPE = 2003 2 dimesiju poligonsSDO_SRID = NULLSDO_POINT = NULLSDO_ELEM_INFO = (1,1005,2, 1,2,1, 5,2,2)1,1005,2 – salikts poligons no 2 līniju segmentiem1,2,1 – pirmais segments taisnas līnijas un koordinātes sākas no pozīcijas 15,2,2 – loks, koordinātes sākas no pozīcijas 5SDO_ORDINATES = (6,10, 10,1, 14,10, 10,14, 6,10).

insert into GEOMETRIJAS values(12, SDO_GEOMETRY(2003, NULL, NULL,SDO_ELEM_INFO_ARRAY(1,1005,2, 1,2,1, 5,2,2), SDO_ORDINATE_ARRAY(6,10, 10,1, 14,10, 10,14, 6,10) ), 'salikts poligons');

18

Page 19: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

Type 0 (Zero) Element

Type 0 (zero) elements are used to model geometry types that are not supported by Oracle Spatial, such as curves and splines. A type 0 element has an SDO_ETYPE value of 0. Type 0 elements are not indexed by Oracle Spatial, and they are ignored by Spatial functions and procedures.Geometries with type 0 elements must contain at least one nonzero element, that is, an element with an SDO_ETYPE value that is not 0. The nonzero element should be an approximation of the unsupported geometry, and therefore it must have both:- An SDO_ETYPE value associated with a geometry type supported by Spatial- An SDO_INTERPRETATION value that is valid for the SDO_ETYPE value.(The SDO_INTERPRETATION value for the type 0 element can be any numeric value, and applications are responsible for determining the validity and significance of the value.)The nonzero element is indexed by Spatial, and it will be returned by the spatial index.The SDO_GTYPE value for a geometry containing a type 0 element must be set to the value for the geometry type of the nonzero element.Figure shows a geometry with two elements: a curve (unsupported geometry) and a rectangle (the nonzero element) that approximates the curve. The curve looks like the letter S, and the rectangle is represented by the dashed line.

The SDO_GTYPE value for the geometry is 2003 (for a two-dimensional polygon).The SDO_ELEM_INFO array contains two triplets for this compound line string. For example, the triplets might be {(1,0,57), (11,1003,3)}. That is:Ordinate Starting Offset (SDO_STARTING_OFFSET)

Element Type (SDO_ETYPE)

Interpretation (SDO_INTERPRETATION)

1 0 5711 1003 3

In this example:- The type 0 element has an SDO_ETYPE value of 0.- The nonzero element (rectangle) has an SDO_ETYPE value of 1003, indicating an exterior polygon ring.

19

Page 20: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

- The nonzero element has an SDO_STARTING_OFFSET value of 11 because ordinate x6 is the eleventh ordinate in the geometry.- The type 0 element has an SDO_INTERPRETATION value whose significance is application-specific. In this example, the SDO_INTERPRETATION value is 57.- The nonzero element has an SDO_INTERPRETATION value that is valid for the SDO_ETYPE of 1003. In this example, the SDO_INTERPRETATION value is 3, indicating a rectangle defined by two points (lower-left and upper-right).Example shows a SQL statement that inserts the geometry with a type 0 element into the database. In the SDO_ORDINATE_ARRAY structure, the curve is defined by points (6,6), (12,6), (9,8), (6,10), and (12,10), and the rectangle is defined by points (6,4) and (12,12).

INSERT INTO cola_markets VALUES(13, 'type_zero_element_geom', SDO_GEOMETRY( 2003, -- two-dimensional polygon NULL, NULL, SDO_ELEM_INFO_ARRAY(1,0,57, 11,1003,3), -- 1st is type 0 element SDO_ORDINATE_ARRAY(6,6, 12,6, 9,8, 6,10, 12,10, 6,4, 12,12) ) );

20

Page 21: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

21

Page 22: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

22

Page 23: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

23

Page 24: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

24

Page 25: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

25

Page 26: SDO_GTYPE norāda ģeometrijas tipu · Web view2015/09/01 · 7,5, 7,10, 10,10, 10,5, 7,5). Ģeometriju tipu norādes (SDO_GTYPE) Kodējums Ģeometrijas tips Apraksts DL00 UNKNOWN_GEOMETRY

26