19 Commits

Author SHA1 Message Date
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
d3385f3265
Use VRT instead of in-memory raster when calculating transform (#1475)
* Use VRT instead of in-memory raster when calculating transform

Resolves #1131

* Add a test that confirms no OOM error

* Reduce testing precision

* Accomodate GDAL 1.11

* Update change log
2018-09-21 14:59:08 -06:00
Denis Rykov
24aa1d95b4 Add new dst_width and dst_height parameters (#1409) 2018-07-24 13:49:40 -06:00
Sean C. Gillies
0258c0952f Resolves #1411 2018-07-23 13:32:31 -06:00
Kevin Wurster
6b45ad07a4 Remove unnecessary 'rasterio.Env()' calls. 2017-04-13 19:41:34 -04:00
Sean Gillies
e05477cafe Merge branch 'master' into push-pull 2017-01-11 11:37:10 +01:00
Sean Gillies
cd47517d46 Replace CPLErrors context manager with two wrapper funcs
Less complication, less code.
2016-12-15 17:05:03 +01:00
Sean Gillies
b065478c46 Ensure error handler is always popped after a push 2016-12-13 16:38:21 +01:00
Matthew Perry
1702e271ae clarify bounds vs gcps in calculate_default_transform 2016-12-08 13:03:48 -04:00
Sean Gillies
61dd07dddc Optionally use GCPs when computing reprojection params
Also add a shortcut to InMemoryRaster which can avoid large
unnecessary memory allocations for arrays that are never used.
2016-10-21 11:53:37 +02:00
Erik Seglem
558fb33e39 Rename duplicate named test.
test_gdal_transform_fail_src_crs to
test_gdal_transform_fail_dst_crs_xfail
2016-06-06 06:51:09 -04:00
Erik Seglem
44c3d9badf Replace drivers with Env in docs and examples (#760)
Replace rasterio.drivers with rasterio.Env.
2016-06-02 19:01:18 -07: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
Sean Gillies
bf193b6d40 Import os 2016-04-01 01:01:22 -06:00
Sean Gillies
c55efead83 xfail 2 tests with GDAL 1.9 2016-04-01 00:54:26 -06:00
Sean Gillies
b9687ee7ab Catch CRSError in rio-warp and raise BadParameter
CRSError is new and derives from ValueError.

Tests added for bad --dst-crs parameters in rio-warp

Closes #595
2016-04-01 00:40:15 -06:00
Sean Gillies
9fbc22b754 Add tests to shake up warp transformer creation
Also rename an error class

Closes #595
2016-03-22 15:41:53 -06:00
Matthew Perry
c8e533b582 failing test 2016-03-16 11:40:36 -04:00
Sean Gillies
6535323cb8 Use an empty temp MEM image.
Add a test for _calculate_default_transform.
2016-03-16 09:04:01 -06:00