Skip to content

Commit

Permalink
xal:Addressの対応 (#692)
Browse files Browse the repository at this point in the history
<!-- 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 / なし
  • Loading branch information
satoshi7190 authored Jan 27, 2025
1 parent 387960c commit a8098f2
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions nusamai-plateau/src/models/core.rs
Original file line number Diff line number Diff line change
@@ -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<AddressDetail>,
}

#[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<String>,
#[citygml(path = b"xAL:Locality/xAL:LocalityName")]
locality_name: Option<String>,
}

0 comments on commit a8098f2

Please sign in to comment.