st_polygon.sql 506 B

123456789101112
  1. -- The following CREATE TABLE statement creates the polygon_test
  2. -- tables, which has a single column, p1.
  3. CREATE TABLE polygon_test (p1 ST_polygon);
  4. -- The INSERT statement converts a ring (a ST_LineString that is both
  5. -- closed and simple) into a ST_Polygon and inserts it into the p1 column
  6. -- using the ST_LineFromText function within the ST_Polygon function.
  7. INSERT INTO polygon_test VALUES(
  8. ST_Polygon(ST_LineFromText('linestring (10.01 20.03, 20.94 21.34, 35.93 10.04, 10.01 20.03)',1000))
  9. );