Hi,<br><br>If your polygons are mainly concave, you could use distance and maxDistance on the point-set composing polygon vertices:<br><br><font face="courier new, monospace">with pg_points as (<br>    select st_dumppoints(st_exteriorRing(<br>
     'POLYGON (( 120 300, 180 340, 180 300, 200 300, 157.5 292.5, 186 250.5, 129.5 222, 100 240, 115.5 256, 140 280, 140 300, 120 300 ))'::geometry)<br>          ) as dump<br>) select min(st_distance((p1.dump).geom, (p2.dump).geom)), <br>
         max(st_maxDistance((p1.dump).geom, (p2.dump).geom))</font><div><font face="courier new, monospace"><br>from pg_points p1, pg_points p2</font></div><div><font face="courier new, monospace"><br>where (p1.dump).path[1] <> (p2.dump).path[1]<br>
-- start/end points skipped, to avoid 0 distance<br>and (p1.dump).path[1] <> array_length((p2.dump).path, 1)<br>and (p2.dump).path[1] <> array_length((p1.dump).path, 1);</font><br><br>It will fail on polygons with spikes </div>
<div>examples attached</div><div><br>Nicolas</div><div><br>On 8 September 2012 17:42, Andrea Peri <<a href="mailto:aperi2007@gmail.com">aperi2007@gmail.com</a>> wrote:<br>> Hi,<br>><br>> For some polygons of kind simple (not multipart) is possible to calculate<br>
> the min and max width of that polygons ?<br>><br>> Thx,<br>><br>> --<br>> -----------------<br>> Andrea Peri<br>> . . . . . . . . .<br>> qwerty àèìòù<br>> -----------------<br>><br>><br>
> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br></div>