calculate polygon area
Mateusz Loskot
mateusz at LOSKOT.NET
Tue Jul 18 06:32:56 PDT 2006
On 7/18/06, Julien Bessiere <julien.63 at free.fr> wrote:
> So my questions is :
>
> 1- Does phpmapscript has a function to calculate area
> (something like distanceToPoint(pointObj poPoint))?
I have no idea.
>> 2- If no, how to calculate area wiht lat long coordinates?
You need to calculate area of spherical polygon.
Here you can find C code for this purpose
http://www.acm.org/pubs/tog/GraphicsGems/gemsiv/sph_poly.c
I hope you will be able to rewrite it to PHP.
Best regards
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the MapServer-users
mailing list