本文整理汇总了C#中NetTopologySuite.Geometries.GeometryFactory.CreateMultiPoint方法的典型用法代码示例。如果您正苦于以下问题:C# GeometryFactory.CreateMultiPoint方法的具体用法?C# GeometryFactory.CreateMultiPoint怎么用?C# GeometryFactory.CreateMultiPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetTopologySuite.Geometries.GeometryFactory
的用法示例。
在下文中一共展示了GeometryFactory.CreateMultiPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: main
public static void main(string[] args)
{
// create a factory using default values (e.g. floating precision)
GeometryFactory fact = new GeometryFactory();
IPoint p1 = fact.CreatePoint(new Coordinate(0, 0));
Console.WriteLine(p1);
IPoint p2 = fact.CreatePoint(new Coordinate(1, 1));
Console.WriteLine(p1);
IMultiPoint mpt = fact.CreateMultiPoint(new Coordinate[]{ new Coordinate(0, 0), new Coordinate(1, 1), });
Console.WriteLine(mpt);
}
示例2: TestMultiPointDim4
public void TestMultiPointDim4()
{
GeometryFactory gf = new GeometryFactory(new PackedCoordinateSequenceFactory());
ICoordinateSequence mpSeq = gf.CoordinateSequenceFactory.Create(1, Ordinates.XYZM);
mpSeq.SetOrdinate(0, Ordinate.X, 50);
mpSeq.SetOrdinate(0, Ordinate.Y, -2);
mpSeq.SetOrdinate(0, Ordinate.Z, 10);
mpSeq.SetOrdinate(0, Ordinate.M, 20);
IMultiPoint mp = gf.CreateMultiPoint(mpSeq);
ICoordinateSequence pSeq = ((Point)mp.GetGeometryN(0)).CoordinateSequence;
Assert.AreEqual(4, pSeq.Dimension);
Assert.AreEqual(Ordinates.XYZM, pSeq.Ordinates);
for (int i = 0; i < 4; i++)
Assert.AreEqual(mpSeq.GetOrdinate(0, (Ordinate)i), pSeq.GetOrdinate(0, (Ordinate)i));
}