可能重複:
Easting northing to latitude longitudeT-SQL //如何將Northing/Easting座標轉換爲lat/long?
我有很多北/東數據庫中的數據(例如:n 15217, e 88911
),我需要它與T-SQL轉換爲Lat/long
。
我該怎麼做?
可能重複:
Easting northing to latitude longitudeT-SQL //如何將Northing/Easting座標轉換爲lat/long?
我有很多北/東數據庫中的數據(例如:n 15217, e 88911
),我需要它與T-SQL轉換爲Lat/long
。
我該怎麼做?
有一個開源dll庫here (geocoordconversion),可以將eastings/northings轉換爲緯度/經度。因此,您可以將某些東西用於原始轉換。
或者,有什麼可能是有用的,我有一個project on GitHub,它使用此DLL將完整的Ordnance Survey郵編數據集導入到SQL Server中,將eastings/northings轉換爲lat/lon。這可用作命令行可執行文件。如果這與你想要的一致,那麼你可能會使用它。或者至少,有代碼強調如何使用DLL來執行轉換。
更新 從我的項目,.NET代碼段使用DLL轉換爲緯度/經度:
/// <summary>
/// Converts northing and easting coordinates into Longitude/Latitude coordinates in the WGS84 coordinate system.
/// </summary>
/// <param name="northing">northing coordinate</param>
/// <param name="easting">easting coordinate</param>
/// <returns>converted coordinates</returns>
protected PolarGeoCoordinate ConvertToLonLat(double northing, double easting)
{
// Use GeoCoordConversion DLL to convert the Eastings & Northings to Lon/Lat
// coordinates in the WGS84 system. The DLL was pulled from: http://code.google.com/p/geocoordconversion/
// and is available under the GNU General Public License v3: http://www.gnu.org/licenses/gpl.html
GridReference gridRef = new GridReference((long)easting, (long)northing);
PolarGeoCoordinate polarCoord = GridReference.ChangeToPolarGeo(gridRef);
return PolarGeoCoordinate.ChangeCoordinateSystem(polarCoord, CoordinateSystems.WGS84);
}
+1因爲你的帖子去年幫助我做這件事。建立一個小應用程序,使用上面提到的dll – twoleggedhorse
謝謝!這對我來說非常有用。有一件事:我選擇正確的方法'GridReference.ChangeToPolarGeo(new GridReference(1233,123));'? – Artem
是的,請參閱我的回答 – AdaTheDev
如果你看到this page是顯示的算法,你可以申請改變這種UTM格式來改變它們。您下載的頁面上有一個示例電子表格,並查看計算結果。我懷疑應該很容易轉換抓取查找表並使用它們加入您的數據。
http://stackoverflow.com/questions/7872539/easting-northing-to-latitude - 經度 – twoleggedhorse
投票重新打開,除了標記的副本之外,還包含有用的信息。 –