Skip to content

Commit a8098f2

Browse files
authored
xal:Addressの対応 (#692)
<!-- Close or Related Issues --> Close #108 ### What I did(変更内容) <!-- Please describe the motivation behind this PR and the changes it introduces. --> <!-- どのような変更をしますか? 目的は? --> - 竹芝、新宿、中央区、世田谷区のデータで動作確認済み - 竹芝のxal:Addressを含むulodの変換エラーは #694 で対応 ### Notes(連絡事項) <!-- If manual testing is required, please describe the procedure. --> <!-- 手動での動作確認が必要なら手順を簡単に伝えてください。そのほか連絡事項など。 --> None / なし
1 parent 387960c commit a8098f2

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

nusamai-plateau/src/models/core.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
use nusamai_citygml::citygml_data;
1+
use nusamai_citygml::{citygml_data, CityGmlElement};
22

33
#[citygml_data(name = "core:Address")]
44
#[citygml(allow_extra)]
55
pub struct Address {
6-
// TODO
6+
#[citygml(path = b"core:xalAddress/xAL:AddressDetails")]
7+
country: Vec<AddressDetail>,
8+
}
9+
10+
#[citygml_data(name = "xAL:AddressDetails")]
11+
#[citygml(allow_extra)]
12+
pub struct AddressDetail {
13+
#[citygml(path = b"xAL:Country")]
14+
country: Country,
15+
}
16+
17+
#[citygml_data(name = "xAL:Country")]
18+
#[citygml(allow_extra)]
19+
pub struct Country {
20+
#[citygml(path = b"xAL:CountryName")]
21+
name: Option<String>,
22+
#[citygml(path = b"xAL:Locality/xAL:LocalityName")]
23+
locality_name: Option<String>,
724
}

0 commit comments

Comments
 (0)