Skip to content

Commit

Permalink
データ読み込みテストを少し整理、など (#186)
Browse files Browse the repository at this point in the history
CityGMLモデルのテストなどを少し改善

- テストまわりを少し調整。DEMのテストも足したので、 #165 はいったん閉じる。
- **Int**BuildingInstallation などは BuildingInstallation などと統合する(CityGML
3.0で両者は統合されたので、我々の内部でもしれっと統合しておくのがよいと思っている)
- etc.

Close #165
  • Loading branch information
ciscorn authored Jan 16, 2024
1 parent 67fbed4 commit 02efaf5
Show file tree
Hide file tree
Showing 11 changed files with 435,716 additions and 569,914 deletions.
59 changes: 20 additions & 39 deletions nusamai-plateau/src/models/bridge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::core::Address;
use super::iur::uro;
use nusamai_citygml::{citygml_feature, CityGMLElement, citygml_property, Code, GYear};
use nusamai_citygml::{citygml_feature, citygml_property, CityGMLElement, Code, GYear};

#[citygml_feature(name = "brid:Bridge")]
pub struct Bridge {
Expand Down Expand Up @@ -29,7 +29,7 @@ pub struct Bridge {
pub outer_bridge_installation: Vec<BridgeInstallation>,

#[citygml(path = b"brid:interiorBridgeInstallation/brid:IntBridgeInstallation")]
pub interior_bridge_installation: Vec<IntBridgeInstallation>,
pub interior_bridge_installation: Vec<BridgeInstallation>,

#[citygml(path = b"brid:boundedBy")]
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface
Expand Down Expand Up @@ -72,10 +72,8 @@ pub struct Bridge {

#[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")]
Expand Down Expand Up @@ -103,7 +101,7 @@ pub struct BridgePart {
pub outer_bridge_installation: Vec<BridgeInstallation>,

#[citygml(path = b"brid:interiorBridgeInstallation/brid:IntBridgeInstallation")]
pub interior_bridge_installation: Vec<IntBridgeInstallation>,
pub interior_bridge_installation: Vec<BridgeInstallation>,

#[citygml(path = b"brid:boundedBy")]
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface
Expand Down Expand Up @@ -146,7 +144,6 @@ pub struct BridgePart {

#[citygml(path = b"uro:bridStructureAttribute/uro:BridgeStructureAttribute")]
pub brid_structure_attribute: Vec<uro::BridgeStructureAttribute>,

}

#[citygml_feature(name = "brid:BridgeConstructionElement")]
Expand All @@ -162,7 +159,6 @@ pub struct BridgeConstructionElement {

#[citygml(path = b"brid:boundedBy")]
pub bounded_by: Vec<BoundarySurfaceProperty>, // -> brid:_BoundarySurface

}

#[citygml_feature(name = "brid:BridgeRoom")]
Expand All @@ -183,59 +179,50 @@ pub struct BridgeRoom {
pub interior_furniture: Vec<BridgeFurniture>,

#[citygml(path = b"brid:bridgeRoomInstallation/brid:IntBridgeInstallation")]
pub bridge_room_installation: Vec<IntBridgeInstallation>,

pub bridge_room_installation: Vec<BridgeInstallation>,
}
#[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")]
Expand All @@ -249,24 +236,23 @@ pub struct BridgeInstallation {

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

}
// Intentionally not used to facilitate transition to CityGML 3.0.
// #[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 {
Expand All @@ -278,7 +264,6 @@ pub struct BridgeFurniture {

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

}

#[citygml_property(name = "bldg:_OpeningProperty")]
Expand All @@ -299,7 +284,6 @@ pub struct Door {

#[citygml(path = b"bldg:address/core:Address")]
pub address: Vec<Address>,

}

#[citygml_feature(name = "bldg:Window")]
Expand All @@ -309,7 +293,6 @@ pub struct Window {

#[citygml(path = b"uro:indoorOpeningAttribute")]
pub indoor_opening_attribute: Vec<uro::IndoorAttributeProperty>, // -> uro:IndoorAttribute

}

#[citygml_property(name = "brid:_BoundarySurfaceProperty")]
Expand Down Expand Up @@ -338,12 +321,10 @@ pub enum BoundarySurfaceProperty {
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

}
}
19 changes: 19 additions & 0 deletions nusamai-plateau/src/models/building.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,25 @@ pub struct BuildingInstallation {
pub ifc_building_installation_attribute: Vec<uro::IfcAttributeProperty>, // -> uro:IfcAttribute
}

// Intentionally not used to facilitate transition to CityGML 3.0.
// #[citygml_feature(name = "bldg:BuildingInstallation")]
// pub struct BuildingInstallation {
// #[citygml(path = b"bldg:class")]
// pub class: Option<Code>,
//
// #[citygml(path = b"bldg:function")]
// pub function: Vec<Code>,
//
// #[citygml(path = b"bldg:usage")]
// pub usage: Vec<Code>,
//
// #[citygml(path = b"bldg:boundedBy")]
// pub bounded_by: Vec<BoundarySurfaceProperty>, // -> bldg:_BoundarySurface
//
// #[citygml(path = b"uro:ifcBuildingInstallationAttribute")]
// pub ifc_building_installation_attribute: Vec<uro::IfcAttributeProperty>, // -> uro:IfcAttribute
// }

#[citygml_feature(name = "bldg:BuildingFurniture")]
pub struct BuildingFurniture {
#[citygml(path = b"bldg:class")]
Expand Down
1 change: 0 additions & 1 deletion nusamai-plateau/src/models/cityobjectgroup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub struct CityObjectGroup {
// #[citygml(path = b"grp:geometry")]
// pub geometry: Option<GeometryProperty>, // -> gml:_Geometry
//

#[citygml(path = b"uro:fiscalYearOfPublication")]
pub fiscal_year_of_publication: Vec<GYear>,

Expand Down
Loading

0 comments on commit 02efaf5

Please sign in to comment.