Point2Ds pPoint2Ds = new Point2Ds(new Point2D() { X = 130.593, Y = 45.358 });
Point2Ds clonePoint2Ds = pPoint2Ds.Clone();
PrjCoordSys pcs = new PrjCoordSys();
pcs.FromEPSGCode(4531);
bool convertSucc = CoordSysTranslator.Forward(clonePoint2Ds, pcs);
System.Diagnostics.Debug.Print(convertSucc.ToString());
System.Diagnostics.Debug.Print(clonePoint2Ds[0].X + ":" + clonePoint2Ds[0].Y);
System.Diagnostics.Debug.Print(pPoint2Ds[0].X + ":" + pPoint2Ds[0].Y);
Point2Ds pPoint2Ds1 = new Point2Ds(new Point2D() { X = 43624818.2017499, Y = 5025965.55557387 });
Point2Ds clonePoint2Ds1 = pPoint2Ds1.Clone();
PrjCoordSys pcs1 = new PrjCoordSys();
bool succ= pcs1.FromEPSGCode(4490);
bool convertSucc1 = CoordSysTranslator.Inverse(clonePoint2Ds1, pcs1);
System.Diagnostics.Debug.Print(convertSucc1.ToString());
System.Diagnostics.Debug.Print(clonePoint2Ds1[0].X + ":" + clonePoint2Ds1[0].Y);
System.Diagnostics.Debug.Print(pPoint2Ds1[0].X + ":" + pPoint2Ds1[0].Y);
请问下,我测试4490到4531的转换;发现,4490转4531没问题,但4531转4490,转换不成功;
以下是输出内容:
True
43624818.2017499:5025965.55557387
130.593:45.358
False
43624818.2017499:5025965.55557387
43624818.2017499:5025965.55557387
还有,原数据,是不是需要给空间参考,又如何给呢,好像只有dataset有prjcoordsys这个属性,point2ds或georegion这种的,能设置空间参考?