3888 Commits

Author SHA1 Message Date
Sean Gillies
ffe77ecc7b
This is 1.4.0rc2 (#3183) 2024-09-23 11:04:50 -06:00
Alan D. Snow
fd4163d4b5
DEP: GDAL 3.5+, numpy 1.24+ (#3166)
* DEP: Python 3.10+, GDAL 3.5+, numpy 1.24+

* Apply suggestions from code review

* DEP: GDAL 3.5+, numpy 1.24+

* Fix

* remove python 3.13 from conda matrix

---------

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2024-09-09 21:59:11 -06:00
Sean Gillies
9de88d370d
Release 1.4.0rc1 (#3173)
* This is 1.4.0rc1

* Bump version
2024-09-09 12:26:39 -06:00
Sean Gillies
48513a07b4
This is 1.4b2 (#3159)
* This is 1.4b2

* Bump version
2024-09-09 09:05:40 -06:00
Sebastien Tremblay-Johnston
c2acc82ed2
docs: 📝 clarify usage of rpc_height in RPCTransformer usage example (#3158)
* docs: 📝 clarify usage of rpc_height in RPCTransformer usage example

Detail using a constant height offset via `rpc_height` keyword argument in instantiation of transformer.

* Apply suggestions from code review

Co-authored-by: Batuhan Kavlak <batuhan.kavlak@up42.com>

---------

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
Co-authored-by: Batuhan Kavlak <batuhan.kavlak@up42.com>
2024-09-06 11:27:52 -06:00
RichardScottOZ
3c7b65892f
One like a (#3170) 2024-09-05 08:15:01 -06:00
Alan D. Snow
4c7afed88a
CI: Use micromamba for tests (#3164) 2024-09-03 18:58:39 -06:00
Sean Gillies
1ac101d8d7
Use mask as alpha when reprojecting a masked array (#3156)
* Use mask as alpha when reprojecting a masked array

Resolves #2575

* Remove unnecessary nodata wranging

* Masked reprojection results depend on GDAL version

* Fix test expectations and mask scaling value

The tests of this PR are now only run for GDAL 3.8+ because the
outputs are too variable.

* Update change log
2024-08-30 10:14:35 -06:00
Sean Gillies
d917c5cd38
Use gdalvrt.xsd as a marker for GDAL's data directory (#3157)
* Use gdalvrt.xsd as a marker for GDAL's data directory

Resolves #3153

* Update change log

* Adjust tests
2024-08-30 08:35:42 -06:00
Mike Taves
4b74365873
BLD: remove pkg_resources.parse_version (#3154) 2024-08-29 15:54:52 -06:00
Sean Gillies
1f54d9cfa4
_OverviewResampling is OverviewResampling (#3151)
* _OverviewResampling is OverviewResampling

Resolves #2153

* Fix ref in change log
2024-08-28 09:49:44 -06:00
Sean Gillies
7c83de410b
Never pass key if/else without returning (#3146)
* Follow up to #3145

* Raise ValueError for an invalid mode string

* Remove superfluous conditional
2024-08-26 14:21:01 -06:00
Sean Gillies
03464e721b
Document use of rasterio.band() shortcut (#3147) 2024-08-26 12:21:11 -06:00
Evan McClain
a9411f8d81
Handle case where a MemoryFile is passed into open (#3145)
This was being improperly passed into the `hasattr(fp, 'read')` branch

Test with a small SRTM 3 file.
2024-08-23 15:02:25 -06:00
Sean Gillies
0daccc406d
Free string lists in get/set_proj_data_search_path() (#3140)
Resolves #2932
2024-08-19 15:41:25 -06:00
Sean Gillies
a467cbd786
Properly set color interpretation after writing a colormap (#3136)
* Properly set color interpretation after writing a colormap

Resolves #3133

* Appease flake8
2024-08-12 15:45:19 -06:00
Sean Gillies
01abf63156
1.4b1 release (#3137)
* This is 1.4b1

* THis is 1.4b1.dev
2024-08-12 15:14:37 -06:00
Sean Gillies
2832be37b9
Add stats(), clear_stats(), update_stats(), deprecate statistics() (#3134)
* Add stats(), clear_stats(), update_stats(), deprecate statistics()

Resolves #2806

* Update outdated statistics metadata by adding an .aux.xml file
2024-08-10 19:16:41 -06:00
Sean Gillies
87a582a391
Update code to Python 3.9 usage (#3132)
* Run pyupgrade --py39-up

* Run darker on previous pyupgrade changes
2024-08-10 18:22:54 -06:00
Sean Gillies
afc33d87a4
Allow rasterize() output to be captured in datasets (#3131)
* Allow rasterize() output to be captured in datasets.

Resolves #1018.

* Run pyupgrade on changed files
2024-08-10 17:58:41 -06:00
Sean Gillies
835c10b228
Add a merge CLI and Python tool option to use best source res (#3130)
* Add a merge CLI and Python tool option to use best source res

Resolves #2045

* Compute best resolution without a list

* Add a stack tool and update rio-stack command

* Add another test, comment out image generation

* Remove commented code, replace "merge" with "stack" in docs

* Add option to get a masked array.

Resolves #2691.
2024-08-08 15:59:29 -06:00
Pieter Roggemans
7f94c46eee
ENH: enable support for extra dtypes in features.shapes: int8 and float64 (#3125)
* ENH: enable support for more dtypes in features.shapes

* Update CHANGES.txt

* int8 needs gdal 3.7

* Add extra types to docstring

* Apply feedback: int8 only from version 3.7
2024-08-05 18:13:07 -06:00
Ryan Grout
40ece42ebb
Return numpy arrays from transformations (#3099)
* Return numpy arrays from transformations.

* Update tests.
2024-08-05 16:00:09 -06:00
Sean Gillies
91f51afcf9
Add a new MergeError and use it in the merge tool (#3126)
* Add a new MergeError and use it in the merge tool

Flipped and upside down sources now trigger this exception.

Resolves #3123

* Define new exception in merge.py

* Move MergeError, improve docs, add tests
2024-08-05 15:27:50 -06:00
Ryan Grout
321de72219
Clip rasters in chunks (#3098)
* Use subdivided windows for rio clip.

* Pair source windows with destination windows.

* Basic test to make sure clip works.
2024-08-05 15:01:00 -06:00
Sean Gillies
7629d39f32
Add an admonition about fork to the concurrency doc (#3127)
Resolves #2979
2024-08-05 13:57:29 -06:00
Sean Gillies
6246f99af8
Merge 1.3.10 (#3124)
* Document zip, zip+https etc

* Rel 1.3.10 (#3054)

* Require Numpy 2 when building

* Add support for testing Numpy 2/1 compatibility, call import_array()

* Fix job name and specs

* Change to github's docker repo

* Numpy 2 only for python version >= 3.9

* Add other test modules

* Delete source checkout before running tests

* Eliminate last use of pkg_resources

* Update change log and version

* Update change log again.

* Remove duplicated installs

* Revert "Rel 1.3.10 (#3054)" (#3059)

This reverts commit 8795878f02e719d77eb1a1e4fdf6fba772c575a2.

* Rel 1.3.10 take 2 (#3060)

* Require Numpy 2 when building

* Add support for testing Numpy 2/1 compatibility, call import_array()

* Fix job name and specs

* Change to github's docker repo

* Numpy 2 only for python version >= 3.9

* Add other test modules

* Delete source checkout before running tests

* Eliminate last use of pkg_resources

* Update change log and version

* Update change log again.

* Remove duplicated installs

* Disallow rotated rasters for merge 1.3.10

Resolves #3066

* This is 1.3.10

* Pin to 2.0.0rc1 exactly for this release

* Fix change log

* Resolve doc conflict and remove duped Makefile target

* Remove codecov step
2024-08-04 16:34:00 -06:00
Ryan Grout
2a884cd245
Add chunking to rio-convert. (#3097)
* Add chunking to rio-convert.

* Remove print statement.
2024-07-31 12:02:59 -06:00
Vincent Sarago
6e68bbb601
Python file opener VSI plugin: read-multi-range support (#3117)
* add multi-range-read for VSIPlugin

* Update tests/test_pyopener.py

* Add and use abstract base classes in the opener implementation

* Silence flake8

---------

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2024-07-30 16:30:52 -06:00
Vincent Sarago
9e643c3f56
Merge pull request #3107 from vincentsarago/patch/numpy2.0
update update numpy version
2024-07-16 17:59:43 +02:00
Vincent Sarago
03b3f9d8e9
Update pyproject.toml
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
2024-07-15 23:53:23 +02:00
Sean Gillies
74b574d2cf
Add tests with multiple GDAL threads and implement truncate (#3115)
* Add tests with multiple GDAL threads and implement truncate

Follow up to #3113

* Test using tiled rgb_lzw.tif files
2024-07-13 19:41:08 -06:00
Sean Gillies
5d65401be8
Port of Pyopener VSI plugin improvements in Fiona 1.10b2 (#3113)
* Port of Pyopener VSI plugin improvements in Fiona 1.10b2

* Don't use cpp flags for _vsiopener

* Update change log

* Update rasterio/_vsiopener.pyx

Co-authored-by: Alan D. Snow <alansnow21@gmail.com>

* Add threading and registration tests

---------

Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
2024-07-12 16:00:23 -06:00
vincentsarago
3cf69f3085 update requirements 2024-07-10 16:41:37 +02:00
vincentsarago
3c8755c43d Merge branch 'main' of https://github.com/rasterio/rasterio into patch/numpy2.0 2024-07-10 16:38:26 +02:00
Alan D. Snow
f3018c78a4
BUG: Use np.asanyarray in MemoryDataset for numpy 2 compat (#3109) 2024-07-05 07:57:06 -05:00
vincentsarago
c4470a8581 update action name 2024-06-21 11:14:44 +02:00
vincentsarago
b3091c87f1 update update numpy version 2024-06-21 11:08:03 +02:00
Sean Gillies
24d0845e57
Adjust test expectations in light of 3.9.0 (#3091)
* Adjust test expectations in light of 3.9.0

* Appease flake8

* xfail new shape mask test

See #3074
2024-05-10 08:45:37 -06:00
Obidur Rahman
7ea50edac1
Update vrt.py (#3088) 2024-05-09 20:51:32 -06:00
Ryan Grout
ec1ed0c27c
Generalize window_split (#3078)
* Generalize window_split.

* Update usage of window_split.

* Update rio calc.

* Add tests for subdivide.

* Remove test for _chunk_output.

* Remove pytest import.
2024-05-08 18:00:08 -06:00
Even Rouault
d2f0b04b44
tests.yaml: change macos-latest to macos-13 (#3084)
GHA has changed the macos-latest alias to macos-14 (arm64), hence to get
Intel Mac one now needs to explicitly select macos-13.
Cf https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
2024-04-28 14:27:16 -06:00
Sean Gillies
ff378ad74b
Fix denominator in max_pixels calculation (#3076)
* Fix denominator in max_pixels calculation

* Notes fixes in #3073 and #3076
2024-04-18 08:49:02 -06:00
Lukas Paulun
ef62b83dc6
Fix typo in calculation of max_pixels (#3073) 2024-04-17 18:36:32 -06:00
Ryan Grout
c9e29ebc36
Add test for out of range nodata value (#3075)
* Make np.can_cast usage compatible with numpy 2.

* Add test for out of range nodata value.
2024-04-17 16:14:03 -06:00
Adam J. Stewart
fe48b1ea9d
Remove run-time dependency on setuptools (#3071) 2024-04-17 08:56:09 -06:00
dependabot[bot]
f499225638
Bump actions/checkout from 2 to 4 (#3069)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 08:55:10 -06:00
Sean Gillies
93346404c4
Update change log and version for 1.4a3 (#3065)
* Update change log and version for 1.4a3

* xfail complex merge test with GDAL 3.8+

* Remove can_cast, add some debug logging to read()

* Add importlib-metadata to requirements for Python 3.9

* Rename VSI prefix to vsiriopener

* Update version
2024-04-16 16:03:51 -06:00
Ryan Grout
60deaefa7d
Better handling for complex values in merge (#3046)
* Better handling for complex dtypes and nodata values.

* Tests for complex dtypes.

* Fix test.
2024-04-09 08:42:46 -06:00
Sean Gillies
4a587a53e1
Remove obsolete tests, update change log (#3063)
Follow on to #3013
2024-04-09 08:32:27 -06:00