可能是重复的问题:
Easting northing to latitude longitude
我有许多数据库中的Northing/Easting数据(例如:n 15217,e 88911
),我需要使用T-SQL将其转换为经度/纬度
。
我该怎么做?
可能是重复的问题:
Easting northing to latitude longitude
我有许多数据库中的Northing/Easting数据(例如:n 15217,e 88911
),我需要使用T-SQL将其转换为经度/纬度
。
我该怎么做?
/// <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);
}
GridReference.ChangeToPolarGeo(new GridReference(1233, 123));
吗? - Artem