44namespace plateau ::geometry {
55 class GeoCoordinateTest : public ::testing::Test {
66 protected:
7- void SetUp () override {
8- }
9- void TearDown () override {
10- }
117 };
128
139 TEST_F (GeoCoordinateTest, ExtentContains) { // NOLINT
@@ -20,12 +16,13 @@ namespace plateau::geometry {
2016 ASSERT_FALSE (ext.contains (GeoCoordinate (40 , 0 , 0 )));
2117 ASSERT_FALSE (ext.contains (GeoCoordinate (0 , -100 , 0 )));
2218
23- // 6697の場合は同様の処理
19+ // 極座標系EPSG:6697(日本測地系2000)の場合、containsとcontainsInPolarの結果が一致することを確認
2420 ASSERT_EQ (ext.contains (TVec3d (0 , 0 , 0 )), ext.containsInPolar (TVec3d (0 , 0 , 0 ), 6697 ));
2521 ASSERT_EQ (ext.contains (TVec3d (80 , 90 , 0 )), ext.containsInPolar (TVec3d (80 , 90 , 0 ), 6697 ));
2622
2723 // 平面直角座標
28- const auto & zoneRefPoint = GeoReference::planeToPolar (TVec3d (), 8 );// 10169 は zone id:8
24+ // EPSG:10169は平面直角座標系(第8系)
25+ const auto & zoneRefPoint = GeoReference::planeToPolar (TVec3d (), 8 );
2926 ASSERT_FLOAT_EQ (36.0 , zoneRefPoint.latitude );
3027 ASSERT_FLOAT_EQ (138.5 , zoneRefPoint.longitude );
3128 ASSERT_FALSE (ext.containsInPolar (TVec3d (), 10169 ));
@@ -50,8 +47,8 @@ namespace plateau::geometry {
5047 ASSERT_TRUE (CoordinateReferenceFactory::IsPolarCoordinateSystem (0 )); // 不明なEPSG
5148
5249 const auto & refPoint = CoordinateReferenceFactory::GetOriginPoint (10169 );
53- ASSERT_EQ (36.0 , refPoint.latitude );
54- ASSERT_EQ (138.5 , refPoint.longitude );
50+ ASSERT_FLOAT_EQ (36.0 , refPoint.latitude );
51+ ASSERT_FLOAT_EQ (138.5 , refPoint.longitude );
5552
5653 // 無効なEPSGの場合、空のGeoCoordinateが返されること
5754 const auto & invalidRefPoint = CoordinateReferenceFactory::GetOriginPoint (0 );
0 commit comments