* expose GDALs TPS transformer as an option for GCPTransformer
* add a test for TPS based GCPTransformer
* Update tests/test_transform.py
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
---------
Co-authored-by: Christoph Pegel <christoph.pegel@dlr.de>
Co-authored-by: Sean Gillies <sean.gillies@gmail.com>
Fixes#2787.
The method of computing raster bounds in `rasterio.transform.array_bounds`
assumes a standard GIS orientation of the image - origin bottom left, north
up, east right. If the image is rotated in any way, the returned bounds
may be in the correct order (e.g. `east` is west of `west`), or may
be entirely incorrect.
Replace the current implementation with the more general calculation used
in DatasetBase.bounds. Add an array of tests to both implementations,
passing in various transforms.
* broadcast arrays to 1d arrays
* update ensure_arr tests for broadcasting coordinates
* make tests/test_transform.py a staticmethod
* add tests for ensure_arr_input that use zs
* change _ensure_arr_input to return numpy arrays, not lists
* transform ValueError into TransformError
Co-authored-by: Eric Hutton <mcflugen@users.noreply.github.com>
* initial
* add TransformDirection enum, fix cython compiler issues
* make RPCTransformWarning more generic
* include GDALGCP* in gdal.pxi
* add GCPTransformer
* typo
* move xy and rowcol to TransformerBase
* change existing transform methods to use new *Transformer classes
* normalize transform direction, update docstrings
* update docstrings
* make subsubheadings of Coordinate Transform subheading
* Add new docs transform topic
* add to index
* update docstrings
* update docstring
* Add rasterio.rpc to docs
* update georeferencing.rst
* update transform.srst
* relax isinstance check for RPCTransformer
* catch invalid transform input to get_transformer
* replace None with identity transform so we test the correct ValueError
* update AffineTransformer
* add tests
* rename method to map singleton coordinate to array-like and validate all coordiantes have same dimensions
* update test
* add more tests
* update docstring of GCPTransformer init
* fix copy+paste error
* relax check on xy transformed values due to floating point precision
* remove unused imports
* fix tests and address comments
Co-authored-by: Sean Gillies <sean@mapbox.com>
* add GDALGCPsToGeoTransform
* add method to fall back to gcps geo transform when gcps are found
* add GDALGCPsToGeoTransform output in gcps info
* add GCPS class
* add GCPS in rasterio.control and update tests
* add from_gcps method
* return Affine and revert rio info change
* revert unrelated change
* add & for cython
* fix
* add tests
* Update rasterio/transform.py
Co-Authored-By: Sean Gillies <sean.gillies@gmail.com>
* /gcpslist/gcps/
At the heart of this was a subtle indexing error due to calling
round() instead of math.floor(). Fixing that needed a cascade of
fixes to expectated values in various tests.
Finally, core logic in the merge command was rewritten for
correctness and clarity.