Given a series of GPS coordinate pairs, I need to calculate the area of a polygon (n-gon). This is relatively small (not larger than 50,000 sqft). The geocodes are created by applying an affine transform with data from a world file.
I have tried to use a two step approach by doing converting the geocodes to cartesian coordinates:
double xPos = (lon-lonAnchor)*( Math.toRadians( 6378137 ) )*Math.cos( latAnchor );
double yPos = (lat-latAnchor)*( Math.toRadians( 6378137 ) );
then I use a cross product calculation to determine the area.
The issue is that the results are a bit off in accuracy (around 1%). Is there anything I can look into to improve this?
Thanks.