Skip to content
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

PLATEAU V4に対応 #691

Merged
merged 8 commits into from
Jan 24, 2025
Merged

PLATEAU V4に対応 #691

merged 8 commits into from
Jan 24, 2025

Conversation

satoshi7190
Copy link
Contributor

@satoshi7190 satoshi7190 commented Jan 20, 2025

Close #686

What I did(変更内容)

  • タイトルの通り
  • v4で追加されたschemaの定義を追加
  • shp変換時の属性名の短縮定義を追加

Notes(連絡事項)

確認時に実行したコマンド

cargo run <INPUT_PATH> --sink <SINK> -t use_lod=max_lod --output <OUTPUT_PATH>
  • v4テストデータの bldg、dem、fld、frn、lsld、tran、urf、vegのデータで全てのsinkで動作を確認済み
  • 使用したテストデータはテクスチャが存在しないため、テクスチャ付きの変換の確認はできていない

@satoshi7190 satoshi7190 self-assigned this Jan 20, 2025
Copy link

coderabbitai bot commented Jan 20, 2025

概要

この変更は、PLATEAU 4.xの互換性を高めるために、いくつかのモデル構造に新しいフィールドを追加するものです。具体的には、DataQualityAttribute構造体に5つの新しいジオメトリリソース記述フィールドを導入し、demDataQualityAttribute構造体を新規作成し、ReliefFeatureに新しいフィールドを追加しています。また、demモジュールが追加され、関連するエクスポートが設定されています。

変更内容

ファイル 変更の概要
nusamai-plateau/src/models/iur/uro/common.rs DataQualityAttribute構造体にgeometry_src_desc_lod0からgeometry_src_desc_lod4の5つの新しいフィールドを追加
nusamai-plateau/src/models/iur/uro/dem.rs 新しいdemDataQualityAttribute構造体を作成し、data_quality_attributeフィールドを追加
nusamai-plateau/src/models/iur/uro/mod.rs demモジュールを追加し、公開エクスポートを設定
nusamai-plateau/src/models/relief.rs ReliefFeaturedem_data_quality_attributeフィールドを追加
nusamai/src/sink/cesiumtiles/gltf.rs write_gltf_glb関数内のWebPテクスチャの存在チェックのロジックを変更

関連する可能性のあるPR

ポエム

🐰 データの世界に新しい風
LODの波が広がる
モデルは進化し、境界を越え
プラトーの夢、コードに宿る
兎は跳ねて、未来を描く 🌈


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@satoshi7190 satoshi7190 changed the title PLATEAU V4に対応する PLATEAU V4に対応 Jan 20, 2025
@satoshi7190 satoshi7190 marked this pull request as ready for review January 21, 2025 10:13
@satoshi7190 satoshi7190 marked this pull request as draft January 21, 2025 10:19
@satoshi7190 satoshi7190 marked this pull request as ready for review January 24, 2025 04:37
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
nusamai-plateau/src/models/iur/uro/common.rs (1)

17-19: コメントの一貫性を改善

各LODレベルのコメントを詳細化することで、開発者の理解を助けることができます。

-    // PLATEAU 4.x
+    // PLATEAU 4.x: LOD0のジオメトリソース説明(任意)
     #[citygml(path = b"uro:geometrySrcDescLod0")]
     pub geometry_src_desc_lod0: Vec<Code>,

-    // PLATEAU 4.x
+    // PLATEAU 4.x: LOD1のジオメトリソース説明(必須)
     #[citygml(path = b"uro:geometrySrcDescLod1", required)]
     pub geometry_src_desc_lod1: Vec<Code>,

-    // PLATEAU 4.x
+    // PLATEAU 4.x: LOD2のジオメトリソース説明(任意)
     #[citygml(path = b"uro:geometrySrcDescLod2")]
     pub geometry_src_desc_lod2: Vec<Code>,

-    // PLATEAU 4.x
+    // PLATEAU 4.x: LOD3のジオメトリソース説明(任意)
     #[citygml(path = b"uro:geometrySrcDescLod3")]
     pub geometry_src_desc_lod3: Vec<Code>,

-    // PLATEAU 4.x
+    // PLATEAU 4.x: LOD4のジオメトリソース説明(任意)
     #[citygml(path = b"uro:geometrySrcDescLod4")]
     pub geometry_src_desc_lod4: Vec<Code>,

Also applies to: 21-23, 25-27, 29-31, 33-35

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d94891f and a63a5c3.

⛔ Files ignored due to path filters (1)
  • nusamai/src/transformer/transform/shp_field_dict.json is excluded by !**/*.json
📒 Files selected for processing (3)
  • nusamai-plateau/src/models/iur/uro/common.rs (1 hunks)
  • nusamai-plateau/src/models/iur/uro/dem.rs (1 hunks)
  • nusamai-plateau/src/models/relief.rs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • nusamai-plateau/src/models/relief.rs
  • nusamai-plateau/src/models/iur/uro/dem.rs
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build
  • GitHub Check: test
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
nusamai-plateau/src/models/iur/uro/common.rs (2)

17-36: PLATEAU V4の新しいLODごとの属性を追加

PLATEAU V4の仕様に対応するため、LODごとのgeometrySrcDesc属性が適切に追加されています。

以下の点について確認をお願いします:

  1. geometry_src_desc_lod1のみがrequiredとして指定されている理由
  2. PLATEAU 3.xのgeometry_src_descと新しい属性との互換性の維持方法
  3. 既存のgeometry_src_desc0geometry_src_desc4との混同を避けるためのドキュメント追加の検討

22-23: geometry_src_desc_lod1の必須指定について確認

geometry_src_desc_lod1のみがrequiredとして指定されていますが、これは意図的な設定でしょうか?他のLODレベルでは任意(オプション)となっている理由について、コメントでの説明追加を推奨します。

     // PLATEAU 4.x
+    // LOD1のジオメトリソース説明は必須項目として指定
     #[citygml(path = b"uro:geometrySrcDescLod1", required)]
     pub geometry_src_desc_lod1: Vec<Code>,
✅ Verification successful

LOD1のジオメトリソース説明の必須指定は仕様に基づく意図的な設定です

PLATEAU 4.x の仕様において、LOD1 のジオメトリソース説明のみが必須として定義されていることが確認できました。コードベース内で一貫して実装されており、これは意図的な設定であることが明らかです。

提案された通り、以下のようなコメントの追加を推奨します:

    // PLATEAU 4.x
+   // PLATEAU 4.xの仕様に基づき、LOD1のジオメトリソース説明のみ必須として定義
    #[citygml(path = b"uro:geometrySrcDescLod1", required)]
    pub geometry_src_desc_lod1: Vec<Code>,
🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Search for all geometry source description fields and their attributes
ast-grep --pattern 'geometry_src_desc_lod$_: $_'

# Search for any comments or documentation about LOD requirements
rg -i "lod.*\(required\|optional\)" -A 3 -B 3

# Look for citygml attributes with required parameter
ast-grep --pattern '#[citygml($_)]'

# Check the README or documentation files
fd README.md --exec cat {}

Length of output: 10940


Script:

#!/bin/bash
# Look for all geometry source description fields in the uro directory
rg "geometry_src_desc" nusamai-plateau/src/models/iur/uro/ -A 2 -B 2

# Search for comments about LOD requirements in the uro directory
rg "LOD|lod" nusamai-plateau/src/models/iur/uro/ -A 2 -B 2

# Look specifically at the common.rs file
cat nusamai-plateau/src/models/iur/uro/common.rs

Length of output: 14510

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nusamai-plateau/src/models/iur/uro/dem.rs 0.00% 1 Missing ⚠️
nusamai/src/sink/cesiumtiles/gltf.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
GUI ∅ <ø> (∅)
Backend 74.64% <0.00%> (∅)
Libraries 85.89% <0.00%> (-9.65%) ⬇️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@nokonoko1203 nokonoko1203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@nokonoko1203 nokonoko1203 merged commit 561163a into main Jan 24, 2025
8 of 9 checks passed
@nokonoko1203 nokonoko1203 deleted the feature/plateau-v4 branch January 24, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PLATEAU v4.0に対応
2 participants