Construction of common geometric objects
This article introduces ESRI's st_geometry's geometric object construction method, which is much easier than Oracle spatial, we already know that the constructors in each sub-type of st_geometry construct geometric objects first assembled into a string in WKT format based on the parameters, and then calls the st_shapelib link library to convert the string to a binary geometric object to return, the more common method is to directly use the st_geometry constructor and use a string in WKT format as the initialization parameter:
SQL> select SDE. st_geometry ('point (1) ', 0) from dual;
SDE. st_geometry ('point (11) ', 0) (entity, numpts, Minx, miny, Maxx, Maxy, minz, maxz, minm, maxm, area, Len, SRID, points)
Bytes ------------------------------------------------------------------------------------------------------------------------
St_geometry (1, 1, 1, 1, 1, 1, null, 0, 0, '0c000000000000080a8b3d7ab1780a8b3d7ab17 ')
Examples of common geometric objects are given below. The definitions of the first two objects can be compared with those of the same objects in Oracle Spatial:
Rectangle |
Polygon (1, 5, 5, 7, 1, 7, 1 )) |
Polygon with Holes |
Polygon )) |
Point |
Point (1) |
Line |
Linestring (0 0, 1, 1, 2) |
Surface (polygon) |
Polygon (0 0, 1, 1, 0, 0 0), (2 0, 3, 1, 2, 0 )) |
Multi-Point |
Multipoint (0 0, 1 2) |
Multiline |
Multilinestring (0, 1, 2), (2, 3, 2, 5 4 )) |
Multidimensional |
Multipolygon (0, 4, 4, 0,), (1, 1), (-1-1,-1-2,-2-2, -2-1,-1-1 ))) |
Geometric object set |
Geometrycollection (point (2 3), linestring (2 3, 3 4 ))) |