1480 Commits

Author SHA1 Message Date
Maxwell Lindsay
8ef5f51449 run darker formatter 2023-05-31 09:07:46 +02:00
Maxwell Lindsay
7be425d9c3 option name change to --to-data-window 2023-05-31 08:50:16 +02:00
Maxwell Lindsay
3825067736 add test for data window clip
change rio clip test to reflect new missing parameters message
2023-05-30 22:55:54 +02:00
Maxwell Lindsay
2c047825fe added a test raster for case 2023-05-30 20:39:15 +02:00
Sean Gillies
ccca0cb9be Merge tag '1.3.7' into main 2023-05-22 18:05:41 -06:00
Sean Gillies
5dd56f352e
Extend sieve's input to allow opened datasets and multiband objects (#2838)
* Extend sieve's input to allow opened datasets and multiband objects

Resolves #2782

* Remove commented code, clean up imports
2023-05-22 14:14:58 -06:00
Sean Gillies
01282c9ee2
uint64 is GDAL data type 12 and int64 is 13 (#2836)
Resolves #2663
2023-05-19 11:10:12 -06:00
Sean Gillies
24e2cd4bc0 Remove unused import and deprecated usage 2023-05-19 10:32:22 -06:00
Sean Gillies
dce1c75880 Don't split on a "!" within a URI's userinfo subcomponent
Resolves #2776
2023-05-19 10:22:50 -06:00
Sean Gillies
578a3c5bfc
Int8 related backports from main (#2834)
* Take into account GDAL >= 3.7 GDT_Int8 signed int8 datatype (fixes #2635) (#2656)

* ENH: Added int8 dtype to rasterize (#2780)

---------

Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
2023-05-18 13:33:53 -06:00
Sean Gillies
b9951df81a
Fix the nodata mask value in sample_gen() (#2832)
Resolves #2830
2023-05-16 16:21:53 -06:00
Sean Gillies
089cd160f6
Turn down logging level for non-existing files in the Python file VSI plugin (#2827)
* Use GDAL_PAM_ENABLED=False in combo with FilePath

Resolves #2826

* Turn down logging level in Python File VSI plugin callback

* Rename test, add missing details to FilePath docstring

* Note fix for 2826
2023-05-15 17:56:27 -06:00
Sean Gillies
74c4a7c93a Adapt tests to work with GDAL 3.7 changes around SIGNEDBYTE 2023-04-26 09:21:45 -06:00
Daniel Evans
e9c3dbad49 Fix calculation of bounds in transform.array_bounds (#2790)
Fixes #2787.

The method of computing raster bounds in `rasterio.transform.array_bounds`
assumes a standard GIS orientation of the image - origin bottom left, north
up, east right. If the image is rotated in any way, the returned bounds
may be in the correct order (e.g. `east` is west of `west`), or may
be entirely incorrect.

Replace the current implementation with the more general calculation used
in DatasetBase.bounds. Add an array of tests to both implementations,
passing in various transforms.
2023-04-25 14:29:29 -06:00
Daniel Evans
09c3fe2a9d
Fix calculation of bounds in transform.array_bounds (#2790)
Fixes #2787.

The method of computing raster bounds in `rasterio.transform.array_bounds`
assumes a standard GIS orientation of the image - origin bottom left, north
up, east right. If the image is rotated in any way, the returned bounds
may be in the correct order (e.g. `east` is west of `west`), or may
be entirely incorrect.

Replace the current implementation with the more general calculation used
in DatasetBase.bounds. Add an array of tests to both implementations,
passing in various transforms.
2023-04-25 14:21:22 -06:00
vincentsarago
9064fabeeb add tests 2023-04-13 21:29:33 +02:00
Alan D. Snow
acef4a8f55
TST: Update test_transform_bounds_densify to match GDAL (#2804) 2023-04-03 20:44:44 -05:00
Joel Jaeschke
fa7d6823dc
ENH: Added option to change merge strategy in CLI (#2723) 2023-03-20 09:57:28 -05:00
Alan D. Snow
4a7ba6dc8d
ENH: Added int8 dtype to rasterize (#2780) 2023-03-16 21:29:52 -05:00
Alan D. Snow
f6b7b7636d
DEP: GDAL 3.3+, numpy 1.21+, Python 3.9+ (#2779)
* DEP: GDAL 3.3+, numpy 1.21+, Python 3.9+

* CI: Remove .travis.yml
2023-03-06 17:23:18 -07:00
Alan D. Snow
9246662cec CI: Update GDAL versions in test matrix (#2679) 2023-03-03 21:25:53 -06:00
Alan D. Snow
a36a15ff17 TST: Update warp tests for GDAL 3.7 (#2680) 2023-03-03 21:25:43 -06:00
Sean Gillies
6bf045cc5e Merge tag '1.3.6' into main 2023-02-13 10:25:52 -07:00
Ryan Grout
da7fd4d0f5
Raise exception when CRS differs during merge (#2740) 2023-02-13 08:36:43 -06:00
Sean Gillies
6fd660c344
Solutions for #2747 (#2764) 2023-02-08 17:08:59 -07:00
Sean Gillies
74d130234b
Add a new StatisticsError exception class (#2760)
* Add a new StatisticsError exception class

Also make an outer `with Env():` optional when using an opened
dataset as a context manager.

Resolves #2759

* Add PR refs to the change log

* Chain the StatisticsError exception
2023-02-08 10:44:30 -07:00
Ryan Grout
16c800e175
BUG: Resolve get_minimum_dtype with mixed dtype lists (#2734)
* Handles mixed type lists.
* Use asanyarray to be friendly to array subclasses like MaskedArray.
2023-02-06 09:14:55 -06:00
Alan D. Snow
4b70505301
LNT: Address flake8 import complaints (#2739) 2023-01-26 16:17:39 -06:00
Bas Couwenberg
f29f4d0161
Fix ImportError with unreachable http_proxy. (#2737) 2023-01-26 15:44:17 -06:00
Sean Gillies
6bb3e52e19 Merge tag '1.3.5' into main 2023-01-25 14:05:58 -07:00
Alan D. Snow
fd48539e46
BUG: Update write_mask to accept numpy booleans (#2707) (#2732)
Co-authored-by: Jan Žák <zj@zakjan.cz>
2023-01-24 21:13:50 -06:00
Sean Gillies
89b4bd24c7 Add missing rio-env tests and reformat command module 2023-01-24 10:52:58 -07:00
Sean Gillies
c6949887d6 Add missing tests for rio-transform, and docstring
Resolves #1329
2023-01-24 10:29:14 -07:00
Sean Gillies
16c6bc784f Use a GDAL transform in test_deprecated.py 2023-01-18 09:50:17 -07:00
Sean Gillies
2fb7802b42 Use a GDAL transform in test_deprecated.py 2023-01-18 09:44:47 -07:00
Jan Žák
caff38c7c0
BUG: Update write_mask to accept numpy booleans (#2707) 2023-01-11 13:31:27 -06:00
Ryan Grout
0020f79f52
TST: Fix numpy deprecation warning (#2704) 2023-01-11 13:29:37 -06:00
Sean Gillies
55df3c7890 Clean up MemoryFile /vsimem/ dirs recursively 2023-01-10 17:20:48 -07:00
Sean Gillies
b00a6a8a9e Clean up MemoryFile /vsimem/ dirs recursively 2023-01-10 17:16:49 -07:00
Alan D. Snow
51efb0d7a8
LNT: Use flake8 to find undefined variables & unused imports (#2693) 2023-01-10 12:48:09 -06:00
Alan D. Snow
72bdbc05b4
TST: Use GDALVersion in test_gdal_version (#2686) 2022-12-27 13:21:12 -06:00
Alan D. Snow
840ea6305d
CLN: Remove unnecessary GDALVersion runtime checks (#2685)
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
2022-12-27 13:20:54 -06:00
Alan D. Snow
e5012df1d6
CI: Update GDAL versions in test matrix (#2679) 2022-12-17 07:15:02 -06:00
Sean Gillies
d1def87354
BUG: Fixes for unsigned access to S3 (#2669) (#2688)
* BUG: Fixes for unsigned access to S3 (#2669)

* Add parse_bool helper method

This is for parsing boolean environment variables

* Fix s3_endpoint config when unsigned

S3 endpoint configuration was not propagated to GDAL when accessing
public buckets.

* Allow AWSSession construction without boto3

Should be able to use AWSSession even when boto3 is not installed so
long as unsigned access is used.

AWSSession is responsible to configuration of things like region and
endpoint url, so it's needed even when accessing public buckets without
relying on environment variables. `boto3` dependency is only needed for
obtaining credentials though.

* Convert parse_bool test to parametrize for clarity

* Update change log

Co-authored-by: Kirill Kouzoubov <Kirill888@gmail.com>
2022-12-16 15:06:44 -07:00
Sean Gillies
1c01599edc
BUG: ignore blockysize when converting untiled to tiled (#2678) (#2687)
* BUG: ignore blockysize when converting untiled to tiled (#2678)

* Update change log

Co-authored-by: Alan D. Snow <alansnow21@gmail.com>
2022-12-16 14:36:22 -07:00
Alan D. Snow
b89c1942ad
TST: Update warp tests for GDAL 3.7 (#2680) 2022-12-15 09:27:21 -06:00
Kirill Kouzoubov
84f3bbad70
BUG: Fixes for unsigned access to S3 (#2669)
* Add parse_bool helper method

This is for parsing boolean environment variables

* Fix s3_endpoint config when unsigned

S3 endpoint configuration was not propagated to GDAL when accessing
public buckets.

* Allow AWSSession construction without boto3

Should be able to use AWSSession even when boto3 is not installed so
long as unsigned access is used.

AWSSession is responsible to configuration of things like region and
endpoint url, so it's needed even when accessing public buckets without
relying on environment variables. `boto3` dependency is only needed for
obtaining credentials though.

* Convert parse_bool test to parametrize for clarity
2022-12-12 19:59:31 -06:00
Alan D. Snow
74a257aa81
BUG: ignore blockysize when converting untiled to tiled (#2678) 2022-12-12 19:58:08 -06:00
Even Rouault
e4ecc02b9e
Take into account GDAL >= 3.7 GDT_Int8 signed int8 datatype (fixes #2635) (#2656) 2022-11-20 22:30:33 -06:00
Alan D. Snow
50db10b7c1 TST: Update S3 paths (#2647) 2022-11-18 11:20:53 -06:00