0
我尝试从WellKnownBinary和CoordinateSystemId转换来获取纬度和经度。如何将WellKnownBinary和CoordinateSystemId转换为经度和纬度
我有一个名为GeometriaDTO自定义类:
GeometriaDTO geoDTO = oInstDTO.Geometria;
DbGeography DBGeo = DbGeography.FromBinary(geoDTO.WellKnownBinary,(int) geoDTO.SRID);
但最后一行抛出一个错误:
An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code
我要做到这一点:
double? latitude = DBGeo.Latitude;
double? longitude = DBGeo.Longitude;
如何转换为经度和纬度?
在此先感谢。