Skip to content

Commit

Permalink
PLATEAU V4に対応 (#691)
Browse files Browse the repository at this point in the history
<!-- Close or Related Issues -->
Close #686

### What I did(変更内容)
<!-- Please describe the motivation behind this PR and the changes it
introduces. -->
<!-- どのような変更をしますか? 目的は? -->

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


### Notes(連絡事項)
<!-- If manual testing is required, please describe the procedure. -->
<!-- 手動での動作確認が必要なら手順を簡単に伝えてください。そのほか連絡事項など。 -->

確認時に実行したコマンド
```
cargo run <INPUT_PATH> --sink <SINK> -t use_lod=max_lod --output <OUTPUT_PATH>
```
- v4テストデータの bldg、dem、fld、frn、lsld、tran、urf、vegのデータで全てのsinkで動作を確認済み
- 使用したテストデータはテクスチャが存在しないため、テクスチャ付きの変換の確認はできていない
  • Loading branch information
satoshi7190 authored Jan 24, 2025
1 parent 80c0230 commit 561163a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
20 changes: 20 additions & 0 deletions nusamai-plateau/src/models/iur/uro/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ pub struct DataQualityAttribute {
#[citygml(path = b"uro:appearanceSrcDesc")]
pub appearance_src_desc: Vec<Code>,

// PLATEAU 4.x
#[citygml(path = b"uro:geometrySrcDescLod0")]
pub geometry_src_desc_lod0: Vec<Code>,

// PLATEAU 4.x
#[citygml(path = b"uro:geometrySrcDescLod1", required)]
pub geometry_src_desc_lod1: Vec<Code>,

// PLATEAU 4.x
#[citygml(path = b"uro:geometrySrcDescLod2")]
pub geometry_src_desc_lod2: Vec<Code>,

// PLATEAU 4.x
#[citygml(path = b"uro:geometrySrcDescLod3")]
pub geometry_src_desc_lod3: Vec<Code>,

// PLATEAU 4.x
#[citygml(path = b"uro:geometrySrcDescLod4")]
pub geometry_src_desc_lod4: Vec<Code>,

#[citygml(path = b"uro:geometrySrcDesc0")]
pub geometry_src_desc0: Vec<Code>,

Expand Down
10 changes: 10 additions & 0 deletions nusamai-plateau/src/models/iur/uro/dem.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use nusamai_citygml::{citygml_feature, CityGmlElement};

use super::common::DataQualityAttribute;

#[allow(non_camel_case_types)]
#[citygml_feature(name = "uro:demDataQualityAttribute")]
pub struct demDataQualityAttribute {
#[citygml(path = b"uro:DataQualityAttribute", required)]
pub data_quality_attribute: Option<DataQualityAttribute>,
}
2 changes: 2 additions & 0 deletions nusamai-plateau/src/models/iur/uro/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod bridge;
mod building;
mod city_furniture;
mod common;
mod dem;
mod disaster_risk;
mod dm;
mod facility;
Expand All @@ -24,6 +25,7 @@ pub use bridge::*;
pub use building::*;
pub use city_furniture::*;
pub use common::*;
pub use dem::*;
pub use disaster_risk::*;
pub use dm::*;
pub use facility::*;
Expand Down
4 changes: 4 additions & 0 deletions nusamai-plateau/src/models/relief.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ pub struct ReliefFeature {

#[citygml(path = b"dem:reliefComponent", required)]
pub relief_component: Vec<ReliefComponentProperty>, // -> dem:_ReliefComponent

// PLATEAU 4.x
#[citygml(path = b"uro:demDataQualityAttribute", required)]
pub dem_data_quality_attribute: Option<uro::demDataQualityAttribute>,
}

#[citygml_property(name = "dem:_ReliefComponentProperty")]
Expand Down
15 changes: 14 additions & 1 deletion nusamai/src/transformer/transform/shp_field_dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -863,5 +863,18 @@
"bldgUsecaseAttribute": "bldgUC",
"frnKeyValuePairAttribute": "frnKVPair",
"tranKeyValuePairAttribute": "tranKVPair",
"tranUsecaseAttribute": "tranUC"
"tranUsecaseAttribute": "tranUC",
"geometrySrcDescLod0": "geomSrcDL0",
"geometrySrcDescLod1": "geomSrcDL1",
"geometrySrcDescLod2": "geomSrcDL2",
"geometrySrcDescLod3": "geomSrcDL3",
"geometrySrcDescLod4": "geomSrcDL4",
"DataQualityAttribute": "dataQual",
"demDataQualityAttribute": "demDQual",
"wtrDataQualityAttribute": "wtrDQual",
"wtrKeyValuePairAttribute": "wtrKVPair",
"dataQualityAttribute": "dataQual",
"urbanParkAttribute": "urbPark",
"luseKeyValuePairAttribute": "luseKVPair",
"vegKeyValuePairAttribute": "vegKVPair"
}

0 comments on commit 561163a

Please sign in to comment.