33 Commits

Author SHA1 Message Date
Sean Gillies
012d3faa82 Skip test that can't pass on 32-bit system 2019-02-28 08:42:04 -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
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
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
Alan D. Snow
30f400d427 added ValueError if driver is missing when getting writer for driver (#1443) 2018-09-13 10:45:53 -06:00
Sean C. Gillies
567e2c6056 Fix assertion 2018-06-20 13:00:56 -06:00
Sean C. Gillies
baf957e2e0 Change dst_alpha from 4 to src.count + 1
Resolves #1382
2018-06-20 12:15:39 -06:00
Sean C. Gillies
efee1076f8 Clean up test condition and add tests of deprecation 2018-05-24 14:38:00 -06:00
Sean C. Gillies
ba7b4f76b1 Deprecate creation kwds in profiles
Addresses concerns raised in #1332
2018-05-24 13:57:27 -06:00
Sean C. Gillies
9f1fea66be Cleanup 2018-04-25 16:57:01 -06:00
Sean C. Gillies
f5434180b6 Do not save opening options in tags 2018-04-25 09:44:40 -06:00
James McBride
659a59484d Fix dtype check in dataset write
It looks like the previously implemented data type check was not ever
being entered, due to checking for a 'type' attribute on a string. Since
the _init_dtype attribute is now always a string, remove this check and
related handling, so that now dtypes are checked for validity, providing
a more useful error message in case of an invalid dtype. Fixes #1008.
2017-05-05 22:24:39 -07:00
Sean Gillies
294b61b77a Use raw strings for regex 2017-03-28 16:21:41 +02:00
Kevin Wurster
b3cd5cc1b6 Ensure rasterio.Env() tears down properly when no parent environment exists. 2017-02-06 14:53:37 -05:00
Matthew Perry
9d90842a1f merge master 2016-06-30 13:29:51 -04:00
Sean Gillies
863434735c New io module
Resolves #743
Replaces #793
2016-06-30 10:29:30 -06:00
Sean Gillies
d8ec3e6ca2 New blacklist policy
Replaces the BAD_WRITE_DRIVERS list in _io.
2016-06-29 09:50:09 -06:00
Kevin Wurster
ef952def3b Merge master. 2016-06-14 21:09:27 -07:00
Kevin Wurster
a71f3f0f1f Explicitly construct Affine() transforms rather than instantiating from Affine.from_gdal() 2016-06-14 10:44:03 -07:00
Matthew Perry
185142ca2d bring bad drivers list up and sync tests 2016-06-13 20:44:19 -04:00
Kevin Wurster
92b64f9c8a Raise an exception if 'affine' _and_ 'transform' are passed to rasterio.open(). Issue a warning if 'affine' is used. Raise an exception if 'transform' is not an instance of 'affine.Affine()'. 2016-06-13 16:50:42 -07:00
Matthew Perry
ebc5ec06e4 disable netcdf writes, fixes #647 2016-06-13 18:12:26 -04:00
James Hiebert
a0a4289b51 Adds a CRS.to_dict method and updates comparisons 2016-06-05 09:32:58 -07:00
James Hiebert
c8185796f4 Removes the crs_wkt property from DatasetReader
With the addition of the simpler `wkt` property to the CRS class, this
commit removes the crs_wkt property and methods to simplify the
interface
2016-06-04 11:03:03 -07:00
James Hiebert
a7e7cbef63 Replaces crs as a dict with a CRS class
Implements a number of changes:
* Creates a CRS class that simply inherits from UserDict
* Moves CRS related methods (to_string, from_string, is_geographic,
  is_projected, is_valid, and is_epsg_code) to be class methods
* Moves the CRS comparison method to be CRS.__eq__
* Modifies tests that compare CRS output to a raw dict, to compare to
  UserDict.data property
* Replaces all creation of CRS represtation using bare dicts with the
  use class instantiation
2016-06-03 17:15:48 -07:00
Erik Seglem
a31e3c8c16 Standardize on import numpy as np. 2016-06-01 22:47:33 -04: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
Kevin Wurster
d60d40c3ca Remove references to write_band() but not the actual method. 2016-04-12 20:45:56 -04:00
Matthew Perry
7b4118a84b return tuples, not lists from DatasetReader 2016-04-11 11:34:14 -04:00
Sean Gillies
609d8da75a Test of passing 'alias' to open() and the fix.
Closes #411.
2015-07-10 22:52:45 -06:00
Sean Gillies
98a5173e81 Guard against creating datasets with bad nodata values.
Closes #289.
2015-03-24 13:14:34 -06:00
Sean Gillies
943fa8e099 New layout, tests moved. 2014-09-01 22:00:56 -06:00