当前位置: 首页>>代码示例>>C#>>正文


C# GeoPoint.Equals方法代码示例

本文整理汇总了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));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:8,代码来源:GeoPoint_Test.cs

示例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
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:7,代码来源:GeoPoint_Test.cs

示例3: TestGeoHashToGeo

 public void TestGeoHashToGeo()
 {
     GeoPoint geoPoint = new GeoPoint();
     geoPoint.GeoHash = _BangkokGeoHash;
     GeoPoint expected = new GeoPoint(_LatitudeBangkok, _LongitudeBangkok);
     Assert.IsTrue(expected.Equals(geoPoint));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:7,代码来源:GeoPoint_Test.cs

示例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));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:8,代码来源:GeoPoint_Test.cs

示例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));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:7,代码来源:GeoPoint_Test.cs

示例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));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:7,代码来源:GeoPoint_Test.cs

示例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));
 }
开发者ID:PaulCharlton,项目名称:tambon,代码行数:7,代码来源:GeoPoint_Test.cs


注:本文中的GeoPoint.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。