79 Commits

Author SHA1 Message Date
Sean Gillies
24d79d54af
Merge 1.4.3 (#3270)
* Eliminate boundless reads in merge, new compositing implementation (#3234)

* Eliminate boundless reads in merge, new compositing implementation

Resolves #3228

* Fix nits

* Compare non-zero mean of arrays

* Implement and use Window.align()

Combines the effects of Window.round_offsets and
Window.round_lengths, producing the same effect as gdal_merge.py

* Remove unused math import

* Add more docs about align()

Also increase the fraction used in round_offsets() to be
consistent with align()

* Move align() to a private func, use two existing methods in tests

* Add a test for merging WarpedVRTs (#3237)

Resolves #3196

* Backport of #3217 (#3243)

* Backport of #3217

* Update change log

* Increment GDAL and Python versions for CI (#3244)

* Rewrite _matches() to better support to_authority() and to_epsg() (#3255)

* Rewrite _matches() to better support to_authority() and to_epsg()

Resolves #3239

* Remove list() call and update change log

* Use to_epsg() in is_epsg_code() (#3258)

* Use to_epsg() in is_epsg_code()

Resolves #3248

* Update change log

* Allow MRF compression to surface in properties (#3259)

* Allow MRF compression to surface in properties

Resolves #3256

* Update change log

* Register drivers at most once per process (#3260)

* Register drivers at most once per process

Resolves #3250

* Appease flake8

* Add a note about GDAL_SKIP in the change log

* Support all GDALFillNodata() options in rasterio.fill (#3265)

* Support all GDALFillNodata() options

Resolve #3175.

* Cast values to str and update docs

* Update change log

* Prevent rasterio from trying to open a dataset object (#3266)

Resolves #3105.

* Fix typos discovered by codespell (#3264) (#3267)

* Fix typos discovered by codespell

* crasher



---------

Co-authored-by: Christian Clauss <cclauss@me.com>

* Fix erroneous masking of 0-valued data (#3268)

* Fix erroneous masking of 0-valued data

Resolves #3245

* Add an assertion about data values and update change log

* This is 1.4.3

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2024-12-02 10:43:14 -07:00
Christian Clauss
7a741ee370
Fix typos discovered by codespell (#3264)
* Fix typos discovered by codespell

* crasher

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>

---------

Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
2024-11-28 20:09:20 -07: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
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
sudobangbang
ab603cfe6c
In nested Env managers make interaction of Env.session consistent for a single thread (#2878)
* have context_options override self.session credentials

* update comments

* comment tweak

* track session resolution state

* add asserts and nested os environ test

* add multi-threaded test b/c do not exist

* remove other resolution state

* remove unused import

* fix multi-threaded test

---------

Co-authored-by: ranchodeluxe <greg.corradini@gmail.com>
2023-08-07 17:27:36 -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
50db10b7c1 TST: Update S3 paths (#2647) 2022-11-18 11:20:53 -06:00
Alan D. Snow
8403830422
MNT: Update tests & code compatibility for GDAL 3+ (#2452) 2022-05-10 08:16:49 -06:00
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