-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
橋梁モデルの属性読み込みとテスト #167 を含めています relate #165 --------- Co-authored-by: Taku Fukada <naninunenor@gmail.com>
- Loading branch information
Showing
18 changed files
with
84,489 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,349 @@ | ||
use nusamai_citygml::{citygml_feature, CityGMLElement}; | ||
use super::core::Address; | ||
use super::iur::uro; | ||
use nusamai_citygml::{citygml_feature, CityGMLElement, citygml_property, Code, GYear}; | ||
|
||
#[citygml_feature(name = "brid:Bridge")] | ||
pub struct Bridge { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<String>, | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:yearOfConstruction")] | ||
pub year_of_construction: Option<GYear>, | ||
|
||
#[citygml(path = b"brid:yearOfDemolition")] | ||
pub year_of_demolition: Option<GYear>, | ||
|
||
#[citygml(path = b"brid:isMovable")] | ||
pub is_movable: Option<bool>, | ||
|
||
#[citygml(path = b"brid:outerBridgeConstruction/brid:BridgeConstructionElement")] | ||
pub outer_bridge_construction: Vec<BridgeConstructionElement>, | ||
|
||
#[citygml(path = b"brid:outerBridgeInstallation/brid:BridgeInstallation")] | ||
pub outer_bridge_installation: Vec<BridgeInstallation>, | ||
|
||
#[citygml(path = b"brid:interiorBridgeInstallation/brid:IntBridgeInstallation")] | ||
pub interior_bridge_installation: Vec<IntBridgeInstallation>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
#[citygml(path = b"brid:interiorBridgeRoom/brid:BridgeRoom")] | ||
pub interior_bridge_room: Vec<BridgeRoom>, | ||
|
||
#[citygml(path = b"brid:consistsOfBridgePart/brid:BridgePart")] | ||
pub consists_of_bridge_part: Vec<BridgePart>, | ||
|
||
#[citygml(path = b"brid:address/core:Address")] | ||
pub address: Vec<Address>, | ||
|
||
#[citygml(path = b"uro:bridBaseAttribute/uro:ConstructionBaseAttribute")] | ||
pub brid_base_attribute: Vec<uro::ConstructionBaseAttribute>, | ||
|
||
#[citygml(path = b"uro:bridDataQualityAttribute/uro:ConstructionDataQualityAttribute")] | ||
pub brid_data_quality_attribute: Option<uro::ConstructionDataQualityAttribute>, | ||
|
||
#[citygml(path = b"uro:bridDisasterRiskAttribute")] | ||
pub brid_disaster_risk_attribute: Vec<uro::DisasterRiskAttributeProperty>, // -> uro:DisasterRiskAttribute | ||
|
||
#[citygml(path = b"uro:bridDmAttribute")] | ||
pub brid_dm_attribute: Vec<uro::DmAttributeProperty>, // -> uro:DmAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityAttribute")] | ||
pub brid_facility_attribute: Vec<uro::FacilityAttributeProperty>, // -> uro:FacilityAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityIdAttribute")] | ||
pub brid_facility_id_attribute: Option<uro::FacilityIdAttributeProperty>, // -> uro:FacilityIdAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityTypeAttribute/uro:FacilityTypeAttribute")] | ||
pub brid_facility_type_attribute: Vec<uro::FacilityTypeAttribute>, | ||
|
||
#[citygml(path = b"uro:bridFunctionalAttribute/uro:BridgeFunctionalAttribute")] | ||
pub brid_functional_attribute: Vec<uro::BridgeFunctionalAttribute>, | ||
|
||
#[citygml(path = b"uro:bridRiskAssessmentAttribute/uro:ConstructionRiskAssessmentAttribute")] | ||
pub brid_risk_assessment_attribute: Vec<uro::ConstructionRiskAssessmentAttribute>, | ||
|
||
#[citygml(path = b"uro:bridStructureAttribute/uro:BridgeStructureAttribute")] | ||
pub brid_structure_attribute: Vec<uro::BridgeStructureAttribute>, | ||
|
||
} | ||
|
||
|
||
#[citygml_feature(name = "brid:BridgePart")] | ||
pub struct BridgePart { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:yearOfConstruction")] | ||
pub year_of_construction: Option<GYear>, | ||
|
||
#[citygml(path = b"brid:yearOfDemolition")] | ||
pub year_of_demolition: Option<GYear>, | ||
|
||
#[citygml(path = b"brid:isMovable")] | ||
pub is_movable: Option<bool>, | ||
|
||
#[citygml(path = b"brid:outerBridgeConstruction/brid:BridgeConstructionElement")] | ||
pub outer_bridge_construction: Vec<BridgeConstructionElement>, | ||
|
||
#[citygml(path = b"brid:outerBridgeInstallation/brid:BridgeInstallation")] | ||
pub outer_bridge_installation: Vec<BridgeInstallation>, | ||
|
||
#[citygml(path = b"brid:interiorBridgeInstallation/brid:IntBridgeInstallation")] | ||
pub interior_bridge_installation: Vec<IntBridgeInstallation>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
#[citygml(path = b"brid:interiorBridgeRoom/brid:BridgeRoom")] | ||
pub interior_bridge_room: Vec<BridgeRoom>, | ||
|
||
#[citygml(path = b"brid:consistsOfBridgePart/brid:BridgePart")] | ||
pub consists_of_bridge_part: Vec<BridgePart>, | ||
|
||
#[citygml(path = b"brid:address/core:Address")] | ||
pub address: Vec<Address>, | ||
|
||
#[citygml(path = b"uro:bridBaseAttribute/uro:ConstructionBaseAttribute")] | ||
pub brid_base_attribute: Vec<uro::ConstructionBaseAttribute>, | ||
|
||
#[citygml(path = b"uro:bridDataQualityAttribute/uro:ConstructionDataQualityAttribute")] | ||
pub brid_data_quality_attribute: Option<uro::ConstructionDataQualityAttribute>, | ||
|
||
#[citygml(path = b"uro:bridDisasterRiskAttribute")] | ||
pub brid_disaster_risk_attribute: Vec<uro::DisasterRiskAttributeProperty>, // -> uro:DisasterRiskAttribute | ||
|
||
#[citygml(path = b"uro:bridDmAttribute")] | ||
pub brid_dm_attribute: Vec<uro::DmAttributeProperty>, // -> uro:DmAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityAttribute")] | ||
pub brid_facility_attribute: Vec<uro::FacilityAttributeProperty>, // -> uro:FacilityAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityIdAttribute")] | ||
pub brid_facility_id_attribute: Option<uro::FacilityIdAttributeProperty>, // -> uro:FacilityIdAttribute | ||
|
||
#[citygml(path = b"uro:bridFacilityTypeAttribute/uro:FacilityTypeAttribute")] | ||
pub brid_facility_type_attribute: Vec<uro::FacilityTypeAttribute>, | ||
|
||
#[citygml(path = b"uro:bridFunctionalAttribute/uro:BridgeFunctionalAttribute")] | ||
pub brid_functional_attribute: Vec<uro::BridgeFunctionalAttribute>, | ||
|
||
#[citygml(path = b"uro:bridRiskAssessmentAttribute/uro:ConstructionRiskAssessmentAttribute")] | ||
pub brid_risk_assessment_attribute: Vec<uro::ConstructionRiskAssessmentAttribute>, | ||
|
||
#[citygml(path = b"uro:bridStructureAttribute/uro:BridgeStructureAttribute")] | ||
pub brid_structure_attribute: Vec<uro::BridgeStructureAttribute>, | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:BridgeConstructionElement")] | ||
pub struct BridgeConstructionElement { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:BridgeRoom")] | ||
pub struct BridgeRoom { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
#[citygml(path = b"brid:interiorFurniture/brid:BridgeFurniture")] | ||
pub interior_furniture: Vec<BridgeFurniture>, | ||
|
||
#[citygml(path = b"brid:bridgeRoomInstallation/brid:IntBridgeInstallation")] | ||
pub bridge_room_installation: Vec<IntBridgeInstallation>, | ||
|
||
} | ||
#[citygml_feature(name = "brid:RoofSurface")] | ||
pub struct RoofSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:WallSurface")] | ||
pub struct WallSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:GroundSurface")] | ||
pub struct GroundSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:OuterCeilingSurface")] | ||
pub struct OuterCeilingSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:OuterFloorSurface")] | ||
pub struct OuterFloorSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:ClosureSurface")] | ||
pub struct ClosureSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:InteriorWallSurface")] | ||
pub struct InteriorWallSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
|
||
#[citygml_feature(name = "brid:BridgeInstallation")] | ||
pub struct BridgeInstallation { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:IntBridgeInstallation")] | ||
pub struct IntBridgeInstallation { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:boundedBy")] | ||
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:BridgeFurniture")] | ||
pub struct BridgeFurniture { | ||
#[citygml(path = b"brid:class")] | ||
pub class: Option<Code>, | ||
|
||
#[citygml(path = b"brid:function")] | ||
pub function: Vec<Code>, | ||
|
||
#[citygml(path = b"brid:usage")] | ||
pub usage: Vec<Code>, | ||
|
||
} | ||
|
||
#[citygml_property(name = "bldg:_OpeningProperty")] | ||
pub enum OpeningProperty { | ||
#[citygml(path = b"bldg:Door")] | ||
Door(Door), | ||
#[citygml(path = b"bldg:Window")] | ||
Window(Window), | ||
} | ||
|
||
// TODO: Building と類似の構造を持つ | ||
#[citygml_feature(name = "bldg:Door")] | ||
pub struct Door { | ||
#[citygml(path = b"uro:ifcOpeningAttribute")] | ||
pub ifc_opening_attribute: Vec<uro::IfcAttributeProperty>, // -> uro:IfcAttribute | ||
|
||
#[citygml(path = b"uro:indoorOpeningAttribute")] | ||
pub indoor_opening_attribute: Vec<uro::IndoorAttributeProperty>, // -> uro:IndoorAttribute | ||
|
||
#[citygml(path = b"bldg:address/core:Address")] | ||
pub address: Vec<Address>, | ||
|
||
} | ||
|
||
#[citygml_feature(name = "bldg:Window")] | ||
pub struct Window { | ||
#[citygml(path = b"uro:ifcOpeningAttribute")] | ||
pub ifc_opening_attribute: Vec<uro::IfcAttributeProperty>, // -> uro:IfcAttribute | ||
|
||
#[citygml(path = b"uro:indoorOpeningAttribute")] | ||
pub indoor_opening_attribute: Vec<uro::IndoorAttributeProperty>, // -> uro:IndoorAttribute | ||
|
||
} | ||
|
||
#[citygml_property(name = "brid:_BoundarySurfaceProperty")] | ||
pub enum BoundarySurfaceProperty { | ||
#[citygml(path = b"brid:CeilingSurface")] | ||
CeilingSurface(CeilingSurface), | ||
#[citygml(path = b"brid:ClosureSurface")] | ||
ClosureSurface(ClosureSurface), | ||
#[citygml(path = b"brid:FloorSurface")] | ||
FloorSurface(FloorSurface), | ||
#[citygml(path = b"brid:GroundSurface")] | ||
GroundSurface(GroundSurface), | ||
#[citygml(path = b"brid:InteriorWallSurface")] | ||
InteriorWallSurface(InteriorWallSurface), | ||
#[citygml(path = b"brid:OuterCeilingSurface")] | ||
OuterCeilingSurface(OuterCeilingSurface), | ||
#[citygml(path = b"brid:OuterFloorSurface")] | ||
OuterFloorSurface(OuterFloorSurface), | ||
#[citygml(path = b"brid:RoofSurface")] | ||
RoofSurface(RoofSurface), | ||
#[citygml(path = b"brid:WallSurface")] | ||
WallSurface(WallSurface), | ||
} | ||
|
||
#[citygml_feature(name = "brid:CeilingSurface")] | ||
pub struct CeilingSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} | ||
|
||
#[citygml_feature(name = "brid:FloorSurface")] | ||
pub struct FloorSurface { | ||
#[citygml(path = b"brid:opening")] | ||
pub opening: Vec<OpeningProperty>, // -> brid:_Opening | ||
|
||
} |
Oops, something went wrong.