[postgis-users] how to build a polygon from line segments?

Wood Brent pcreso at pcreso.com
Thu Apr 8 08:33:48 PDT 2004


Hi,

If I have a table with line segments, is there a "build topology" operation in
PostGIS that I can carry out to create all the polygons generated by joining
all line segments with co-incident end-points?

This is pretty much the operation carried out by the Genamap GIS command
"verify".

It takes all the line features in a geometric dataset & constructs the
polygons, with errors where duplicate line segments, figure 8 errors, etc
occur.

Polygons are stored as pointers to the appropriate line segments, rather than
distinct entities, islands are identified and the poly-in-poly relationships
are determined when the topology is built.

I'm seeking a way to implement similar functionality for a PostGIS database.


Thanks,

 Brent Wood



More information about the postgis-users mailing list