本文整理匯總了C#中NetTopologySuite.IO.WKTReader.EqualsExact方法的典型用法代碼示例。如果您正苦於以下問題:C# WKTReader.EqualsExact方法的具體用法?C# WKTReader.EqualsExact怎麽用?C# WKTReader.EqualsExact使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NetTopologySuite.IO.WKTReader
的用法示例。
在下文中一共展示了WKTReader.EqualsExact方法的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!");
}