[postgis-users] How can I get points of a polygon
Kevin Neufeld
kneufeld at refractions.net
Fri Nov 16 08:38:31 PST 2007
Amrita p wrote:
>
> Hi All,
>
> I want to display all coodinates of a polygon. Is there any function
> in postgis to get the coordinate of a polygon.
>
In a round-about kind of way.
Use can use ST_ExteriorRing(...) and ST_InteriorRingN(...) to extract
the lines from the polygon.
Then use ST_PointN(...) to get the points in the LINESTRINGs.
>
>
> Is there any method to split polygon into two or more parts if
> co-odinates are given...
>
You mean split a polygon given a line that crosses? Not directly.
But you can do this:
- extract the lines that make up the polygon (as above)
- add to this your crossing line
- geomunion the lines together.
- polygonize the union-ed set
Cheers,
-- Kevin
>
>
> regards,
> Amrita
>
>
More information about the postgis-users
mailing list