* ENH: Add version to CRS.to_wkt()
* Update tests/test__crs.py for PROJ 8
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
* Update tests/test__crs.py for PROJ 8
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
* Update tests/test__crs.py for PROJ 8
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
* Update tests/test__crs.py for PROJ 8
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
* morph_to_esri_dialiect docstring update.
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
* DOC: update CHANGES with blurb about WKT2 support
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
* Add a Resampling.sum method
For weighted sum.
Added in GDAL 3.1 per https://github.com/OSGeo/gdal/pull/2366
I copied the approach used in #2056 to add and test this.
* resampling method sum not supported for read/write
* Resampling.sum fill in expected nonzero
* Use the right dtype when checking nodataval
Use the dtype of the first dataset if dtype is None. If dtype is not
None, then dt == dtype.
* Use np.issubdtype to check dtypes.
* Add test for out of range nodata.
* Only query float dtype when nodataval is not NaN.
* Modify warning phrasing.
At this point the nodataval could either be set by the input files or by
the user. Use a more general phrasing to just convey the fact that the
nodata value is out of range of the dtype.
* Update CRS of test dataset to be precisely EPSG:32618
Leaving two new GDAL functions in gdal.pxi for future use.
* Update builds to use PROJ 7.2.1 and GDAL 3.2.1
* Test for upcoming GDAL feature (from 3.3) allowing existing overviews to
not be exposed
- see https://github.com/OSGeo/gdal/pull/3181
- see https://rasterio.groups.io/g/main/message/649
The test:
- requires gdal 3.3
- tests whether a dataset can be opened with OVERVIEW_LEVEL=-1
- ensures that opening a dataset with OVERVIEW_LEVEL=-1 ignores the file
overview
- ensures that a decimated read on a dataset opened with
OVERVIEW_LEVEL=1 does not read the file overview
* Make test for ignoring overviews when performing decimated read more
simple and robust
* Don't use approximate transformer if using rpcs & passing RPC_DEM kwarg
* [rpc_no_approx_transformer_with_dem] split test
* [rpc_no_approx_transformer_with_dem] update docstring
* Add new private method to detect if dataset has gcps or rpcs, suppress NotGeoreferencedWarning unless dataset has neither geotransform set, gcps, or rpcs.
* remove unused logging import
* [warp_add_rpcs] initial update to reproject to support rpcs
* catch kwargs in _calculate_default_transform
* fix allocation of crs to wrong dataset (was src, now dst) in _calculate_default_transform. Specifically where we went from GDALCreateGenImgProjTransformer -> GDALCreateGenImgProjTransformer2
* pass kwargs to calculate_default_transform (to be passed to transformer
* update docstrings
* update documentation
* add debug messages for kwargs used to set Transformer options
* Don't capitalize RPC_DEM transformer option value, as it might be a path
* includes existing changes from https://github.com/mapbox/rasterio/pull/2030, better support for computation of calculate_default_transform with just gcps or rpcs
* adds testse
* Remove an empty line
Mainly to trigger a new build on travis-ci.com
* add new test file (Largely derived from RGB.byte.tif)
* Fix incorrectly encoding RPC metadata as transform options
Was checking for transformer option RPC_DEM in the RPC metadata by mistake
Co-authored-by: Sebastien Tremblay-Johnston <sebastien.tremblayjohnston@mdacorporation.com>
Co-authored-by: Sean Gillies <sean@mapbox.com>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
* [update_warp_gcps] Enable reproject to better handle computation of dst_transform when reprojecting from gcps
* Remove weird auto import from pylance? and unused from_gcps import
Co-authored-by: Sebastien Tremblay-Johnston <sebastien.tremblayjohnston@mdacorporation.com>
* This is part of an effort to introduce the concept of rational polynomial coeffecients to be used for coordinate transformations using GDALCreateRPCTransformer.
- Added a new UserDict subclass named RPC to control.py. This structure contains the rationa polynomial coefficients, and can be instatiated from user input or read from dataset. GDAL stores RPCs as metadata which are all string encoded. The RPC object deserializes string values to float or list appropriately, and also provides a serialization method when passing to lower level GDAL methods.
- A new _transform.pyx method called _rpc_transform, similar to _base._transform except using GDALCreateRPCTransformer and GDALRPCTransform.
- A new RPCTransformWarning to errors.py, indicating when a RPC coordinate transformation has failed.
- New includes from gdal.h and gdal_alg.h for RPC related structs and functions
- New rpcs property to DatasetBase and subclassese with appropriate getter and setters (error when read only mode). Corresponding updates to _base.pxd and _io.pxd
- Tests
* trigger new travis build
* This is part of an effort to introduce the concept of rational polynomial coeffecients to be used for coordinate transformations using GDALCreateRPCTransformer.
- Added a new UserDict subclass named RPC to control.py. This structure contains the rationa polynomial coefficients, and can be instatiated from user input or read from dataset. GDAL stores RPCs as metadata which are all string encoded. The RPC object deserializes string values to float or list appropriately, and also provides a serialization method when passing to lower level GDAL methods.
- A new _transform.pyx method called _rpc_transform, similar to _base._transform except using GDALCreateRPCTransformer and GDALRPCTransform.
- A new RPCTransformWarning to errors.py, indicating when a RPC coordinate transformation has failed.
- New includes from gdal.h and gdal_alg.h for RPC related structs and functions
- New rpcs property to DatasetBase and subclassese with appropriate getter and setters (error when read only mode). Corresponding updates to _base.pxd and _io.pxd
- Tests
trigger new travis build
* Move RPC Class to it's own file
* fix typo
* make private
* re-implement RPC with attr
* make err_bias, err_rand attributes optional, default to empty string
* default to None, rather than empty string
* add CRS.is_northingeasting and CRS.is_latlon to test if EPSG axis is inverted
* make separate functions
* pass _crs object to _CRS functions
* update test and confirm GDAL2/3 difference
* fix tests
* more pytest.mark.parametrize
* rename test functions
Co-authored-by: Vincent Sarago <vincent.sarago@gmail.com>
* Consolidate dataset stop methods and test for issue #2000
* Try reverting to see if warped vrt tests will fail
* Undo previous commit
* Make WarpedVRT safer
We're only calling GDALClose now if reference counts are 0 and
insisting that the dataset passed to WarpedVRT be opened in
read-only mode.
Resolves#2000
* Add resampling argument to merge
* Expose resampling option in rio merge
* Add tests for rio merge resampling
* Add xfail test for gauss resampling in rio merge