Closed TadaTeruki closed 2 weeks ago
このプルリクエストでは、CityGMLデータの座標参照系(CRS)の扱いを改善するために、複数のメソッドのシグネチャが変更され、EPSGコードをオプションとして受け取るようになりました。また、ファイル名からEPSGコードを抽出する新しいユーティリティ関数が追加され、座標変換のロジックがリファクタリングされました。これにより、地下埋設物データの処理が柔軟かつ効率的に行えるようになります。
ファイル | 変更概要 |
---|---|
nusamai/src/source/citygml.rs | query_crs_from_filename 関数を追加し、ファイル名からEPSGコードを抽出する機能を実装。toplevel_dispatcher 関数にファイル名パラメータを追加しました。 |
nusamai/src/transformer/transform/projection.rs | 座標変換のロジックをtransform_from_jgd2011 とtransform_from_wgs84 メソッドに分割し、可読性と保守性を向上させました。 |
nusamai-citygml/src/geometry.rs | GeometryCollector 構造体にgeometry_crs_uri フィールドを追加し、into_geometries メソッドでEPSGコードの柔軟な指定を可能にしました。 |
nusamai-citygml/src/parser.rs | SubTreeReader のジオメトリ解析ロジックにEPSGコードを抽出する機能を追加し、ジオメトリコレクタにCRS URIを格納するようにしました。 |
nusamai-citygml/src/values.rs | Envelope 構造体にcrs_uri フィールドを追加し、parse メソッドで@srsName 属性を抽出する機能を実装しました。 |
nusamai-plateau/examples/parse_and_compress.rs | example_toplevel_dispatcher 関数内のcollect_geometries 呼び出しを更新し、None を引数として渡すようにしました。 |
nusamai-plateau/tests/common/mod.rs | toplevel_dispatcher 関数内のcollect_geometries 呼び出しを更新し、None を引数として渡すようにしました。 |
Objective | Addressed | Explanation |
---|---|---|
地下埋設物のCityGMLデータに対応する(#500) | ✅ | |
平面直角からWGS 84への座標変換を実装する(#500) | ✅ |
うさぎの詩
ぴょんぴょん跳ねて、
新しい道を見つけ、
EPSGコードの旅、
ファイル名からの魔法、
地下埋設物も、
みんなで楽しもう! 🐇✨
Attention: Patch coverage is 35.04274%
with 76 lines
in your changes missing coverage. Please review.
Files with missing lines | Patch % | Lines |
---|---|---|
nusamai/src/transformer/transform/projection.rs | 16.66% | 75 Missing :warning: |
nusamai-citygml/src/geometry.rs | 90.00% | 1 Missing :warning: |
:loudspeaker: Thoughts on this report? Let us know!
@TadaTeruki PR確認中ですが、lintが落ちてしまっているので、確認していただけますか! https://github.com/MIERUNE/plateau-gis-converter/actions/runs/10794488362/job/29938886874?pr=640#step:8:396
変換して表示できることは確認ずみ
https://github.com/MIERUNE/plateau-gis-converter/pull/640#issuecomment-2345387377
Lintの落ち、手元でclippy
し確認しました
変更を新しいブランチに置きました https://github.com/MIERUNE/plateau-gis-converter/tree/lint/fix/unf-coord-transformation
おそらく自分の変更ではないため、念の為別ブランチに移しています。 特に支障なければこのPRで一緒にマージしてしまいます。
また余談ですが、cargo fmt
時に毎回import
の順番が変わり、変更が入る箇所があります
(plateau-gis-converter/nusamai/src/sink/geojson/mod.rs
の27行目)
transformer::{TransformerRegistry, TransformerOption},
同様の箇所が複数あり、diffが冗長となってしまいます。 この際この部分も直せればと思うのですが、いかがでしょうか。
同様の箇所が複数あり、diffが冗長となってしまいます。 この際この部分も直せればと思うのですが、いかがでしょうか
修正お願いします!!
@TadaTeruki lgtmです! コンフリクトしてる箇所だけ修正お願いします!
Close #500
What I did(変更内容)
https://www.mlit.go.jp/plateaudocument/#toc9_06
PLATEAUのCityGMLデータにおいて、地下埋設物のジオメトリは「日本測地系2011における平面直角座標系と東京湾平均海面を基準とする標高の複合座標参照系」で記述されており、他のデータと異なっている
現在地下埋設物が配置されている竹芝モデルを対象とし、座標変換に対応した (実際は実装の簡素化のため、平面直角座標系を6697に一旦変換してから、実装済みの変換を適用している)
各ジオメトリに紐付けられているEPSGコードをgml内から取得し適用している
Notes(連絡事項)
現在はPLATEAUの仕様に基づき、ファイル名を第一ソースとして座標系のEPSGを取得している (CityGMLの仕様には即していない)https://www.mlit.go.jp/plateaudocument/#toc9_07_04((下記はPRまでに行うfuture work))今後はgml内のタグのプロパティで取得することを視野に入れる実装はコメントアウトしている現在はこの点ではデータ側が不正確と考えられるため、応急処置としてこの方針としている