Skip to content

Commit

Permalink
Plateau model landuse (#164)
Browse files Browse the repository at this point in the history
属性の土地利用モデルとテストの実装
  • Loading branch information
xinmiaooo authored Jan 10, 2024
2 parents d4b184c + 5e8cad5 commit 0a06082
Show file tree
Hide file tree
Showing 7 changed files with 18,120 additions and 3 deletions.
80 changes: 80 additions & 0 deletions nusamai-plateau/src/models/iur/uro/landuse.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
use nusamai_citygml::{
citygml_data, CityGMLElement, Code, GYear, Measure,
};

#[citygml_data(name = "uro:LandUseDetailAttribute")]
pub struct LandUseDetailAttribute {
#[citygml(path = b"uro:id")]
pub id: Option<String>,

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

#[citygml(path = b"uro:nominalArea")]
pub nominal_area: Option<Measure>,

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

#[citygml(path = b"uro:owner")]
pub owner: Option<String>,

#[citygml(path = b"uro:areaInSquareMeter")]
pub area_in_square_meter: Option<Measure>,

#[citygml(path = b"uro:areaInHa")]
pub area_in_ha: Option<Measure>,

#[citygml(path = b"uro:buildingCoverageRate")]
pub building_coverage_rate: Option<f64>,

#[citygml(path = b"uro:floorAreaRate")]
pub floor_area_rate: Option<f64>,

#[citygml(path = b"uro:specifiedBuildingCoverageRate")]
pub specified_building_coverage_rate: Option<f64>,

#[citygml(path = b"uro:specifiedFloorAreaRate")]
pub specified_floor_area_rate: Option<f64>,

#[citygml(path = b"uro:standardFloorAreaRate")]
pub standard_floor_area_rate: Option<f64>,

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

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

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

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

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

#[citygml(path = b"uro:reference")]
pub reference: Option<String>,

#[citygml(path = b"uro:note")]
pub note: Option<String>,

#[citygml(path = b"uro:surveyYear")]
pub survey_year: Option<GYear>,

}

#[citygml_data(name = "uro:LandUseDataQualityAttribute")]
pub struct LandUseDataQualityAttribute {
#[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:thematicSrcDesc")]
pub thematic_src_desc: Vec<Code>,

}
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 @@ -15,6 +15,7 @@ mod underground_building;
mod utility_network;
mod vegetation;
mod waterbody;
mod landuse;

pub use building::*;
pub use city_furniture::*;
Expand All @@ -32,3 +33,4 @@ pub use utility_network::*;
pub use vegetation::*;
pub use waterbody::*;
// pub use utility_network::*;
pub use landuse::*;
36 changes: 33 additions & 3 deletions nusamai-plateau/src/models/landuse.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
use nusamai_citygml::{citygml_feature, CityGMLElement};
use super::iur::uro;
use nusamai_citygml::{citygml_feature, CityGMLElement, Code};


#[citygml_feature(name = "luse:LandUse")]
pub struct LandUse {
// ...
}
#[citygml(path = b"luse:class")]
pub class: Option<Code>,

#[citygml(path = b"luse:function")]
pub function: Vec<Code>,

#[citygml(path = b"luse:usage")]
pub usage: Vec<Code>,

#[citygml(path = b"uro:ifcLandUseAttribute")]
pub ifc_land_use_attribute: Vec<uro::IfcAttributeProperty>, // -> uro:IfcAttribute

#[citygml(path = b"uro:landUseDetailAttribute/uro:LandUseDetailAttribute")]
pub land_use_detail_attribute: Vec<uro::LandUseDetailAttribute>,

#[citygml(path = b"uro:luseDataQualityAttribute/uro:LandUseDataQualityAttribute")]
pub luse_data_quality_attribute: Option<uro::LandUseDataQualityAttribute>,

#[citygml(path = b"uro:luseDmAttribute")]
pub luse_dm_attribute: Vec<uro::DmAttributeProperty>, // -> uro:DmAttribute

#[citygml(path = b"uro:luseFacilityAttribute")]
pub luse_facility_attribute: Vec<uro::FacilityAttributeProperty>, // -> uro:FacilityAttribute

#[citygml(path = b"uro:luseFacilityIdAttribute")]
pub luse_facility_id_attribute: Option<uro::FacilityIdAttributeProperty>, // -> uro:FacilityIdAttribute

#[citygml(path = b"uro:luseFacilityTypeAttribute/uro:FacilityTypeAttribute")]
pub luse_facility_type_attribute: Vec<uro::FacilityTypeAttribute>,
}
Loading

0 comments on commit 0a06082

Please sign in to comment.