71 Commits

Author SHA1 Message Date
Vincent Sarago
ba5e90c487
mapbox -> rasterio (#2321) 2021-10-22 09:04:05 -06:00
Sean Gillies
3313084ce3 Allow open's fp kwarg to pass the credential decorator
Resolves #2267
2021-08-23 09:06:48 -06:00
Denis Rykov
c3bacf9f8c Use boto3 method to get session credentials (#2255) 2021-08-16 15:30:11 -06:00
Denis Rykov
a5da8c47bd
Add support for Microsoft Azure Blob Storage (#1906)
Co-authored-by: Sean Gillies <sean@mapbox.com>
2020-12-02 11:55:14 -07:00
Sean Gillies
0e9602608d
Remove CHECK_WITH_INVERT_PROJ=YES default (#1942)
* Remove CHECK_WITH_INVERT_PROJ=YES default

Resolves #1248

* Perform check in calculate_default_transform

* Use CHECK_WITH_INVERT_PROJ for GDAL 1.11 and PROJ 4
2020-06-02 14:55:42 -06:00
Elliott Sales de Andrade
9bc4628738 Mark test_rio_env_no_credentials as needing network. (#1923) 2020-05-11 11:23:00 -06:00
Sean Gillies
c8990ac1a9 Verify lack of auth using a head_object request
Resolves #1892
2020-03-25 09:20:59 -06:00
Sean Gillies
15bf16c653 Move all concerns about boto3 to rasterio.session 2020-02-13 15:57:12 -07:00
Sean Gillies
0c7a2e2d4e Monkeypatch rasterio.env.boto3 in test 2020-02-12 17:00:57 -07:00
Sean Gillies
4a1fc97569 Fall back to DummySession for "s3" URIs when boto3 isn't there
Resolves #1864
2020-02-12 15:25:50 -07:00
Sean Gillies
96310a8754
PROJ data search path setting for rasterio (#1823)
* PROJ data search path setting for rasterio

As in the Fiona project

* Import os in shim modules, update version and change log
2019-11-12 17:49:45 -07:00
Sean Gillies
073339ce57 Merge branch 'maint-1.0' 2019-08-06 18:42:38 -06:00
Sean Gillies
ec3894458f Allow local files to be opened when expired credentials exist
Resolves #1712
2019-07-12 15:07:23 -06:00
Sean Gillies
c9ce706bca
Default to DummySession if boto3 can't be imported (#1709)
* Default to DummySession if boto3 can't be imported

Resolves #1708

* Update change log and increment version to 1.0.25dev
2019-06-17 14:39:43 -06:00
sshuair
c2a495d536 Add support for OpenStack Swift Object Storage(cloud optimized geotiff) with tests (#1671)
* add OpenStack Swift Object Storage support

* add OpenStack Swift Object Storage support

* add OpenStack Swift Object Storage support

* modify the swift ULI to /vsiswift
2019-04-24 09:08:22 -06:00
Sean Gillies
99a5ea0ea2 Remove mock from compat module
Resolves #1651
2019-03-07 07:52:42 -07:00
Sean Gillies
ff94da7f74
Check for data files at builtin locations (#1639)
* Check for data files at builtin locations

If we have them, don't set GDAL_DATA or PROJ_LIB.

Resolves #1631

* Include mock on Python 2.7
2019-02-25 20:40:06 -07:00
Sean Gillies
bdf9b567ba
Patch GDAL_DATA into environment (#1618)
* Patch GDAL_DATA and PROJ_LIB into environment on import of _env

* Move patching to rasterio.env

* Make assertion more generic
2019-02-04 16:50:31 -07:00
Sean Gillies
f934c3428a
Change _CRS class to make WKT canonical (#1597)
* Refactor of _CRS class to make WKT canonical

* Finish work on making WKT canonical

Many test assertions needed update

* Accept {'init': 'EPSG:xxxx'}

Also removed commented code

* Restore previous rio-info behavior when there's an EPSG code

* Remove unneeded import

* Use from_proj4 in from_epsg

* Rewrite of _CRS to keep an OGRSpatialReferenceH (#1602)

* Rewrite of _CRS to keep an OGRSpatialReferenceH

Rewrite of CRS to use _CRS by composition, not inheritance

New OGRErr handling function exc_wrap_ogrerr

* Remove commented code

* Add back in the error stack check for ImportFromProj

Also fix up docstrings
2019-01-22 11:17:12 -07:00
Sean Gillies
74e59ba650
Patch environ gdal data (#1560)
* Patch os.environ, adding GDAL_DATA

* Turn up verbosity

* Simplify assertion

* Debugging

* Remove GDAL_DATA before test

* Update version, remove printed

* Change CRS inequality test

* Patch os.environ on import of _crs module

* Remove public API functions

* Skip wheel marked tests

* Delete obsolete test
2018-11-26 18:52:38 -05:00
Sean Gillies
afde5481ef
Crs env (#1544)
* Refactor to make data search testable

* Test ensure_env with faked sys.prefix and _env file location

* raising=False

* Don't call fixture function, use it as a fixture

* Re-applying PR #1546 to maint-1.0 via patch (#1549)

* Refactor to make data search testable

* Test ensure_env with faked sys.prefix and _env file location

* raising=False

* Don't call fixture function, use it as a fixture

* Add function to get context if needed

* added support for ESRI wkt strings - resolves issue #1537 (#1538)

* updated _handle_crswkt to use CRS.from_wkt; resolved issue #1540 (#1541)

* updated _handle_crswkt to use CRS.from_wkt; resolved issue #1540

* added test for datasetreader opening dataset with ESRI projection wkt string

* Handle GDAL's comments about WKT to PROJ conversion

* Bring Env inside methods if needed

* New test of compound CRS that was crashing 1.0.9
2018-11-16 15:16:44 -07:00
sshuair
b137308499 Add support for Alibaba Cloud OSS file (Cloud Optimized GeoTIFF) (#1535)
* add webp to the available compression enum (#1515)

* Add webp to enums.Compression and increment version

* add oss(alibaba cloud OSS files) support

* add docs for oss session

* remove useless comment

* add test for OSSSession and Env with OSS

* fix spell of test session
2018-11-05 13:26:33 -07:00
Sean Gillies
f6bb027feb Add missing offsets and scales properties
Resolves #1527
2018-10-29 13:23:26 -06:00
Sean Gillies
1551cabd77
Resolve #1520 and #1521 (#1524)
* Resolve #1520 and #1521

* Remove commented code, restore credential fetch in __init__
2018-10-25 16:20:29 -06:00
Sean Gillies
d5f2cd623e Don't clobber credentials in the outer Env
Resolves #1507
2018-10-23 16:41:52 -06:00
Sean C. Gillies
2342df065a Remove debug logging, require credentials for https test 2018-09-17 16:19:12 -06:00
Sean C. Gillies
ef132535e5 Unset AWS_ACCESS_KEY_ID 2018-09-17 11:18:03 -06:00
Sean C. Gillies
84f7372737 Test that Env works with a DummySession 2018-09-17 10:56:45 -06:00
Sean Gillies
8510a599d8
Generalize to support cloud providers other than AWS (#1429)
* Generalize to support cloud providers other than AWS

* Move session stuff to a new module (#1430)

* Remove commented code, add deprecation warning and change notes
2018-09-13 10:55:23 -06:00
Sean Gillies
c3b2499487
Rc1 (#1390)
* Add missing test for decorator

* Bump version, update change log, add a test docstring
2018-06-27 10:16:45 -06:00
Sean C. Gillies
e50af4cdf7 Resolves #1362 2018-06-20 14:18:51 -06:00
Sean C. Gillies
016d173ee5 Removed commented code 2018-05-11 12:29:55 -06:00
Sean C. Gillies
58b95de29b Resolves #1011
And more!
2018-05-11 11:44:41 -06:00
Sean C. Gillies
7c6f398e34 Resolves #1337 2018-05-07 15:35:37 -06:00
Brendan Ward
0daad71fce Add GDAL version check for positional arguments 2017-12-18 21:00:27 -08:00
Brendan Ward
a3ffaa1f18 Added is_max_version and reason to require_gdal_version decorator 2017-12-13 20:49:15 -08:00
Brendan Ward
a3de8c868a Added GDAL version decoration and used for reproject 2017-12-10 21:26:34 -08:00
Brendan Ward
e0f62813e4 Moved comments to reason, skipped test_memoryfile module 2017-11-30 07:01:52 -08:00
Brendan Ward
bf8d4f3509 More consistent GDAL version handling in tests 2017-11-29 08:59:31 -08:00
Brendan Ward
8caf01f151 wrap GDAL version checking into class 2017-11-28 08:53:33 -08:00
Sean Gillies
c443affdd6 Stop open's inner Env from clobbering outer env creds
Resolves #1075
2017-10-09 12:04:04 -06:00
Sean Gillies
7d30282589 Merge pull request #1042 from mapbox/iss875
Special handling for GDAL_CACHEMAX
2017-05-22 12:05:23 +02:00
Kevin Wurster
77fc38d4f1 Test for GDAL_CACHEMAX. Update another test for new integer normalization. 2017-05-10 23:19:13 -04:00
James McBride
8d655baff0 Test de-registration of GTiff driver 2017-05-08 08:54:02 -07:00
Kevin Wurster
4bce1e8456 Actually keep track of whether or not the drivers are registered. 2017-04-26 23:31:03 -04:00
Kevin Wurster
dce70ca72d Remove unnecessary 'rasterio.Env()' calls. 2017-04-13 19:36:11 -04:00
Sean Gillies
787d618720 Merge pull request #997 from mapbox/issue996
Better defined and tested concurrent Envs
2017-03-28 16:20:58 +02:00
Sean Gillies
a7e6747aa7 Make discovered_options a thread local variable 2017-03-24 14:13:35 +01:00
Sean Gillies
861e45ad71 Inheritance and isolation of config for child threads
The main thread uses CPLSetConfigOption and thus child threads
inherit from main's configuration. Child threads use the thread
local version and are thus isolated from each other.

Tests of this behavior have been added and documentation added
to _env (and soon to the manual).
2017-03-17 12:55:35 +01:00
Kevin Wurster
86a2eab52a Flag tests requiring network access with '@pytest.mark.network'. Running "$ pytest -m 'not network'" will skip the tests requiring network access. 2017-03-16 21:35:35 -04:00