本文整理汇总了C#中GeoPoint.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# GeoPoint.Equals方法的具体用法?C# GeoPoint.Equals怎么用?C# GeoPoint.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoPoint
的用法示例。
在下文中一共展示了GeoPoint.Equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestDatumConversion
public void TestDatumConversion()
{
// example as of http://www.colorado.edu/geography/gcraft/notes/datum/gif/molodens.gif
GeoPoint point = new GeoPoint(30, -100, 232, GeoDatum.DatumNorthAmerican27MeanConus());
point.Datum = GeoDatum.DatumWGS84();
GeoPoint expected = new GeoPoint(30.0002239, -100.0003696, 194.816, GeoDatum.DatumWGS84());
Assert.IsTrue(expected.Equals(point));
}
示例2: TestGeoPointCopyConstructor
public void TestGeoPointCopyConstructor()
{
GeoPoint basePoint = new GeoPoint(_LatitudeBangkok, _LongitudeBangkok, _AltitudeBangkok, GeoDatum.DatumWGS84());
GeoPoint clonePoint = new GeoPoint(basePoint);
Assert.IsTrue(basePoint.Equals(clonePoint));
// Assert.AreEqual<GeoPoint>(lClonePoint, lBasePoint); // does not use the IEquatable
}
示例3: TestGeoHashToGeo
public void TestGeoHashToGeo()
{
GeoPoint geoPoint = new GeoPoint();
geoPoint.GeoHash = _BangkokGeoHash;
GeoPoint expected = new GeoPoint(_LatitudeBangkok, _LongitudeBangkok);
Assert.IsTrue(expected.Equals(geoPoint));
}
示例4: TestUTMToGeo
public void TestUTMToGeo()
{
// Dresden according to Wikipedia : 13° 44' 29"E 51° 02' 55"N = UTM 33U 0411777 5655984
UtmPoint utmPoint = new UtmPoint("33U 0411777 5655984");
GeoPoint geoPoint = new GeoPoint(utmPoint, GeoDatum.DatumWGS84());
GeoPoint expected = new GeoPoint(51.0 + 02.0 / 60.0 + 55.0 / 3600.0, 13.0 + 44.0 / 60.0 + 29.0 / 3600.0);
Assert.IsTrue(expected.Equals(geoPoint));
}
示例5: TestParseCoordinateDegMinSec
public void TestParseCoordinateDegMinSec()
{
String coordinateString = " 13°45'46.08\" N 100°28'41.16\" E";
GeoPoint geoPoint = new GeoPoint(coordinateString);
var expected = new GeoPoint(13.7628, 100.478100);
Assert.IsTrue(expected.Equals(geoPoint), String.Format("Expected {0}, returned {1}", expected, geoPoint));
}
示例6: TestParseCoordinateDecimalDegree
public void TestParseCoordinateDecimalDegree()
{
String coordinateString = " 13.7628° N 100.478100° E";
GeoPoint geoPoint = new GeoPoint(coordinateString);
var expected = new GeoPoint(13.7628, 100.478100);
Assert.IsTrue(expected.Equals(geoPoint), String.Format("Expected {0}, returned {1}", expected, geoPoint));
}
示例7: TestMaidenheadToGeo
public void TestMaidenheadToGeo()
{
GeoPoint geoPoint = new GeoPoint();
geoPoint.Maidenhead = _BangkokMaidenhead;
GeoPoint expected = new GeoPoint(_LatitudeBangkok, _LongitudeBangkok);
Assert.IsTrue(expected.Equals(geoPoint), String.Format("Expected {0}, returned {1}", expected, geoPoint));
}