如何从点列表创建多边形?
我有一组点,如果这些点至少有3个,我想将它们连接起来创建一个多边形。
Dim ClickedPoint As New NetTopologySuite.Geometries.Point(coordinates)
ClickedPointArray.Add(ClickedPoint)
if ClickedPointArray.Count > 2 then
Polygonizer = New Polygonizer()
Polygonizer.Add(ClickedPointArray)
end if
return Polygonizer.GetPolygons
我认为我离解决方案还很遥远。 你能帮助我吗?
var сoordinates = new List<NetTopologySuite.Geometries.Coordinate>(); var polygon = new NetTopologySuite.Geometries.Polygon(new NetTopologySuite.Geometries.LinearRing(сoordinates.ToArray()));
- NoWar