超图SuperMap iObjects .NET Geometry转geoJSON&WKT&WKB
作者:互联网
关键代码
var geoJSONTxt = Toolkit.GeometryToGeoJson(geometry); var bytes = Toolkit.GeometryToWKB(geometry); var wktTxt = Toolkit.GeometryToWKT(geometry);
SuperMap.Data.Toolkit
中包含:
static byte[] GemetryToWKB(Geometry geometry); static string GemetryToWKT(Geometry geometry); Geometry GeoJsonToGeometry(string strGeoJson); static void Geometry2ByteArray(Geometry geo, UGByteArray* arOutput); static string GeometryToGeoJson(Geometry geometry); static byte[] GeometryToWKB(Geometry geometry); static string GeometryToWKT(Geometry geometry); static PrjCoordSys PrjFromWKT(string wkt); static string PrjToWKT(PrjCoordSys prj); static Geometry WKBToGemetry(byte[] WKBDate); static Geometry WKBToGeometry(byte[] WKBDate); static Geometry WKTToGemetry(string strWKT); static Geometry WKTToGeometry(string strWKT);
记住命名空间,查询帮助文档即可
示例代码
参考资料
标签:SuperMap,string,Geometry,WKB,Toolkit,geometry,static,byte 来源: https://blog.51cto.com/u_15180952/2732705