Skip to content

Commit

Permalink
Merge branch 'main' into feature/xalAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshi7190 committed Jan 27, 2025
2 parents 50bd2ad + 387960c commit e1d1b82
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 4 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
41 changes: 41 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 Expand Up @@ -58,6 +78,27 @@ pub struct DataQualityAttribute {

#[citygml(path = b"uro:publicSurveyDataQualityAttribute/uro:PublicSurveyDataQualityAttribute")]
pub public_survey_data_quality_attribute: Option<PublicSurveyDataQualityAttribute>,

#[citygml(path = b"uro:BuildingDataQualityAttribute")]
pub building_data_quality_attribute: Option<BuildingDataQualityAttribute>,
}

#[citygml_data(name = "uro:BuildingDataQualityAttribute")]
pub struct BuildingDataQualityAttribute {
#[citygml(path = b"uro:srcScale")]
pub src_scale: Vec<Code>,

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

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

#[citygml(path = b"uro:lod1HeightType")]
pub lod1_height_type: Option<Code>,

#[citygml(path = b"uro:lodType")]
pub lod_type: Vec<Code>,
}

#[citygml_data(name = "uro:PublicSurveyDataQualityAttribute")]
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
3 changes: 3 additions & 0 deletions nusamai-plateau/src/models/iur/uro/underground_building.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ pub struct UndergroundBuilding {
#[citygml(path = b"uro:bldgDataQualityAttribute/uro:DataQualityAttribute")]
pub bldg_data_quality_attribute: Option<uro::DataQualityAttribute>,

#[citygml(path = b"uro:buildingDataQualityAttribute")]
pub building_data_quality_attribute: Option<uro::DataQualityAttribute>,

#[citygml(path = b"uro:buildingDisasterRiskAttribute")]
#[citygml(path = b"uro:bldgDisasterRiskAttribute")]
pub bldg_disaster_risk_attribute: Vec<uro::DisasterRiskAttributeProperty>, // -> uro:DisasterRiskAttribute
Expand Down
2 changes: 1 addition & 1 deletion nusamai-plateau/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub enum TopLevelCityObject {
// i-UR urban objects
//
#[citygml(path = b"uro:UndergroundBuilding")]
UndergroundBuilding(uro::UndergroundBuilding),
UndergroundBuilding(Box<uro::UndergroundBuilding>),
#[citygml(path = b"uro:Appurtenance")]
Appurtenance(uro::Appurtenance),
#[citygml(path = b"uro:Cable")]
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
17 changes: 16 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,20 @@
"bldgUsecaseAttribute": "bldgUC",
"frnKeyValuePairAttribute": "frnKVPair",
"tranKeyValuePairAttribute": "tranKVPair",
"tranUsecaseAttribute": "tranUC"
"tranUsecaseAttribute": "tranUC",
"BuildingDataQualityAttribute": "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 e1d1b82

Please sign in to comment.