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

nusamai-gpkg: 座標系の取り扱い #119

Closed
sorami opened this issue Dec 26, 2023 · 2 comments
Closed

nusamai-gpkg: 座標系の取り扱い #119

sorami opened this issue Dec 26, 2023 · 2 comments
Labels
GeoPackage Output Fomat Output format drivers

Comments

@sorami
Copy link
Member

sorami commented Dec 26, 2023

related #89

現在の実装( #89 )では、 4326 とベタ書きしている。

必要に応じて、これを変える。

必要なもの

  • gpkg_spatial_ref_sys テーブルでの、座標系定義
    • 現在は sql/init.sql に、ミニマムの三種類、書いてある
  • gpkg_contents テーブルでの指定( srs_id カラム )
  • gpkg_geometry_columns テーブルでの指定( srs_id カラム )
  • 地物バイナリのヘッダー
    • 現在は geometry.rsgeometry_header(srs_id: i32) で、指定できるようになっている
@sorami sorami added the Output Fomat Output format drivers label Dec 26, 2023
sorami added a commit that referenced this issue Dec 27, 2023
#89 を踏まえて、トップレベル都市オブジェクトをGeoPackageへ追加する部分を実装。

参考(Notion): [GeoPackage
メモ](https://www.notion.so/GeoPackage-56b53cc7ee5f4270a7df151d84bfb290)
(テーブルやバイナリの構造など)

## 大まかな流れ

- `GpkgHandler::init` (`src/handler.rs`)
  - `sql/init.sql` で、GeoPackage用のテーブルを作成
  - `sql/mpoly3d.sql` で、3Dマルチポリゴン用のテーブルを用意
- `GpkgHandler::add_object`
  - トップレベル都市オブジェクトを受け取り、DBへ追加
  - ジオメトリのバイナリを作る部分は `src/geometry.rs` にある

exampleの実行例:

```
$  cargo run --example gml2gpkg ~/plateau/13100_tokyo23-ku_2022_citygml_1_2_op/udx/bldg/53392546_bldg_6697_2_op.gml
```

## このPRで対応しない想定のイシュー

- #119
- #120
- #121
- #122
- #124 
- #125
@sorami
Copy link
Member Author

sorami commented Feb 27, 2024

関連 #333

@sorami
Copy link
Member Author

sorami commented Mar 5, 2024

#373 で対応された。

@sorami sorami closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeoPackage Output Fomat Output format drivers
Projects
None yet
Development

No branches or pull requests

2 participants