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

Generic write from GeoInterface compatible geometries #77

Merged
merged 12 commits into from
Dec 13, 2022
Merged

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Dec 11, 2022

This is a rehash of #34, but working with any GeoInterface.jl geometries, lazily.

I feel that Shapefile.jl should cover the spaces that GDAL fails, which is reading and writing very large datasets quickly.

(You could probably write a larger than-memory mmaped GeoJSON.jl file to a shapefile with this, if you only had 2GB RAM and sanity didn't prevail first)

Any stress testing and feedback would be good at this stage.

Note: there is a bunch of seemingly unrelated new code/changes for

  1. reusing file header read/write between shp and shx files - its the same header in both
  2. equality comparisons of geoms here. It's useful for testing and may as well work.

This just made writing the PR easier.

cchderrick and others added 6 commits November 24, 2022 19:04
bugs:
1. Incomplete PolylineM writers
2. Misshandling of missing in `get_mrange`, main writting block
3. Missed Multipatch type for no M-values
4. Incorrect bytes information for record length
@rafaqz rafaqz requested review from visr and evetion December 11, 2022 21:06
src/common.jl Show resolved Hide resolved
src/Shapefile.jl Outdated Show resolved Hide resolved
src/common.jl Outdated Show resolved Hide resolved
src/points.jl Outdated Show resolved Hide resolved
src/multipoints.jl Show resolved Hide resolved
src/writer.jl Outdated Show resolved Hide resolved
src/writer.jl Outdated Show resolved Hide resolved
src/writer.jl Show resolved Hide resolved
src/writer.jl Outdated Show resolved Hide resolved
src/writer.jl Show resolved Hide resolved
@evetion
Copy link
Member

evetion commented Dec 13, 2022

Maybe add a test for a simple table with a geometry column, to also test that code path (most commonly use case?)

test/writer.jl Outdated Show resolved Hide resolved
@rafaqz
Copy link
Member Author

rafaqz commented Dec 13, 2022

Thanks! already pushed the Table test and a few of the fixes you wanted, was hoping to get them in before you reviewed 😅

@rafaqz
Copy link
Member Author

rafaqz commented Dec 13, 2022

Thanks for the comments I think that's a big improvement. It should be good to go, I have to sleep but feel free to merge if you are ok with it now.

Edit: merged

@rafaqz rafaqz merged commit 4e6db3c into main Dec 13, 2022
@rafaqz rafaqz deleted the rs/write_shp branch December 13, 2022 22:20
rafaqz and others added 3 commits December 13, 2022 23:45
Co-authored-by: Maarten Pronk <evetion@users.noreply.github.com>
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.

None yet

3 participants