码迷,mamicode.com
首页 > Web开发 > 详细

超图SuperMap iObjects .NET Geometry转geoJSON&WKT&WKB

时间:2020-04-22 20:11:13      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:tput   wpf   怎么   note   practice   geojson   out   geometry   static   

关键代码

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);

记住命名空间,查询帮助文档即可

示例代码

ConvertDataWindow

参考资料

将geometry怎么转换成WKT?

超图SuperMap iObjects .NET Geometry转geoJSON&WKT&WKB

标签:tput   wpf   怎么   note   practice   geojson   out   geometry   static   

原文地址:https://www.cnblogs.com/Lulus/p/12751489.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!