[postgis-users] ST_Polygonize

Nicolas Ribot nicolas.ribot at gmail.com
Mon Oct 8 06:22:46 PDT 2012


Hi, I think it will depend on the way your linestrings are related to
each other.
If each linestring forms a closed polygon, then it will be easy to add
the appropriate column(s) in your select.
If several lines can form one polygon, then you will have to choose
which linestring attribute will be associated to the polygon.
You could test for a linestring to be within a polygon's exterior to
associate each linestring to a polygon.

Nicolas

On 8 October 2012 14:50, Jeff Lake <jeff at michiganwxsystem.com> wrote:
> Be gentle just learning all this
>
> I have successfully learned how to use ST_Polygonize to convert a LINESTRING
> table to POLYGON
> using this syntax, maybe could be neater..
>
> SELECT ST_AsEWKT((ST_Dump(test2.polycoll)).geom) AS geomtextrep
> FROM (SELECT ST_Polygonize(the_geom) AS polycoll
> FROM (SELECT the_geom FROM maxt) AS test)AS test2;
>
>
> now how do I identify the value of each Polygon I have??
> There is another column that identifies value of the LINESTRING
>
> --
> Jeff Lake
> MichiganWxSystem
> AllisonHouse
> GRLevelXStuff
>
> _______________________________________________
> 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