From a8098f2704ffaab7e5561858c9c107cd1d53aa5c Mon Sep 17 00:00:00 2001 From: satoshi komatsu <84182110+satoshi7190@users.noreply.github.com> Date: Mon, 27 Jan 2025 12:47:01 +0900 Subject: [PATCH] =?UTF-8?q?xal:Address=E3=81=AE=E5=AF=BE=E5=BF=9C=20(#692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #108 ### What I did(変更内容) - 竹芝、新宿、中央区、世田谷区のデータで動作確認済み - 竹芝のxal:Addressを含むulodの変換エラーは #694 で対応 ### Notes(連絡事項) None / なし --- nusamai-plateau/src/models/core.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/nusamai-plateau/src/models/core.rs b/nusamai-plateau/src/models/core.rs index dc6a3b277..8046dfe31 100644 --- a/nusamai-plateau/src/models/core.rs +++ b/nusamai-plateau/src/models/core.rs @@ -1,7 +1,24 @@ -use nusamai_citygml::citygml_data; +use nusamai_citygml::{citygml_data, CityGmlElement}; #[citygml_data(name = "core:Address")] #[citygml(allow_extra)] pub struct Address { - // TODO + #[citygml(path = b"core:xalAddress/xAL:AddressDetails")] + country: Vec, +} + +#[citygml_data(name = "xAL:AddressDetails")] +#[citygml(allow_extra)] +pub struct AddressDetail { + #[citygml(path = b"xAL:Country")] + country: Country, +} + +#[citygml_data(name = "xAL:Country")] +#[citygml(allow_extra)] +pub struct Country { + #[citygml(path = b"xAL:CountryName")] + name: Option, + #[citygml(path = b"xAL:Locality/xAL:LocalityName")] + locality_name: Option, }