[postgis-users] Longest axis of a polygon

Christian Heine christian at geosci.usyd.edu.au
Mon Jan 30 22:01:13 PST 2006


Micheal,
sorry for the late reply.
>> Ideally, one would take the longest possible straight line within  
>> a given
>> polygon.
>
> Entirely within, or is partially within acceptable?
I guess partially within is entirely acceptable for now.

> I'm not familiar with solving this problem so maybe this isn't
> correct or what you need, but could you look for the pair of points
> on the polygon's (simplified) exterior ring or convex hull separated
> by the most distance?  It would be easy to iterate through the
> points in a function.
Thanks for the suggestion!  I looked at convexhull() and this seems  
to be quite ok for my purposes -
How do I loop over a set of points in PostGIS/SQL?

Cheers,
Christian

--
Christian Heine
EarthByte Group <www.earthbyte.org>
School of Geosciences - The University of Sydney
Australia






More information about the postgis-users mailing list