-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
施設管理の応用スキーマと公共測量標準図式の応用スキーマのスタブを実装 (#82)
(#70 を補助するPRとして、#81 の問題の一部を解決する) 施設管理まわりと公共測量標準図式まわりについて、おおよその形を示してあります。 すべてを実装しているわけではなく、特に、大量の `FacilityAttribute` まわりについては一切実装していないです。 CityFurniture でこれらのデータが付属するものは今のところなさそうなので、テストもありません。
- Loading branch information
Showing
10 changed files
with
381 additions
and
78 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,153 @@ | ||
use citygml::{CityGMLElement, Code, GeometryRef, Measure}; | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Default, Debug, CityGMLElement)] | ||
pub enum DmAttributeProperty { | ||
#[default] | ||
Unknown, | ||
#[citygml(path = b"uro:DmAnnotation")] | ||
DmAnnotation(DmAnnotation), | ||
#[citygml(path = b"uro:DmGeometricAttribute")] | ||
DmGeometricAttribute(DmGeometricAttribute), | ||
} | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Default, Debug, CityGMLElement)] | ||
pub struct DmAnnotation { | ||
#[citygml(path = b"uro:dmCode")] | ||
pub dm_code: Option<Code>, | ||
|
||
#[citygml(path = b"uro:meshCode")] | ||
pub mesh_code: Vec<Code>, | ||
|
||
#[citygml(path = b"uro:dmElement/uro:DmElement")] | ||
pub dm_element: Option<DmElement>, | ||
|
||
#[citygml(path = b"uro:geometryType")] | ||
pub geometry_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:shapeType")] | ||
pub shape_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:label")] | ||
pub label: Option<Code>, | ||
|
||
#[citygml(path = b"uro:isVertical")] | ||
pub is_vertical: Option<bool>, | ||
|
||
#[citygml(path = b"uro:size")] | ||
pub size: Option<i64>, | ||
|
||
#[citygml(path = b"uro:orientation")] | ||
pub orientation: Option<i64>, | ||
|
||
#[citygml(path = b"uro:linewidth")] | ||
pub linewidth: Option<i64>, | ||
|
||
#[citygml(path = b"uro:spacing")] | ||
pub spacing: Option<i64>, | ||
// TODO: | ||
// #[citygml(path = b"uro:lod0anchorPoint")] | ||
// pub lod0anchorPoint: GeometryPropertyType | ||
} | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Default, Debug, CityGMLElement)] | ||
pub struct DmGeometricAttribute { | ||
#[citygml(geom = b"uro")] | ||
pub geometry: GeometryRef, | ||
|
||
#[citygml(path = b"uro:dmCode")] | ||
pub dm_code: Option<Code>, | ||
|
||
#[citygml(path = b"uro:meshCode")] | ||
pub mesh_code: Vec<Code>, | ||
|
||
#[citygml(path = b"uro:dmElement/uro:DmElement")] | ||
pub dm_element: Option<DmElement>, | ||
|
||
#[citygml(path = b"uro:geometryType")] | ||
pub geometry_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:mapLevel")] | ||
pub map_level: Option<Code>, | ||
|
||
#[citygml(path = b"uro:shapeType")] | ||
pub shape_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:visibility")] | ||
pub visibility: Option<bool>, | ||
|
||
#[citygml(path = b"uro:is3d")] | ||
pub is3d: Option<bool>, | ||
|
||
#[citygml(path = b"uro:isInstallation")] | ||
pub is_installation: Option<bool>, | ||
|
||
#[citygml(path = b"uro:isEdited")] | ||
pub is_edited: Option<bool>, | ||
|
||
#[citygml(path = b"uro:isSupplementarySymbol")] | ||
pub is_supplementary_symbol: Option<bool>, | ||
|
||
#[citygml(path = b"uro:angle")] | ||
pub angle: Option<f64>, | ||
|
||
#[citygml(path = b"uro:elevation")] | ||
pub elevation: Option<Measure>, | ||
// TODO: | ||
// #[citygml(path = b"uro:lod0Geometry")] | ||
// pub lod0anchorPoint: GeometryPropertyType | ||
} | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Default, Debug, CityGMLElement)] | ||
pub struct DmElement { | ||
#[citygml(path = b"uro:locationType")] | ||
pub location_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:infoType")] | ||
pub info_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:elementKey")] | ||
pub element_key: Option<String>, | ||
|
||
#[citygml(path = b"uro:hierarchyLevel")] | ||
pub hierarchy_level: Option<String>, | ||
|
||
#[citygml(path = b"uro:dataType")] | ||
pub data_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:annotationType")] | ||
pub annotation_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:precisionType")] | ||
pub precision_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:dislocationType")] | ||
pub dislocation_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:breakType")] | ||
pub break_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:attributeValue")] | ||
pub attribute_value: Option<String>, | ||
|
||
#[citygml(path = b"uro:attributeType")] | ||
pub attribute_type: Option<Code>, | ||
|
||
#[citygml(path = b"uro:attributeValueType")] | ||
pub attribute_value_type: Option<String>, | ||
|
||
#[citygml(path = b"uro:creationDate")] | ||
pub creation_date: Option<String>, // TODO: xs:gYearMonth | ||
|
||
#[citygml(path = b"uro:updateDate")] | ||
pub update_date: Option<String>, // TODO: xs:gYearMonth | ||
|
||
#[citygml(path = b"uro:terminationDate")] | ||
pub termination_date: Option<String>, // TODO: xs:gYearMonth | ||
|
||
#[citygml(path = b"uro:freeSpace")] | ||
pub free_space: Option<String>, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
use citygml::CityGMLElement; | ||
|
||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[derive(Default, Debug, CityGMLElement)] | ||
pub enum FacilityAttributeProperty { | ||
#[default] | ||
Unknown, | ||
// TODO: | ||
// #[citygml(path = b"uro:CargoHandlingFacility")] | ||
// CargoHandlingFacility(CargoHandlingFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:CyberportMarinaAndPBS")] | ||
// CyberportMarinaAndPBS(CyberportMarinaAndPBS), | ||
// TODO: | ||
// #[citygml(path = b"uro:FishingPortAttribute")] | ||
// FishingPortAttribute(FishingPortAttribute), | ||
// TODO: | ||
// #[citygml(path = b"uro:FishingPortCapacity")] | ||
// FishingPortAttribute(FishingPortAttribute), | ||
// TODO: | ||
// #[citygml(path = b"uro:FishingPortFacility")] | ||
// FishingPortFacility(FishingPortFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:HarborFacility")] | ||
// HarborFacility(HarborFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:MaintenanceHistoryAttribute")] | ||
// MaintenanceHistoryAttribute(MaintenanceHistoryAttribute), | ||
// TODO: | ||
// #[citygml(path = b"uro:MooringFacility")] | ||
// MooringFacility(MooringFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:NavigationAssistanceFacility")] | ||
// NavigationAssistanceFacility(NavigationAssistanceFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortAttribute")] | ||
// PortAttribute(PortAttribute), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortEnvironmentalImprovementFacility")] | ||
// PortEnvironmentalImprovementFacility(PortEnvironmentalImprovementFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortManagementFacility")] | ||
// PortManagementFacility(PortManagementFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortPassengerFacility")] | ||
// PortPassengerFacility(PortPassengerFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortPollutionControlFacility")] | ||
// PortPollutionControlFacility(PortPollutionControlFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortProtectiveFacility")] | ||
// PortProtectiveFacility(PortProtectiveFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortStorageFacility")] | ||
// PortStorageFacility(PortStorageFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortTransportationFacility")] | ||
// PortTransportationFacility(PortTransportationFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortWasteTreatmentFacility")] | ||
// PortWasteTreatmentFacility(PortWasteTreatmentFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:PortWelfareFacility")] | ||
// PortWelfareFacility(PortWelfareFacility), | ||
// TODO: | ||
// #[citygml(path = b"uro:ShipServiceFacility")] | ||
// ShipServiceFacility(ShipServiceFacility), | ||
} |
Oops, something went wrong.