Hi Gaurav,

You can try the following query,

SELECT gid, ST_Collect(ST_ExteriorRing(the_geom)) AS erings
        FROM (SELECT gid, (ST_Dump(the_geom)).geom As the_geom
                        FROM sometable) As foo
GROUP BY gid;

--3d Example
SELECT ST_AsEWKT(
        ST_ExteriorRing(
        ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 0 1))')
        )
);

regards
- Imran

--- On Mon, 1/14/13, Gaurav Singh <[email protected]> wrote:

From: Gaurav Singh <[email protected]>
Subject: [postgis-users] merging islands with state to create single multipoly 
geom
To: "[email protected]" 
<[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Monday, January 14, 2013, 5:54 PM

Hi All,  I have a multipologon geometry of a state with islands as shown in 
attached Fig1 and I want to convert that state boundary by merging  the islands 
and filling the gaps as shown in Fig2. Can someone please tell me how can I get 
the Fig2.  Thanks Gaurav 
-----Inline Attachment Follows-----

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to