1010 Commits

Author SHA1 Message Date
Sean Gillies
437a46f20a
Allow AWS region name to be specified in all cases (#1672)
Even if requests are unsigned.

Resolves #1670
2019-04-19 16:41:00 -06:00
Sean Gillies
71315fc9b6 Add links to API docs from quickstart guide
Also fix the repr of some CRS objects.
2019-03-29 17:02:26 -06:00
Sean Gillies
eb6549ac62 Resolves #1659 2019-03-22 15:59:55 -06:00
Sean Gillies
afe4a210af Resolves #1651 and #1654 2019-03-19 17:58:43 -06:00
Sean Gillies
99a5ea0ea2 Remove mock from compat module
Resolves #1651
2019-03-07 07:52:42 -07:00
Sean Gillies
97298dd674 Make PROJ string valid 2019-02-28 10:00:00 -07:00
Sean Gillies
7c6e01f027 Set _wkt and _data in __setstate__
Resolves #1643
2019-02-28 09:15:51 -07:00
Sean Gillies
012d3faa82 Skip test that can't pass on 32-bit system 2019-02-28 08:42:04 -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
eedc18dd5f
First swing at resolving #1634 (#1638)
* First swing at resolving #1634

* Add tests

* Add to CRS
2019-02-25 09:49:08 -07:00
Sean Gillies
945f0377b5 Require GDAL 2.1 and a network for new S3 test 2019-02-22 17:18:30 -07:00
Sean Gillies
76b3c7e7d1 boto3 doesn't need to be imported to access public datasets on S3
Resolves #1637

Also increased test coverage of the session module.
2019-02-22 16:59:15 -07:00
Sean Gillies
3b604c8ae5
Add out_dtype parameter to dataset's read() (#1630)
* Add out_dtype parameter to dataset's read()

Resolves #1627

* Allow out array to direct type casting
2019-02-11 08:59:00 -07:00
Sean Gillies
9ad65e4d37
WKT based CRS pickle protocol (#1628)
* WKT based CRS pickle protocol

Resolves #1625

* Fix typo

* Test that abstract profiles and dataset profiles can be pickled
2019-02-11 08:58:24 -07:00
Kirill Kouzoubov
37699288e4 Add support for signed 8 bit images (#1595)
Even though GDAL only has unsigned GDT_Byte raster data type, signed vs unsigned
images can be differentiated via PIXELTYPE property. It is set to 'SIGNEDBYTE'
for signed 8-bit images. This is how GDAL's native python binding compute
numpy.dtype from dataset object.
2019-02-07 17:22:15 -07:00
Sean Gillies
e6b92771b9 Relax test WKT assertions 2019-02-07 17:12:47 -07:00
Sean Gillies
5c78ec6584 Resolve the regression reported in #1623 2019-02-07 10:43:57 -07:00
Sean Gillies
e0e529c8a7 When evaluating CRS equality, check epsg first.
This resolves the regression reported in #1620
2019-02-05 17:27:24 -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
ca6ae34a93 crs of dataset with no SRS is None
str(CRS()) == ''

Resolves #1616
2019-02-04 16:48:06 -07:00
Sean Gillies
63589a44a2 Fix for #1609 2019-01-31 21:19:14 -07:00
Sean Gillies
91170902da Add test of the fix for #1600 and fix an unreported bug 2019-01-31 20:21:51 -07:00
Dan "Ducky" Little
f1fc65bf71 Add google cloud storage support (#1577)
Adds support for `gs://` paths, which refer to a Google Cloud Storage bucket.
2019-01-27 16:02:54 -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
96b40745d0
Simplify from_wkt implementation (#1589)
* Simplification of from_wkt

* Parametrize, add Envs for logging

* Return original test
2019-01-06 08:25:48 -07:00
Sean Gillies
ff04dd5c1a Add another test of nodata initialization 2018-12-18 11:02:14 -07:00
Sean Gillies
085f455310 Add mock gdal 2.5 directory 2018-12-14 16:27:58 -07:00
Sean Gillies
928c31c21e Remove unused mode and xfail mark for vrt test 2018-12-11 15:11:15 -07:00
Sean Gillies
a4aea02b05
Turn on exceptions and use Py_ssize_t for index arrays (#1573)
* Turn on exceptions and use Py_ssize_t for index arrays

Towards resolving #1076

* retvalt -> retval

* Update change log

* Add new test
2018-12-10 12:20:41 -07:00
Sean Gillies
2bb0d7890e
Exploit VRT complex source scale ratio 0 optimization (#1571) 2018-12-07 10:39:19 -07:00
Sean Gillies
25db73291f Raise an exception when src and dst are same dataset
Resolves #1569
2018-12-04 17:29:43 -07:00
Sean Gillies
51215941f7 Skip test on GDAL 1.11 2018-12-03 12:55:06 -07:00
Sean Gillies
565402ed31 Flush band cache before building overviews
Resolves #1497
2018-11-30 14:26:14 -07:00
Sean Gillies
510f0e2723 Swap order of grey and gray
Resolves #1562
2018-11-28 13:54:52 -07:00
Sean Gillies
eba1b6350e Remove classes from rasterio.env 2018-11-28 11:57:31 -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
Denis Rykov
240b351e4f Decorate one more test with gdalbin (#1559) 2018-11-21 14:37:01 -07:00
Robert Sare
4b0d3dd69e Mark tests that call GDAL binaries (#1555) (#1557)
* add webp to the available compression enum (#1515)

* Add webp to enums.Compression and increment version

* Add link to dev discussion group

* fix year specified in version 1.0.9 date (#1530)

Year specified in version 1.0.9 date is 2019, which is in the future at this time. Set to 2018, which is in the past.

* Update docstring for plotting_extent (#1516)

* 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

* Fix a typo (probably) (#1526)

* Fix a typo (probably)

* Update url for manylinux

* Update README.rst

Co-Authored-By: ismailsunni <imajimatika@gmail.com>

* Update README.rst

Co-Authored-By: ismailsunni <imajimatika@gmail.com>

* Remove unused string

* modified _osr_from_crs to use CRS.from_user_input (#1546)

* modified _osr_from_crs to use CRS.from_user_input

* update to use tmpdir fixture for pytest

* update comparison for error output for rio warp

* updated to always attempt to MorphFromESRI to prevent exception from being raised

* added test to test warping with ESRI wkt

* updated data_dir to be used as fixture

* removed duplicate import of CRSError

* reordered initialization of spatial reference to prevent memory leaks

* updated to raise CRSError of auth != EPSG

* Revert "modified _osr_from_crs to use CRS.from_user_input (#1546)" (#1548)

This reverts commit b120a00a05e4f6174c02e855cc016fde9b54c4e0.

* Mark tests using gdal binaries

* Add pytest import
2018-11-21 09:58:28 -07:00
Sean Gillies
67fb3990af Fix typo and rely on join for paths 2018-11-17 08:50:40 -07: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
Sean Gillies
c87fd9ac79
Re-applying PR #1546 to maint-1.0 via patch (#1549) 2018-11-15 19:18:37 -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
Alan D. Snow
45c5cb15a0 added support for ESRI wkt strings - resolves issue #1537 (#1538) 2018-11-02 14:14:09 -06:00
Sean Gillies
29cdb807db Add tests, note changes, increment version 2018-10-29 13:55:19 -06: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
98126f2abc
Add full support for numpy masked arrays to features.shapes() (#1523)
Resolves #1517
2018-10-25 14:08:45 -06:00
Sean Gillies
452699a333
None means none, not default (#1522)
* None means none, not default

We've changed the constructor's nodata defaults to use a flag
that is neither None nor a float.

Resolves #1503

* Test and feature require GDAL 2.2
2018-10-25 14:07:56 -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
4ebfca601a Add another test that resampling alg has expected effect 2018-10-08 10:27:13 -06:00