Skip to content

Commit

Permalink
Merge branch 'main' into fix/ulod-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshi7190 committed Jan 26, 2025
2 parents 8d8385b + 561163a commit 462113a
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
sudo apt install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test
Expand Down
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
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 @@ pub fn write_gltf_glb<W: Write>(
.extensions
.as_ref()
.and_then(|ext| ext.ext_texture_webp.as_ref())
.map_or(false, |_| true)
.is_some_and(|_| true)
});

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 @@ -865,5 +865,18 @@
"tranKeyValuePairAttribute": "tranKVPair",
"tranUsecaseAttribute": "tranUC",
"BuildingDataQualityAttribute": "bldgDQual",
"bldgDataQualityAttribute": "bldgDQual"
"bldgDataQualityAttribute": "bldgDQual",
"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 462113a

Please sign in to comment.