Hi George, There is a simple example of a script using topology on the wiki at: http://trac.osgeo.org/postgis/wiki/UsersWikiTopologyExample & more help at http://trac.osgeo.org/postgis/wiki/UsersWikiPostgisTopology
The attached script was written to take the New Zealand mainland coastline comprised of various linestrings which had small gaps between them in some cases, & build a polygon from them. To do this it iterated through the linestrings, loading them into the topology one at a time with a small snapping distance to ensure all the start/end nodes aligned correctly. It also loads data from various shapefiles of island polygons into the table & exports a shapefile of the entire national coastline as polygons. I think you can pull out the appropriate SQL commands from this to do what you are asking about. I haven't tried this with multilinestrings, only single linestrings. If you need additional help, feel free to ask, though I'm just learning the topology stuff myself. Cheers, Brent Wood --- On Wed, 5/16/12, george wash <gws...@hotmail.com> wrote: From: george wash <gws...@hotmail.com> Subject: Re: [postgis-users] Closing polylines To: pcr...@pcreso.com Date: Wednesday, May 16, 2012, 12:28 PM On 5/16/2012 4:16 AM, pcr...@pcreso.com wrote: You can work around this problem by using the Postgis topology capability. It will build polygons (faces) from such lines which you can use as topopolygons or extract as conventional geometries. --- On Tue, 5/15/12, george wash <gws...@hotmail.com> wrote: thank you pcreso, I had a look at the topology section of the PostGIS manual, but I must admit I am going to need some guidance as to how to proceed as I never used it before. Given the attachment in my earlier post, which is a dump of a simple geometry table in the public schema, how do you suggest I proceed with creating the topology and how do I then extract the closed contours from it? Many thanks
mk_coast
Description: Binary data
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users