ST_Polygon

Definition

The ST_Polygon accessor function takes a well-known text (WKT) representation and a spatial reference ID (SRID) and generates an ST_Polygon.

NoteNote:

When creating spatial tables that will be used with ArcGIS, it is best to create the column as ST_Geometry rather than specifying an ST_Geometry subtype, such as ST_Polygon.

Syntax

Oracle

sde.st_polygon (wkt clob, srid integer)

PostgreSQL

sde.st_polygon (wkt, srid integer)
sde.st_polygon (esri_shape bytea, srid integer)

Return type

ST_Polygon

Example

The following CREATE TABLE statement creates the polygon_test tables, which have a single column, p1. Then the INSERT statement converts a ring (a polygon that is both closed and simple) into an ST_Polygon and inserts it into the p1 column using the ST_Polygon function.

CREATE TABLE polygon_test (p1 sde.st_geometry);

INSERT INTO polygon_test VALUES (  
sde.st_polygon ('polygon ((10.01 20.03, 20.94 21.34, 35.93 10.04, 10.01 
20.03))', 0)
);

2/5/2013