Oracle DB 11g spatial data-sdo_geometry type

Source: Internet
Author: User
Sdo_geometry Is the most basic type of spatial data, which is used to store geometric shapes. Definition:

CreateType Sdo_geometryAsObject

(

Sdo_gtypeNumber,

Sdo_sridNumber,

Sdo_pointSdo_point_type,

Sdo_elem_infoSdo_elem_info_array,

Sdo_ordinatesSdo_ordinate_array

MemberFunction Get_gtypeReturnNumberDeterministic,

MemberFunction Get_dimsReturnNumberDeterministic,

MemberFunction Get_lrs_dimReturnNumberDeterministic

);

Including5Attributes and3Functions.

Sdo_gtype

Sdo_gtypeUsed to defineSdo_geometryIs composed of four digits:

UThe first digit represents the dimension, which can be two-dimensional, three-dimensional, or four-dimensional;

USecond-digit IDLinear referencing system (LRS), NonLRSType, this value is0;

UThe third and fourth digits represent the shape, from00To09Total10Type.00-Ignore this shape;01-Point;02-Line;03-Polygon or surface;04-Type set;05-01A set of data types, including multi-point sets;06-02Type set;07-03Type set;08-Body (a space enclosed by multiple faces in a 3D space );09-08Type set;

Sdo_srid

Coordinate SystemID, You canMDSYS. sdo_coord_ref_sysCoordinate information is found in the table.

Sdo_point

IfSdo_ele_infoAndSdo_ordinatesThe property is empty. This property is not empty, indicating that the geometric shape is "point ".

"Point" is a special type. IfSdo_ele_infoAndSdo_ordinatesThe property is not empty, even ifSdo_pointWill be ignored.Sdo_point_typeTypeX, Y, ZDefines the coordinates of a point. If it is a two-dimensional point,ZThe value isNull.

In addition, the directed point is not used.Sdo_typeAttribute.

Sdo_ordinates

This attribute is an array containing all coordinate points in the geometric shape. For example, in a two-dimensional system,Sdo_ordinates (5, 4, 2, 12, 8, 15, 3, 7)Contains four vertices:(5, 4); (2, 12); (8, 15); (3, 7).

Sdo_elem_info

Sdo_elem_infoRepresents the information of elements in a geometric shape. The most basic element is a point. For exampleCubeBody contains multiple surface elements. An element can also contain its own child element.

The information of an element is an array with three numbers. For example(1, 1003, 1, 4, 2003, 1)Contains two elements. The first element is(1, 1003, 1)The second element is(4, 2003, 1). The meaning of each array is as follows:

UThe first number represents the element inSdo_ordinatesStarting offset in. For exampleSdo_ordinatesYes(5, 4, 2, 12, 8, 15, 3, 7)The starting offset of the element is5, Then(8, 15)Is the first vertex of an element. If the element is connected, the offset at the last point of the element is the starting offset of the next element, as shown in figure(8, 15)It is the end point of an element and also the starting point of the next element.

UThe second number represents the element type, with a maximum of four digits. If an element is a composite type, it is followed by its child element.

UThe third number refers to how elements are interpreted. Indicates the number of child elements of a composite element. For a single element, we usually further explain the element type, such(1, 1003, 3)Represents a rectangle,(1, 1003, 4)Circle ......

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.