标签:return aml net text gis pre reader wpf 代码
private static byte[] ConvertWKTToWKB(string wkt)
{
WKBWriter writer = new WKBWriter();
WKTReader reader = new WKTReader();
var wkb = writer.Write(reader.Read(wkt));
return wkb;
}
private static string ConvertWKBToWKT(byte[] wkbBytes)
{
WKBReader reader = new WKBReader();
WKTWriter writer = new WKTWriter();
var wktText = writer.Write(reader.Read(wkbBytes));
return wktText;
}
WKTReader reader = new WKTReader();
NetTopologySuite.Geometries.Geometry geom = reader.Read(WKTText);
//引用NetTopologySuite.IO.GeoJSON
//https://github.com/NetTopologySuite/NetTopologySuite.IO.GeoJSON
GeoJsonReader reader = new GeoJsonReader();
var geometry = reader.Read<NetTopologySuite.Geometries.Geometry>(geoJSONText);
WKBReader reader = new WKBReader();
NetTopologySuite.Geometries.Geometry geom = reader.Read(wkbBytes);
NetTopologySuite Geometry&WKT&WKB&GeoJSON互转
标签:return aml net text gis pre reader wpf 代码
原文地址:https://www.cnblogs.com/Lulus/p/12751792.html