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.
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
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()