[mapserver-users] Surface area
Lowell Filak
lfilak@medinaco.org
Wed, 26 Jun 2002 13:44:21 -0400
I don't think the algorithm is there (exposed?) however you could create a separate shapefile of a uniform grid (say 0.5' x 0.5') and use the existing $layer->queryByShape($map, $shape) to select out the members of the grid that fall within the polygon shape and get an approximate value with $area=$resultcache->{numresults}*0.25 .
Alternately you could look into using something like Geometry::Polygon coupled with perl mapscript at
http://xarch.tu-graz.ac.at/autocad/urban/perl/Geometry-0.02a.tar.gz
to calculate the area for polygons.
Lowell F.
The following message was sent by "Eduardo Patto Kanegae" <eduardo@scopotecnologia.com.br> on Wed, 26 Jun 2002 01:54:16 -0300.
> does MapServer has the capabilitie of returning the surface area of a > polygon shape?
>