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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")]

Check warning on line 6 in nusamai-plateau/src/models/iur/uro/dem.rs

View check run for this annotation

Codecov / codecov/patch

nusamai-plateau/src/models/iur/uro/dem.rs#L6

Added line #L6 was not covered by tests
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
2 changes: 1 addition & 1 deletion nusamai/src/sink/cesiumtiles/gltf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
.extensions
.as_ref()
.and_then(|ext| ext.ext_texture_webp.as_ref())
.map_or(false, |_| true)
.is_some_and(|_| true)

Check warning on line 241 in nusamai/src/sink/cesiumtiles/gltf.rs

View check run for this annotation

Codecov / codecov/patch

nusamai/src/sink/cesiumtiles/gltf.rs#L241

Added line #L241 was not covered by tests
});

let extensions_used = {
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"
}
Loading