Skip to content

Commit b699c7e

Browse files
committed
コメント修正
build error 修正 例外チェック
1 parent 3fbb92c commit b699c7e

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

include/plateau/geometry/geo_coordinate.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ namespace plateau::geometry {
1616
* EPSGコードが 6697 のとき、それは
1717
* 「日本測地系2011における経緯度座標系と東京湾平均海面を基準とする標高の複合座標参照系」
1818
* になります。
19-
* TODO
20-
* EPSGコードの判別と、それによって処理を変える機能は未実装です。
19+
* EPSGコードが 10162 ~ 10174 の場合は平面直角座標系となります。
2120
*/
2221
struct GeoCoordinate {
2322
double latitude;

src/dataset/gml_file.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ namespace plateau::dataset {
5252
}
5353

5454
double GmlFile::getEpsg() const {
55-
return std::stod(epsg_);
55+
try {
56+
return epsg_.empty() ? 6697 : std::stod(epsg_);
57+
}
58+
catch (const std::exception&) {
59+
return 6697;
60+
}
5661
}
5762

5863
double GmlFile::isPolarCoordinate() const {

src/polygon_mesh/polygon_mesh_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace plateau::polygonMesh {
6060
if (!envelope.validBounds()) {
6161
return TVec3d{0, 0, 0};
6262
}
63-
auto& gml = plateau::dataset::GmlFile(city_model.getGmlPath());
63+
const auto& gml = plateau::dataset::GmlFile(city_model.getGmlPath());
6464
auto city_center = (envelope.getLowerBound() + envelope.getUpperBound()) / 2.0;
6565
return geometry::GeoReference(coordinate_zone_id).convert(city_center, true, gml.isPolarCoordinate());
6666
}

0 commit comments

Comments
 (0)