## bouyei / ByGeo .gitee-modal { width: 500px !important; }

Explore and code with more than 6 million developers，Free private repositories ！：）
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
bouyei 7137223
Notice: Creating folder will generate an empty file .keep, because not support in Git

# ByGeo

#### 介绍

https://github.com/NetTopologySuite/NetTopologySuite NetTopologySuite

NetTopologySuite

#### 安装教程

1. nuget Install-Package ByGeo

#### 使用说明

    static void WKTIntersection()
{

//验证要素是否有效,为空或者有自相交则无效
if (geo1.IsValid == false)
{
return;
}
if (geo2.IsValid == false)
{
return;
}

//是否检查节点有效,如果存在自相交等则相交失败
// ByGeo.Operation.Overlay.OverlayOp.NodingValidatorDisabled = true;
var result = geo1.Intersection(geo2);

var resultstr = new WKTWriter().Write(result);
By.GeometryEllipse ellipse = new By.GeometryEllipse();
double nArea = ellipse.Area(resultstr);

Console.WriteLine(resultstr);
}

static void EllipseArea()
{
var g1 = "POLYGON ((105.66278148717595 26.268896196702144,105.65603151224457 26.270494874738745,105.6553345349609 26.27166525334883,105.65733907973481 26.273402525905908,105.6625862344672 26.271431379254807,105.66278148717595 26.268896196702144))";// File.ReadAllText("E:\\g1.wkt");

double gArea = geo1.Area;//平面面积,所以必须是平面坐标系

//wkt
var text = geo1.AsText();

By.GeometryEllipse ellipse = new By.GeometryEllipse();
double nArea = ellipse.Area(text);
}
}

C#

No release