Skip to content

Commit

Permalink
Verkerk RasterSources reproject (#114)
Browse files Browse the repository at this point in the history
* Simpler test tiff matching memory source test data.

* Fix and rewrite raster sources.

* Changelog.

* Make dtype property an actual np.dtype.

* Pandas got stricter.

* Attempt to fix docs.

* Remove breakpoint.

* PR changes.

* Fix tests for fiona >= 10.

* Attempt to let geopandas free.

* Fix workflow.

* Remove older python versions from workflows.

* Reset workflows.

* Loosen workflow matrix a bit, but add a very case.

* Pin fiona in the workflow matrix.
  • Loading branch information
arjanverkerk authored Sep 30, 2024
1 parent f3f09a4 commit f331452
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 227 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
python: 3.8
numpy: "==1.24.4"
pins: "pygdal==3.0.4.* scipy==1.10.1 dask[delayed]==2023.5.0 pandas==1.5.3 geopandas==0.12.2 fiona==1.9.6"
- os: ubuntu-20.04
python: 3.8
numpy: "==1.18.*"
pins: "pygdal==3.0.4.* scipy==1.4.* dask[delayed]==2.9.* pandas==1.0.* geopandas==0.8.*"
pins: "pygdal==3.0.4.* scipy==1.4.* dask[delayed]==2.9.* pandas==1.0.* geopandas==0.* fiona==1.9.6"
- os: ubuntu-20.04
python: 3.9
numpy: "==1.20.*"
pins: "pygdal==3.0.4.* scipy==1.6.* dask[delayed]==2020.* pandas==1.1.* geopandas==0.9.*"
pins: "pygdal==3.0.4.* scipy==1.6.* dask[delayed]==2020.* pandas==1.1.* geopandas==0.* fiona==1.9.6"
- os: ubuntu-20.04
python: 3.9
numpy: "==1.21.*"
pins: "pygdal==3.0.4.* scipy==1.7.* dask[delayed]==2021.* pandas==1.3.* geopandas==0.10.*"
pins: "pygdal==3.0.4.* scipy==1.7.* dask[delayed]==2021.* pandas==1.3.* geopandas==0.* fiona==1.9.6"
- os: ubuntu-22.04
python: "3.10"
numpy: "==1.23.*"
pins: "pygdal==3.4.1.* scipy==1.9.* dask[delayed]==2021.7.* pandas==1.4.* geopandas==0.11.*"
pins: "pygdal==3.4.1.* scipy==1.9.* dask[delayed]==2021.7.* pandas==1.4.* geopandas==0.*"
- os: ubuntu-22.04
python: "3.11"
numpy: "==1.*"
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Changelog of dask-geomodeling
2.4.4 (2024-01-17)
------------------

- Fixed issue with raster sources returning wrong values.

- Fix Place block.


Expand Down
7 changes: 7 additions & 0 deletions dask_geomodeling/geometry/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ def merge_files(path, target, remove_source=False):
if source.encoding:
kwargs["encoding"] = source.encoding

# fiona 10 "identifies" json which would result in double "dumping"
kwargs["schema"]["properties"].update({
pname: "str"
for pname, ptype in kwargs["schema"]["properties"].items()
if ptype == "json"
})

with fiona.collection(target, "w", **kwargs) as out:
for source_path in source_paths:
with fiona.collection(source_path, "r") as source:
Expand Down
Loading

0 comments on commit f331452

Please sign in to comment.