1480 Commits

Author SHA1 Message Date
Alan D. Snow
7d1549128d
TST: Update S3 paths (#2647) 2022-11-17 20:56:31 -06:00
Even Rouault
91d326edc7
dtypes.get_minimum_dtype(): make it return int8 if min_value >= -128 and max_value <= 127 (fixes #2598) (#2657) 2022-11-17 20:55:51 -06:00
Sean Gillies
06f28449eb Merge tag '1.3.4' into main 2022-11-16 20:49:35 -07:00
snowman2
71b9db9802 TST: Update mock_debian for GDAL 3.1-3.7 2022-11-13 19:30:33 -06:00
Alan D. Snow
c5f29c3ba3
Merge pull request #2641 from snowman2/gdal_latest
CI: Test latest GDAL & update tests
2022-11-10 10:48:23 -06:00
Alan D. Snow
036a5b0dd7
BUG: pull AZURE_STORAGE_ACCESS_KEY from env if not provided as arg (#2637) (#2643)
Co-authored-by: Henry Rodman <henry@ncx.com>
2022-11-10 10:47:32 -06:00
Henry Rodman
d270bdef88
BUG: pull AZURE_STORAGE_ACCESS_KEY from env if not provided as arg (#2637) 2022-11-10 10:40:25 -06:00
snowman2
cdb7d3922e TST: add expected values to test_reproject_resampling_alpha & test_reproject_resampling for GDAL 3.6 2022-11-09 20:49:55 -06:00
Scott Staniewicz
23e05271a6 BUG: add get_data_window for nodata=nan, fixes #2628 (#2629) 2022-11-09 10:43:23 -06:00
Elliott Sales de Andrade
d6dabdb43f Don't use fixed port for test server (#2619) 2022-11-09 10:42:19 -06:00
Elliott Sales de Andrade
3503b19ad6
Don't use fixed port for test server (#2619) 2022-11-09 10:36:53 -06:00
Scott Staniewicz
34c4f3d2b9
BUG: add get_data_window for nodata=nan, fixes #2628 (#2629) 2022-11-09 10:36:01 -06:00
Sean Gillies
3debd662c2 Merge branch 'maint-1.3' into main 2022-10-19 15:40:35 -06:00
Sean Gillies
2f0abbf0c8
Fully support tiled=False and blockysize (#2615)
Resolves #2599
2022-10-19 13:32:59 -06:00
Sean Gillies
ac69d215a9 Set position of the underlying stream to 0 in _filepath
Resolves #2550
2022-10-10 11:35:10 -06:00
Alan D. Snow
7ff28e4c1f
TST: Skip test_issue2353bis for GDAL 3.5+ (#2608) 2022-10-10 09:36:51 -06:00
Alan D. Snow
39f874418d
BUG: parse path without modifying query (#2603) 2022-10-07 13:22:36 -05:00
Sean Gillies
4b1e369069
Remove _loading, copy it into __init__ (#2594)
* Remove _loading, it's done in __init__ now

Resolves #2593

* import sys

* Correct imports

* We already require python >= 3.8

* Add PR number to change log
2022-09-26 18:02:54 -06:00
Alan D. Snow
24db5b3670
ENH: Add support for writing GeometryCollection (#2581) 2022-09-08 14:38:05 -05:00
Alan D. Snow
7c1f35b509
Pass along strides to GDAL in MemoryDataset #2511 (#2512) (#2558)
* Pass along strides to GDAL in MemoryDataset #2511

when given non-contigous array on output pass along strides
information to GDAL.

* Add test for #2509

* Update changes.txt

Co-authored-by: Kirill Kouzoubov <Kirill888@gmail.com>
2022-08-19 09:11:52 -06:00
Alan D. Snow
21a1622086
ENH: Add support for PROJ_DATA environment variable (#2530) (#2557) 2022-08-19 09:11:40 -06:00
Alan D. Snow
570b169666
get_data_window cleanup (#2510) (#2559)
* Cleaner get_data_window implementation.

* Add tests.

* Separate assertions into distinct tests.

Co-authored-by: Ryan Grout <groutr@users.noreply.github.com>
2022-08-19 09:11:11 -06:00
Alan D. Snow
ee75596d16
Fix broadcasting of coords in rasterio.transform.xy (#2538) (#2560)
* broadcast arrays to 1d arrays

* update ensure_arr tests for broadcasting coordinates

* make tests/test_transform.py a staticmethod

* add tests for ensure_arr_input that use zs

* change _ensure_arr_input to return numpy arrays, not lists

* transform ValueError into TransformError

Co-authored-by: Eric Hutton <mcflugen@users.noreply.github.com>
2022-08-19 09:10:49 -06:00
Sean Gillies
dc6b868286 Merge tag '1.3.1' into main 2022-08-17 21:59:02 -06:00
Ryan Grout
3001580c75
get_data_window cleanup (#2510)
* Cleaner get_data_window implementation.

* Add tests.

* Separate assertions into distinct tests.
2022-08-16 10:33:23 -06:00
Eric Hutton
3786bc7dd8
Fix broadcasting of coords in rasterio.transform.xy (#2538)
* broadcast arrays to 1d arrays

* update ensure_arr tests for broadcasting coordinates

* make tests/test_transform.py a staticmethod

* add tests for ensure_arr_input that use zs

* change _ensure_arr_input to return numpy arrays, not lists

* transform ValueError into TransformError
2022-08-16 10:31:35 -06:00
Sean Gillies
2c40386851
Silence non-informative errors from _delete_dataset_if_exists (#2548)
* Silence GDAL error logging in _delete_dataset_if_exists

Resolves #2525

* Silence non-informative log messages from _delete_dataset_if_exists

Resolves #2525
2022-08-11 17:40:10 -06:00
Sean Gillies
14e8b5987b
Allow sample_gen to take ndarrays again. (#2547)
* Allow sample_gen to take ndarrays again.

And fix a test filename.

Resolves #2515

* Run workflow on maint-1.3 branch
2022-08-11 14:58:16 -06:00
Alan D. Snow
7cf19395f7
ENH: Add support for PROJ_DATA environment variable (#2530) 2022-08-02 17:24:30 -04:00
Kirill Kouzoubov
d3fa9838bb
Pass along strides to GDAL in MemoryDataset #2511 (#2512)
* Pass along strides to GDAL in MemoryDataset #2511

when given non-contigous array on output pass along strides
information to GDAL.

* Add test for #2509

* Update changes.txt
2022-07-09 16:30:57 -06:00
Sean Gillies
12d815d7e7 master -> main in tests 2022-07-09 12:25:49 -06:00
Alan D. Snow
d0ba302486
REF: Replace usage of _osr_from_crs with CRS.from_user_input (#2488) 2022-06-23 17:22:24 -05:00
Alan D. Snow
3b325cec04
MNT: Remove GDAL 3.1 compatibility checks (#2463) 2022-06-23 17:21:39 -05:00
Sean Gillies
5f6824fcc6
Clean up errors left behind after successful coordinate transformations (#2487)
* Successful coordinate transformations might leave errors on stack

We pop and log them after using the transformer.

Resolves #2353

* Test error clean up

* Skip test for GDAL <= 3.3

* Use CPLErrorReset

* Call CPLErrorReset in _err wrappers

* Remove obsolete exception handler

* Note changes from gh-2487
2022-06-21 15:22:17 -06:00
Sean Gillies
212ad76a4c
Snowman2 int64 (#2467)
* ENH: Add support for Int64 & UInt64 for GDAL 3.5+

* Use ubuntu-small, not full, also xfail a test for GDAL 3.5.0

Co-authored-by: snowman2 <alansnow21@gmail.com>
2022-05-29 20:37:56 -06:00
João Santos
17a8a883c4
Add more merge methods (#2457) 2022-05-16 10:22:40 -06:00
Sean Gillies
c11fc1c93d Check mask flags in latest masked array writing tests 2022-05-11 13:26:58 -06:00
Alan D. Snow
8403830422
MNT: Update tests & code compatibility for GDAL 3+ (#2452) 2022-05-10 08:16:49 -06:00
Sean Gillies
9751abf2fb Improve comments
Towards resolving #2461
2022-05-10 08:07:26 -06:00
Sean Gillies
d15fc46cd8
Accept masked arrays and fill or write a mask (#2460)
Resolves #2347
2022-05-10 07:44:07 -06:00
João Santos
fe02e31c48
BUG: Fix output file dtype in merge (#2450)
* Fix output file dtype in merge

Signed-off-by: Joao <joao@tesselo.com>

* Fix missing dtype in merge click call

* Update driver in creation_options in merge call
2022-04-23 20:47:54 -06:00
Sean Gillies
44a63176d9
Add method for getting raster band stats (#2441)
* Add method for getting raster band stats

Resolves #244

* Remove import of namedtuple

* Skip broken test and update change log

* Warn about clear_cache with GDAL < 3.2
2022-04-20 17:37:44 -06:00
Alan D. Snow
cb1c05e761
ENH: Add show_versions (#2447)
* ENH: Add show_versions

* BUG: add show_versions cli kwarg

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2022-04-20 17:32:39 -06:00
Alan D. Snow
ceff246f87
ENH: Add PROJ & GEOS version information (#2444) 2022-04-19 14:25:34 -05:00
Sean Gillies
c528a6b782
Pass --wo and --to options through to the warper and transformer (#2438)
* Pass --wo and --to options through to the warper and transformer

Resolves #2354

* Update change log

* Test option name variants

* Combine warper and transformer options
2022-04-15 10:09:12 -06:00
Sean Gillies
0300961040 Add new test file 2022-04-14 15:38:11 -06:00
Sean Gillies
58b8e7095f Add a test to verify transformer COORDINATE_OPERATION option works
See #2354
2022-04-14 15:25:36 -06:00
Sean Gillies
44c36f39a4 Add another xfailing test of gh-2382 2022-04-12 16:42:55 -06:00
Sean Gillies
8a0a3611b0 Add a failing test related to gh-2382
And change xfails for GDAL versions > 3.3.
2022-04-12 14:55:14 -06:00
Samuel Kogler
c68d74ddb5
Fix error in reproject when destination is a tuple. (#2369)
* Fix error in reproject when destination is a tuple.

* Add unit test for reprojecting to specified output bands.

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2022-04-11 15:18:47 -06:00