From Latitude and Longitude to absolute X, Y coordinates

狂风中的少年 提交于 2019-12-08 09:37:47

问题


I have a series of Lat/Long coords. I need to transform it in X, Y coordinates. I've read about UTM, but the problem is that UTM coordinates are relatives to a single zone.

For example, this two coordinates UTM has the same Easting (x) and Northing (y) but different code zone, and so each coords point to a completly different location (one in spain and one in italy):

  • UTM: 33T 292625m E 4641696m N
  • UTM: 30U 292625m E 4641696m N

I need a method to automatically transform that relatives coord in absolute X, Y coordinates. Ideas?


回答1:


Does it have to be UTM? If not, you can also use Mercator, which is a simpler projection that doesn't rely on zones.

See, for example, the Bing Maps system.




回答2:


You should be able to use the ProjNET library. What you need is to find the WKT (well known text) that defines your projections, and then you should be able to convert between them.

       var utm33NCoordinateSystem = CoordinateSystemWktReader.Parse("WKT for correct utm zone") as IProjectedCoordinateSystem;
       var wgs84CoordiateSystem = CoordinateSystemWktReader.Parse(MappingTransforms.WGS84) as IGeographicCoordinateSystem;
       var ctfac = new CoordinateTransformationFactory();
       _etrsToWgsTransformation = ctfac.CreateFromCoordinateSystems(etrs89CoordinateSystem,wgs84CoordiateSystem);

       double[] transform = _etrsToWgsTransformation.MathTransform.Transform(new double[] {  y,x });

Note: you have to find the correct WKTs, but that can be found on the project site.

Also you may have to flip the order of the inputs, depending on the transforms.




回答3:


if we want to correct bearing & Distance in between two points than we use (Polar) method by using Scientific Calculator first of all Press The Button polar than started bracket first For the Distance POL(N-N,E-E) For the Bearing POL(N-N,E-E)RclTan-1 Now you have got a Correct bearing



来源:https://stackoverflow.com/questions/7751481/from-latitude-and-longitude-to-absolute-x-y-coordinates

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!