Postgis - convert multipolygon to multilinestring

المشرف العام

Administrator
طاقم الإدارة
I try to convert my multipolygon layer to multilinestring - here: http://postgis.refractions.net/docs/ST_ExteriorRing.htmlI found example:

"(...)--If you have a table of MULTIPOLYGONs--and want to return a MULTILINESTRING composed of the exterior rings of each polygonSELECT gid, ST_Collect(ST_ExteriorRing(the_geom)) AS erings FROM (SELECT gid, (ST_Dump(the_geom)).geom As the_geom FROM sometable) As fooGROUP BY gid;(...)"

My postgresql connection calls -"database", schema-"public", default primary key field - "gid", default geometry field -"geom", my multipolygon layer- "poly_layer". How will look sql code above, with my data- if I'd like to convert "poly_layer" into new multilinestring layer "line_layer"?

Thanks for response

Piotr Kania



أكثر...
 
أعلى