33#include " citygml/vecs.hpp"
44#include " citygml/cityobject.h"
55#include < array>
6+ #include < set>
67#include < utility>
78
89namespace plateau ::geometry {
@@ -115,23 +116,13 @@ namespace plateau::geometry {
115116 static constexpr int default_epsg = 6697 ;
116117
117118 // EPSGとZone IDのマッピング
118- static constexpr std::array<std::pair<int , int >, 13 > epsg_to_zone = { {
119- {10162 , 1 }, {10163 , 2 }, {10164 , 3 }, {10165 , 4 }, {10166 , 5 },
120- {10167 , 6 }, {10168 , 7 }, {10169 , 8 }, {10170 , 9 }, {10171 , 10 },
121- {10172 , 11 }, {10173 , 12 }, {10174 , 13 }
122- } };
119+ static const std::set<std::pair<int , int >> epsg_to_zone;
123120
124121 // Zone IDごとの座標データ
125- static constexpr std::array<std::pair<int , std::array<double , 3 >>, 13 > zone_to_point = { {
126- {1 , {33.0 , 129.5 , 0.0 }}, {2 , {33.0 , 131.0 , 0.0 }}, {3 , {36.0 , 132.166667 , 0.0 }},
127- {4 , {33.0 , 133.5 , 0.0 }}, {5 , {36.0 , 134.333333 , 0.0 }}, {6 , {36.0 , 136.0 , 0.0 }},
128- {7 , {36.0 , 137.166667 , 0.0 }}, {8 , {36.0 , 138.5 , 0.0 }}, {9 , {35.0 , 139.833333 , 0.0 }},
129- {10 , {40.0 , 140.833333 , 0.0 }}, {11 , {44.0 , 140.25 , 0.0 }}, {12 , {44.0 , 142.0 , 0.0 }},
130- {13 , {43.0 , 144.0 , 0.0 }}
131- } };
122+ static const std::set<std::pair<int , std::array<double , 3 >>> zone_to_point;
132123
133124 // EPSGごとのzone取得
134- static constexpr int GetZoneId (int epsg) {
125+ static const int GetZoneId (int epsg) {
135126 for (const auto & pair : epsg_to_zone) {
136127 if (pair.first == epsg) {
137128 return pair.second ;
@@ -141,7 +132,7 @@ namespace plateau::geometry {
141132 }
142133
143134 // EPSGごとの基準点取得
144- static GeoCoordinate GetReferencePoint (int epsg) {
135+ static GeoCoordinate GetOriginPoint (int epsg) {
145136 const int zone = GetZoneId (epsg);
146137 if (zone != 0 ) {
147138 for (const auto & pair : zone_to_point) {
@@ -163,4 +154,20 @@ namespace plateau::geometry {
163154 return !(epsg >= 10162 && epsg <= 10174 );
164155 }
165156 };
157+
158+ // EPSGとZone IDのマッピング
159+ inline const std::set<std::pair<int , int >> CoordinateReferenceFactory::epsg_to_zone = {
160+ {10162 , 1 }, {10163 , 2 }, {10164 , 3 }, {10165 , 4 }, {10166 , 5 },
161+ {10167 , 6 }, {10168 , 7 }, {10169 , 8 }, {10170 , 9 }, {10171 , 10 },
162+ {10172 , 11 }, {10173 , 12 }, {10174 , 13 }
163+ };
164+
165+ // Zone IDごとの座標データ
166+ inline const std::set<std::pair<int , std::array<double , 3 >>> CoordinateReferenceFactory::zone_to_point = {
167+ {1 , {33.0 , 129.5 , 0.0 }}, {2 , {33.0 , 131.0 , 0.0 }}, {3 , {36.0 , 132.166667 , 0.0 }},
168+ {4 , {33.0 , 133.5 , 0.0 }}, {5 , {36.0 , 134.333333 , 0.0 }}, {6 , {36.0 , 136.0 , 0.0 }},
169+ {7 , {36.0 , 137.166667 , 0.0 }}, {8 , {36.0 , 138.5 , 0.0 }}, {9 , {35.0 , 139.833333 , 0.0 }},
170+ {10 , {40.0 , 140.833333 , 0.0 }}, {11 , {44.0 , 140.25 , 0.0 }}, {12 , {44.0 , 142.0 , 0.0 }},
171+ {13 , {43.0 , 144.0 , 0.0 }}
172+ };
166173}
0 commit comments