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

出力ドライバー: Shapefile(シェープファイル) #198

Closed
15 tasks done
sorami opened this issue Jan 23, 2024 · 1 comment
Closed
15 tasks done

出力ドライバー: Shapefile(シェープファイル) #198

sorami opened this issue Jan 23, 2024 · 1 comment
Assignees
Labels
Output Fomat Output format drivers

Comments

@sorami
Copy link
Member

sorami commented Jan 23, 2024

調査メモ: RustでShapefile

TODO





  • MulitiPoint, MultiLineStringへの対応
@sorami sorami added the Output Fomat Output format drivers label Jan 23, 2024
@sorami sorami self-assigned this Jan 23, 2024
sorami added a commit that referenced this issue Jan 26, 2024
## 概要
- [x] `nusamai-shapefile` クレートの作成
- [x] `nusamai_geometry::MultiPoint` から Shapefile形式への変換
- [x] `examples/{read,write}.rs` - ファイル読み書きの参考例(tmp - 最終的に削除する)

まず例として小さく、MultiPointの部分のみを作ったプルリクです。方向性に問題ないかご確認いただけますでしょうか!

外部クレート [shapefile](https://docs.rs/shapefile/latest/shapefile/)
を用いて実装しています。

リファクタしてもらった `nusamai-geojson` の形(#154)をもとにしています(ので、それをやった @ciscorn
さんを明示的にレビューアーへ入れてみました)。

3D地物(`nusamai_geometry::MultiPoint::<3>`,
`shapefile::MultiPointZ`)のみで、2Dは考慮していません。

## その後の進め方

related #198

この方向性で問題なければ、それを踏まえて、以下の順に進めていく予定です:

- MultiLineString, MultiPolygonの変換
- Shapefile全体での出力
- Shapefile Sink
- (属性付与)

---------

Co-authored-by: Taku Fukada <naninunenor@gmail.com>
sorami added a commit that referenced this issue Jan 31, 2024
#198 

`nusamai-shapefile` クレートをもとに、読み込んだデータをshapefile出力するためのsinkを実装する。

- [x] sink内でのshapefile形式オブジェクトへの変換
- [x] (`indexed_polygon_to_shape()`
を、nusamai-shapefileクレートに追加した(これまではマルチポリゴンのみ))
- [x] Shapefileのファイル出力: `shp`, `shx`, `dbf`

projファイルの取り扱いや、Tauriへの接続は、別PRで行う(他のShapefile関連タスクは #198 を参照のこと)。
@sorami sorami assigned nokonoko1203 and unassigned sorami Mar 5, 2024
@nokonoko1203 nokonoko1203 added this to the 納品 milestone Mar 8, 2024
nokonoko1203 added a commit that referenced this issue Mar 8, 2024
close #424
related #198

以下の対応を残していますが、属性情報の付与・typenameごとの分割を行いました。

- [x] フィールド最大文字長のチェック
  - 255文字で切り捨てるようにしました
- [ ] 最大フィールド数のチェック
- [ ] gml_idの付与
- [ ] float・doubleの誤差周りの対応
- [ ] Shapefileの投影法情報ファイル出力を作成
- [ ] ファイルサイズのチェック(2GB制限)
- [ ] MulitiPoint, MultiLineStringへの対応



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **新機能**
    - アプリに検索機能を追加しました。

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@nokonoko1203
Copy link
Collaborator

リリース目標は達成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output Fomat Output format drivers
Projects
None yet
Development

No branches or pull requests

2 participants