Re: [postgis-users] Multipolygons to Polygon

2008-04-16 Thread David William Bitner
If you are sure that all your polygons are in actuality single polygons (you can check using numgeometries()) you can just use geometryn(geom,1) to get the data as single polygon. Note that you likely have a constraint on your table that would have to be dropped to run that in an update. You can

Re: [postgis-users] Multipolygons to Polygon

2008-04-16 Thread Kevin Neufeld
Use ST_GeometryN(geometry, int) if you're sure you only have one geometry in them. http://postgis.refractions.net/docs/ch06.html#id2964448 You can test this by: SELECT ST_NumGeometries(the_geom), count(*) FROM my_tbl GROUP BY ST_NumGeometries; If you don't have any check constraints on your tab

RE: [postgis-users] Multipolygons to Polygon

2008-04-16 Thread Randall, Eric
geometryn(the_geom,1) -Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of George Silva Sent: Wednesday, April 16, 2008 3:08 PM To: postgis-users@postgis.refractions.net Subject: [postgis-users] Multipolygons to Polygon Hello everyone, I have a

[postgis-users] Multipolygons to Polygon

2008-04-16 Thread George Silva
Hello everyone, I have a converted dataset that has only polygons, but they were imported from ArcGIS as Multipolygons. I need them to become simple polygons. (I dont have any real multi-polygons in the table - they were just imported that way. How can i convert this dataset to regular tyep polyg