How to insert polygon with hole in WKT (well known text) format into postgis table?
10,131
Take a look at ST_MakePolygon
:
Author by
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I have a table in postgis, which has 4 columns: ID, name, the_geom, SRID. I need to write an SQL query which will insert this exterior polygon (Element 1) in the table named "woods", ID = 44, the name of that exterior polygon is "oak", and SRID is "4412".
The coordinate values for Element 1 and Element 2 (the hole): Element 1= [P1(6,15), P2(10,10), P3(20,10), P4(25,15), P5(25,35), P6(19,40), P7(11,40), P8(6,25), P1(6,15)] Element 2= [H1(12,15), H2(15,24)]
Here is the image: http://download.oracle.com/docs/html/A85337_01/sdo_objb.gif