-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KML Sink:建物ごとにPlacemarkを作成するように変更 #278
Conversation
Walkthroughこの変更は、 Changes
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (2)
- nusamai-kml/src/conversion.rs (4 hunks)
- nusamai/src/sink/kml/mod.rs (3 hunks)
Additional comments: 4
nusamai-kml/src/conversion.rs (4)
- 10-29:
multipolygon_to_kml
、indexed_multipolygon_to_kml
、およびmultipolygon_to_kml_with_mapping
関数の変更は適切です。Vec<KmlPolygon>
への変更は、建物ごとにPlacemark
を作成する目的に合致しています。- 31-43: 新しい関数
polygon_to_kml_polygon_with_mapping
は、個々のポリゴンをKmlPolygon
に変換するための適切なアプローチを提供します。この関数は、提案された変更の目的をサポートするために重要です。- 101-114:
polygon_to_kml_with_mapping
およびindexed_polygon_to_kml
関数の変更も、Vec<KmlPolygon>
への変更を反映しており、適切です。- 217-229: テストケース
test_polygon_to_kml
は、変更された関数の動作を適切に検証しています。ポリゴンの外部リングと内部リングの座標が正しく変換されていることを確認しています。
Codecov ReportAttention:
Additional details and impacted files
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (1)
- nusamai-kml/src/conversion.rs (4 hunks)
Additional comments: 1
nusamai-kml/src/conversion.rs (1)
- 101-102:
polygon_to_kml_with_mapping
関数で、戻り値をVec<KmlPolygon>
に変更していますが、この関数は常に1つのKmlPolygon
を含むベクターを返します。この設計は意図的なものでしょうか?もし単一のKmlPolygon
のみを扱う場合は、戻り値の型をVec<KmlPolygon>
ではなくKmlPolygon
にすることを検討してください。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- nusamai-kml/src/conversion.rs (5 hunks)
Additional comments: 9
nusamai-kml/src/conversion.rs (9)
- 10-10:
multipolygon_to_kml
関数の変更は、戻り値の型をVec<KmlPolygon>
に変更しています。この変更は目的に合致しています。- 17-17:
indexed_multipolygon_to_kml
関数も同様に、戻り値の型をVec<KmlPolygon>
に変更しています。適切な変更です。- 24-29:
multipolygon_to_kml_with_mapping
関数の変更により、Vec<KmlPolygon>
が戻り値となっています。この変更は、建物ごとにPlacemarkを作成する目的に沿っています。- 31-43: 新しく追加された
polygon_to_kml_polygon_with_mapping
関数は、単一のポリゴンをKmlPolygon
に変換します。この関数は、提案された変更の一環として適切に追加されています。- 101-102:
polygon_to_kml_with_mapping
関数の戻り値の型がVec<KmlPolygon>
に変更されています。この変更は、提案された目的に沿っています。- 106-107:
polygon_to_kml
関数の戻り値の型がVec<KmlPolygon>
に変更されています。この変更は、提案された目的に沿っています。- 111-115:
indexed_polygon_to_kml
関数の戻り値の型がVec<KmlPolygon>
に変更されています。この変更は、提案された目的に沿っています。- 106-106: 過去のレビューコメントで指摘された
poly.clone()
の使用について、この変更では直接的な修正が見られません。不必要なクローン操作を避けるための改善が必要かもしれません。- 111-114: 過去のレビューコメントで指摘された
poly_idx.clone()
の使用についても、この変更では直接的な修正が見られません。不必要なクローン操作を避けるための改善が必要かもしれません。
@xinmiaooo @coderabbitai |
@ciscorn このコミットの変更を確認しました。 Analysis chainScripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Fetch the diff of the specified commit to analyze the changes made.
git diff 3496603d598106dd105c09f137622c813d4a8fbe^ 3496603d598106dd105c09f137622c813d4a8fbe
Length of output: 3001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- nusamai-kml/src/conversion.rs (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- nusamai-kml/src/conversion.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
#278 のマージが前提です。 属性をKML地物に付与し、Google Earth上で表示可能なSchemaを付与。 ExtendedDataなので、機械的にも可読である ![スクリーンショット 2024-02-15 12 15 28](https://github.com/MIERUNE/nusamai/assets/83005951/2cd4b12a-b4a1-4f59-9d47-dac7b2adf11d) <img width="1582" alt="スクリーンショット 2024-02-15 12 12 28" src="https://github.com/MIERUNE/nusamai/assets/83005951/4ab95d92-705c-4642-b247-12992ca83265"> TODO: - 属性の階層を処理していないので、文字列になっている <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **新機能** - `KmlPolygon`の`Vec<KmlPolygon>`への変更 - `polygon_to_kml_polygon_with_mapping`の導入 - 既存の関数の更新 - `CityObjects`から`GeoJSON`オブジェクトから`KML`オブジェクトへの切り替え - 新しいデータ構造の導入: `Element`, `Geometry`, `Polygon`, `SimpleData` - プロパティの処理と`KML`要素の生成ロジックの更新 - スキーマデータエントリの作成 - 拡張データの処理 - `KML`出力の構造の調整 - `.gitignore`に`data/*`と`*.kml`を追加して、これらのファイルとディレクトリをバージョン管理から除外 - `.vscode/launch.json`にLLDBを使用してプロジェクト内の異なるコンポーネントとテストをデバッグするための様々な起動構成を設定 - 実行可能ファイル、ユニットテスト、統合テスト、ライブラリ、およびワークスペース内の複数のパッケージの例をデバッグするための構成のセットアップ <!-- end of auto-generated comment: release notes by coderabbit.ai -->
建物が一つの地物(Placemark)にまとまるように修正しました。
2024-02-14.15.12.37.mov
kmlデータ上では、
1gmlファイル...1Folder...nPlacemark...1MultiGeometry...nPolygon
の構成になっています。
Summary by CodeRabbit
multipolygon_to_kml
関数の返り値をVec<KmlPolygon}
に変更しました。indexed_multipolygon_to_kml
関数の返り値をVec<KmlPolygon}
に変更しました。multipolygon_to_kml_with_mapping
関数の返り値をVec<KmlPolygon}
に変更しました。polygon_to_kml_polygon_with_mapping
という新しい関数を追加し、KmlPolygon
を返します。polygon_to_kml_with_mapping
関数の返り値をVec<KmlPolygon}
に変更しました。polygon_to_kml
関数の返り値をVec<KmlPolygon}
に変更しました。indexed_polygon_to_kml
関数の返り値をVec<KmlPolygon}
に変更しました。