14 Commits

Author SHA1 Message Date
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
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
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
Vincent Sarago
822bf4750e
use local GOES16 file and ignore tests failure for previous GDAL version (#2367)
* use local Goes16 file for tests

* change err level for test

* ignore fail for gdal <3.3

* compare version
2021-12-15 14:07:10 -07:00
Sean Gillies
9b4de084ae
Always check the error stack after calling GDALSuggestedWarpOutput2 (#2357)
* Always check the error stack after calling GDALSuggestedWarpOutput2

Resolves #2353

* Remove special casing for exception messages

* Make code more readable

* Do the same for GDALAutoCreateWarpedVRT

Plus more code cleanup

* Remove commented lines

* Turn down log level for new source of GDAL messages
2021-12-10 09:20:01 -07:00
Kevin Wurster
de4ad3ea90 Cleanup import and docstring. 2017-04-13 19:28:20 -04:00
Sean Gillies
d36cd2e230 Remove void pointers from _features, _warp 2016-07-05 10:44:37 -06:00
Matthew Perry
e0516b8670 consistent str behavior for CPLError, fixes #758 2016-06-02 19:49:19 -04:00
Sean Gillies
5fea5210a0 Improved env implementation and tests. 2016-04-28 15:26:55 -06:00
Sean Gillies
12f8fc7e3f New, lazier AWS sessions
New Env class and tests.
More logging, tests, safer environment
Remove usage (deprecated) of rasterio.drivers()
Also pep8 cleanups throughout the tests and a fix for unchecked
dtypes when opening a dataset in 'w' mode.
Now we can simply import warnings in __init__.py. In the
deprecations tests, we needed to see a single warning only one
time to avoid multiple drivers() warnings.
Add a global env.
Add rasterio.env.setenv()
2016-04-28 15:26:55 -06:00
Sean Gillies
400027592a Check msg in a way that passes for all GDAL versions 2016-03-29 11:31:14 -06:00
Sean Gillies
659e4e48ab No longer raise exceptions in __exit__
That went counter to the design of the context manager. Instead
I've added a check() method that is to be called after any GDAL
function that might have called CPLError().
2016-03-24 16:28:14 -06:00
Sean Gillies
d96dbe9f56 Test str repr of exception 2016-03-24 10:09:26 -06:00
Sean Gillies
fdc6baab46 Switch to new try/with/except/finally structure
Also restructure the errors raised from cpl_errs.

Closes #600
2016-03-23 22:17:42 -06:00