转换坐标WGS84 [英] Converting coordinates to WGS84

查看:239
本文介绍了转换坐标WGS84的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下面的函数绘制给出的质心圆,但我要的坐标在WGS84。

  VAR COORDS =新的List<元组LT;双层,双>>(); 
常量双EARTH_RADIUS_NM = 3437.670013352;
VAR纬度=(拉丁语* Math.PI)/ 180;
VAR LON =(lonIn * Math.PI)/ 180;
双D = radiusIn / EARTH_RADIUS_NM;
的for(int x = 0; X< = 360; X ++)
{
双方位角=(X * Math.PI)/ 180;
VAR latRadians = Math.Asin(Math.Sin(LAT)* Math.Cos(D)+ Math.Cos(LAT)* Math.Sin(D)* Math.Cos(方位角));
VAR lngRadians = LON + Math.Atan2(Math.Sin(方位角)* Math.Sin(D)* Math.Cos(LAT),Math.Cos(D) - Math.Sin(LAT)*数学。仙(latRadians));

coords.Add(新的记录<双层,双>(latRadians,lngRadians));
}


解决方案

您说转换为WGS84但从何而来?



看着像 http://www.gdal.org / http://dotspatial.codeplex.com/ (或你的数据库,如果空间支持你正在使用一个)



这答案了GIS技术将有助于解释WGS84 / EPSG:4326



http://gis.stackexchange.com/questions/23690/is- WGS84-本身 - 一个坐标参考系统



当你的圈子变成了椭圆:)

$ b $这将帮助b

的SQL Server圈


I have the following function which plots a Circle given the centroid, but I want the coordinates to be In WGS84.

var coords = new List<Tuple<double, double>>();
const double EARTH_RADIUS_NM = 3437.670013352;
var lat = (latIn * Math.PI) / 180;
var lon = (lonIn * Math.PI) / 180;
double d = radiusIn / EARTH_RADIUS_NM;
for (int x = 0; x <= 360; x++)
{
    double brng = (x * Math.PI) / 180; 
    var latRadians = Math.Asin(Math.Sin(lat) * Math.Cos(d) + Math.Cos(lat) * Math.Sin(d) * Math.Cos(brng));
    var lngRadians = lon + Math.Atan2(Math.Sin(brng) * Math.Sin(d) * Math.Cos(lat), Math.Cos(d) - Math.Sin(lat) * Math.Sin(latRadians));

    coords.Add(new Tuple<double, double>(latRadians, lngRadians));
}

解决方案

You say convert to WGS84 but from what?

Look at something like http://www.gdal.org/ or http://dotspatial.codeplex.com/ (or spatial support in your DB if you're using one).

This answer over on GIS will help explain WGS84 / EPSG:4326

http://gis.stackexchange.com/questions/23690/is-wgs84-itself-a-coordinate-reference-system

and this will help when your circle turns into a ellipse :)

SQL Server Circle

这篇关于转换坐标WGS84的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆