Skip to content

Commit

Permalink
feat: add BuildingDataQualityAttribute struct and integrate it into e…
Browse files Browse the repository at this point in the history
…xisting models (#40)
  • Loading branch information
miseyu authored Jan 23, 2025
1 parent 5ceecd9 commit b8f6151
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
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 @@ -77,6 +77,26 @@ 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: Vec<Code>,

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

#[citygml_data(name = "uro:PublicSurveyDataQualityAttribute")]
Expand Down
9 changes: 9 additions & 0 deletions nusamai-plateau/src/models/iur/uro/dem.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use nusamai_citygml::{citygml_feature, CityGmlElement};

use super::common::DataQualityAttribute;

#[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 @@ -60,6 +60,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
3 changes: 3 additions & 0 deletions nusamai-plateau/src/models/relief.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ pub struct ReliefFeature {

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

#[citygml(path = b"uro:demDataQualityAttribute", required)]
pub dem_data_quality_attribute: Option<uro::DemDataQualityAttribute>,
}

#[citygml_property(name = "dem:_ReliefComponentProperty")]
Expand Down

0 comments on commit b8f6151

Please sign in to comment.