[postgis-users] Longest axis of a polygon

Christian Heine christian at geosci.usyd.edu.au
Thu Jan 26 02:14:37 PST 2006


Hi list,
is there a way to retrieve the longest axis of a given polygon in PostGIS? 
I need to construct cross sections (profiles) of 300+ polygons and this 
would be the best way to automatise the workflow and save (precious PhD-) 
time.

Ideally, one would take the longest possible straight line within a given 
polygon. I know that once you encounter polygons like this below:

   +---+      +---+
   |   |      |   |
+-+   +______|   |
|................|
+----------------+

things start to get very complicated. A simple, quick and dirty fix should 
be ok for now (e.g. taking the dotted line), as some selected polygons can 
get "special treatment" later on. Inner rings can be neglected. Does anyone on this list has experience 
with this?

Suggestions highly appreciated!
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