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

feat: add BuildingDataQualityAttribute struct and integrate it into existing models #40

Merged
merged 1 commit into from
Jan 23, 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 @@ -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>,
miseyu marked this conversation as resolved.
Show resolved Hide resolved

#[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
Loading