阅读:1723回复:0
[求助]MapXtreme的Polygon.Area()计算有误
我在使用Mapxtreme 2005 V6.6 for.NET计算多边形面积的时候,计算结果是错误的,能帮我分析一下吗,源码如下:
<br> <P>C# source: </P> <P>DPoint[] points = new DPoint[5]; <BR>points[0] = new DPoint(99.61958, 53.722539); <BR>points[1] = new DPoint(89.022704, 18.21); <BR>points[2] = new DPoint(89.329547, 18.148863); <BR>points[3] = new DPoint(100.111809, 53.64); <BR>points[4] = new DPoint(99.61958, 53.722539); </P> <P>CoordSysFactory factory = Session.Current.CoordSysFactory; <BR>CoordSys csysNAD27 = factory.CreateCoordSys("mapinfcoordsys 1,62"); </P> <P>Polygon poly = new Polygon(csysNAD27, CurveSegmentType.Linear, points); <BR>double dPolyArea = poly.Area(AreaUnit.SquareKilometer, DistanceType.Spherical); </P> <P>MapInfo.Geometry.Rectangle rect = new MapInfo.Geometry.Rectangle(csysNAD27, new DRect(73.45, 18.21, 134.12, 53.64)); <BR>double dTargetArea = rect.Area(AreaUnit.SquareKilometer, DistanceType.Spherical); </P> <p> <P>results : <BR>dPolyArea :21066894.2898436 km^2 <BR>dTargetArea :541529.95770647365 km^2</P> <p> <P>多边形实际面积不超过16万平方公里,为什么计算结果会相差如此大呢?</P> |
|