[postgis-users] merging islands with state to create single multipoly geom

Javier de la Torre jatorre at vizzuality.com
Mon Jan 14 05:24:59 PST 2013


You might find this useful too

http://blog.cleverelephant.ca/2010/11/removing-complexities.html

Best,

Javier de la Torre
@jatorre

Vizzuality / CartoDB
148 Lafayette St. PH, New York, 10013,USA
+1 347 320 7715

www.cartodb.com
Map, analyze and build applications with your data



On Jan 14, 2013, at 4:56 AM, Muhammad Imran wrote:

> 
> 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 <singh09721 at itc.nl> wrote:
> 
> From: Gaurav Singh <singh09721 at itc.nl>
> Subject: [postgis-users] merging islands with state to create single multipoly geom
> To: "postgis-users at postgis.refractions.net" <postgis-users at postgis.refractions.net>
> Cc: "postgis-users at lists.osgeo.org" <postgis-users at lists.osgeo.org>
> 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
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130114/054f23d3/attachment.html>


More information about the postgis-users mailing list