Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#169 修正用ブランチ #197

Merged
merged 7 commits into from
Jan 23, 2024
Merged

#169 修正用ブランチ #197

merged 7 commits into from
Jan 23, 2024

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Jan 22, 2024

#169 を、既存のコードベースに影響を与えない、実験用のSinkとしてマージできるようにする。

@ciscorn ciscorn changed the base branch from main to share-geom-store January 22, 2024 11:06
#160

- CityObjectを受け取り、以下のようなことを行う一連の処理群を仮実装しました
  - CityObject.root(Feature)から子要素のFeatureを抽出
  - Dataを別レイヤー化
  - 子要素の別地物化
  - 属性情報の個別変換- 
- sinkなどから利用することを想定しています
- 特に問題ないということであればそれはそれで良いのですが、あくまで仮実装のイメージで、今後ブラッシュアップしていきます
  - 挙動
  - 設定方法
  - 出力されるCityObject
  - 出力ドライバーでの扱い
  - プログラムの構造

- 以下のようなコマンドで動作します
  - リポジトリのルートに「マッピングルール」を想定した、以下のようなJSONファイルを置いてください
- 実行後、リポジトリのルートに「output_object.json」が出力されます
  - これをsink内で利用して出力していく想定です


[mappings.json](https://github.com/MIERUNE/nusamai/files/13983445/mappings.json)

```bash
cargo run --package nusamai /Users/satoru/Downloads/plateau/22203_numazu-shi_2021_citygml_4_op/udx/bldg/52385618_bldg_6697_op.gml --sink geojson --output ~/Downloads/output/output.geojson
```

---------

Co-authored-by: Taku Fukada <naninunenor@gmail.com>
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 409 lines in your changes are missing coverage. Please review.

Files Patch % Lines
...usamai/src/sink/geojson_transform_exp/transform.rs 25.12% 298 Missing ⚠️
nusamai/src/sink/geojson_transform_exp/mod.rs 41.48% 110 Missing ⚠️
nusamai/src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
GUI ∅ <ø> (∅)
Backend 65.23% <30.44%> (-14.67%) ⬇️
Libraries 92.34% <100.00%> (ø)

📢 Thoughts on this report? Let us know!

@ciscorn ciscorn assigned xinmiaooo and ciscorn and unassigned xinmiaooo Jan 22, 2024
Base automatically changed from share-geom-store to main January 22, 2024 23:44
}
}

fn flatten(
Copy link
Member Author

@ciscorn ciscorn Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1つ目の子までしか見ていなかったので、再帰的に展開するように変更。

}
}

impl Transform for SerialTransform {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transformを直列にしたものもTransformである、ようにしておく。

@ciscorn ciscorn requested a review from nokonoko1203 January 23, 2024 06:22
let mut entities = serial_transform.transform(entity);

// 属性の変換などを行うEditor
let mut traversal = SerialEditor {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

エディターかーなるほどー

Copy link
Collaborator

@nokonoko1203 nokonoko1203 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
ありがとうございましたー!

@ciscorn ciscorn merged commit 439f62e into main Jan 23, 2024
3 of 4 checks passed
@ciscorn ciscorn deleted the transform-experiment branch January 23, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants