[postgis-users] Polygons from linestrings

strk at refractions.net strk at refractions.net
Fri Dec 3 02:36:17 PST 2004

On Thu, Nov 25, 2004 at 05:55:33PM +0100, michael holzmann wrote:
> hello list,
> I have the following problems with postgis..
> 1. how is it possible ( with methods like "Touches") to make Polygons or 
> MultiPolygons with Spatial touches relationships from the Linestrings below? 
> who can give me an SQL statement expample?

The upcoming postgis 1.0 contains an interface to the 'polygonize'
GEOS operation. It would be helpful to have some tests done of this kind
of stuff. If you're willing to help get a CVS snapshot of postgis 
and install geos-2.1.0, procedure basically goes:

	select polygonize(the_geom) from lines_table;

Note that postgis-1.0 uses a different internal representation
for geometries, so you'll have to use a new database for this
(a dump/reload would work for migrating data).


> 	wkb_geometry
> SRID=31494; LINESTRING(x1 y1,x2 y2)
> SRID=31494; LINESTRING(x2 y2,x3 y3)
> SRID=31494; LINESTRING(x3 y3,x4 y4)
> SRID=31494; LINESTRING(x4 y4,x1 y1)
> SRID=31494; LINESTRING(x1 y1,x5 y5)
> SRID=31494; LINESTRING(x5 y5,x6 y6)
> SRID=31494; LINESTRING(x6 y6,x2 y2)
> 5 ________________ 6
>   I                            I
>   I                            I
>   I                            I
> 1I________________I2
>   I                            I
>   I                            I
>   I                            I
> 4I________________I3
> 2. can I use with Postgis 0.8.1-1 the simple feature curve? who can show me an 
> example how it have to look in the Database.
> Thanks a lot for every hint
> michael holzmann
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list