原文地址:根据经纬度计算多边形面积作者:orc2000计算方法比较简单,主要是求出多边形外接矩形已米为单位面积和已经纬度为单位面积比值,然后用这个比值乘以多边形经纬度为单位面积,即可得出这个多边形以米为单位面积. do ble getarea(const vectorcoordinate& ls) { if (ls.size  4) ret rn 0; do ble s m = 0; for (size_t i=0; ils.size-1; i) { const coordinate& p = ls[i]; const coordinate& q = ls[i+1]; s m += (p.x + q.x) * (q.y - p.y); } ret rn s m2; } do ble getprjarea(const vectorcoordinate &ls) { if (ls.size  4) ret rn 0; do ble darea = getarea(ls); darea = abs(darea); if (darea == 0) ret rn 0; do ble xmin, ymin, xmax, ymax; xmin = xmax = ls[0].x; ymax = ymin = ls[0].y; for (size_t i=1; ils.size; i) { const coordinate& p = ls[i]; xmin = min(xmin, p.x); ymin = min(ymin, p.y); xmax = max(xmax, p.x); ymax = max(ymax, p.y); } coordinate p1, p2; p1.x = xmin; p1.y = (ymin+ymax)2; p2.x = xmax; p2.y = (ymin+ymax)2; do ble dx = getprjdistance(p1, p2); p1.x = p2.x = xmin; p1.y = ymin; p2.y = ymax; do ble dy = getprjdistance(p1, p2); dy *= dx; dx = (xmax-xmin)*(ymax-ymin); dy = dx; darea *= dy; ret rn darea; } 做了简单的测试,用此方法计算出来的面积和投影变换后计算的面积误差大约为11000,基本上满足一些要求精度不是很高的应用.