本文整理汇总了C#中NetTopologySuite.IO.WKTReader.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# WKTReader.Equals方法的具体用法?C# WKTReader.Equals怎么用?C# WKTReader.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetTopologySuite.IO.WKTReader
的用法示例。
在下文中一共展示了WKTReader.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public override void Start()
{
_xmlreader = _writer.Write(_point);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(_point.Equals(_result), "ERROR!");
//string gml = document.InnerXml;
//gml = gml.Replace("gml:", "");
//result = reader.Read(gml);
_xmlreader = _writer.Write(_line);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(_line.Equals(_result), "ERROR!");
_xmlreader = _writer.Write(_polygon);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(_polygon.Equals(_result), "ERROR!");
_xmlreader = _writer.Write(_multiPoint);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document);
_result = _reader.Read(_document);
Debug.Assert(_multiPoint.Equals(_result), "ERROR!");
MultiLineString multiLineString = new WKTReader().Read("MULTILINESTRING ((10 10, 20 20), (30 30, 40 40, 50 50, 70 80, 990 210), (2000.1 22, 457891.2334 3456.2, 33333 44444))") as MultiLineString;
_xmlreader = _writer.Write(multiLineString);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(multiLineString.Equals(_result), "ERROR!");
MultiPolygon multiPolygon = new WKTReader().Read("MULTIPOLYGON (((10 10, 10 20, 20 20, 20 10, 10 10), (12 12, 18 12, 18 18, 12 18, 12 12), (14 14, 16 14, 16 16, 14 16, 14 14)), ((30 30, 30 40, 40 40, 40 30, 30 30), (32 32, 38 32, 38 38, 32 38, 32 32)))") as MultiPolygon;
_xmlreader = _writer.Write(multiPolygon);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(multiPolygon.EqualsExact(_result), "ERROR!");
IGeometry[] geometries = { _point, _line, _polygon, _multiPoint, multiLineString, multiPolygon};
IGeometryCollection geometryCollection = Factory.CreateGeometryCollection(geometries);
_xmlreader = _writer.Write(geometryCollection);
_document = new XmlDocument();
_document.Load(_xmlreader);
Write(_document.InnerXml);
_result = _reader.Read(_document);
Debug.Assert(geometryCollection.EqualsExact(_result), "ERROR!");
}