判断指定的经纬度坐标点是否落在指定的多边形区域内
@paramALon指定点的经度
@paramALat指定点的纬度
@paramAPoints指定多边形区域各个节点坐标
@returnTrue落在范围内False不在范围内
------------------------------------------------------------------------------*}functionIsPtInPoly(ALon,ALat:double;APoints:arrayofTMyPoint):Boolean;variSum,iCount,iIndex:Integer;
dLon1,dLon2,dLat1,dLat2,dLon:double;beginResult:=False;if(Length(APoints)<3)thenbeginResult:=False;Exit;end;iSum:=0;iCount:=Length(APoints);foriIndex:=0toiCount-1dobeginif(iIndex=iCount-1)thenbegindLon1:=APoints[iIndex].X;dLat1:=APoints[iIndex].Y;dLon2:=APoints[0
].X;dLat2:=APoints[0
].Y;endelsebegindLon1:=APoints[iIndex].X;dLat1:=APoints[iIndex].Y;dLon2:=APoints[iIndex+1