本文整理汇总了C#中IGeometry.Normalized方法的典型用法代码示例。如果您正苦于以下问题:C# IGeometry.Normalized方法的具体用法?C# IGeometry.Normalized怎么用?C# IGeometry.Normalized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGeometry
的用法示例。
在下文中一共展示了IGeometry.Normalized方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckEqual
protected void CheckEqual(IGeometry expected, IGeometry actual)
{
var actualNorm = actual.Normalized();
var expectedNorm = expected.Normalized();
var equal = actualNorm.EqualsExact(expectedNorm);
Assert.That(equal, Is.True, String.Format("Expected = {0}\nactual = {1}", expected, actual));
}
示例2: EqualsNormalized
/// <summary>
/// Tests whether two geometries are exactly equal
/// in their normalized forms.
/// <remarks>
/// This is a convenience method which creates normalized
/// versions of both geometries before computing
/// <seealso cref="EqualsExact(IGeometry)"/>.<para/>
/// This method is relatively expensive to compute.
/// For maximum performance, the client
/// should instead perform normalization on the individual geometries
/// at an appropriate point during processing.
/// </remarks>
/// </summary>
/// <param name="g">A geometry</param>
/// <returns>true if the input geometries are exactly equal in their normalized form</returns>
/// <seealso cref="EqualsExact(IGeometry)"/>
public bool EqualsNormalized(IGeometry g)
{
if (g == null) return false;
return Normalized().EqualsExact(g.Normalized());
}
示例3: CheckDissolve
private void CheckDissolve(IEnumerable<IGeometry> geoms, IGeometry expected)
{
LineDissolver d = new LineDissolver();
d.Add(geoms);
IGeometry result = d.GetResult();
IGeometry rnorm = result.Normalized();
IGeometry enorm = expected.Normalized();
bool equal = rnorm.EqualsExact(enorm);
Assert.IsTrue(equal, String.Format("Expected = {0} actual = {1}", expected, rnorm));
}