* Add rio-blocks documentation
Remove notes about additions before 1.0.
Resolves#2570
* Note fix for #2570
* Update change log
* It's rio blocks, no rio shapes
Raster data of dtype = int8 leads to an error message from pprint, which requires the data to be one of the following:
int16, int32, uint8, uint16, float32
I added a comment catching this error, which can be solved by casting the data: data = data.astype('int16')
* Merge _crs into crs
CRS is an extension class now, with improved documentation. The
test__crs.py file is obsolete and has been deleted.
I piggy-backed some API doc changes onto this. We now generate
API docs from scratch every time and have removed the .rst files
from the repo. The crs module now uses the embedsignature Cython
directive, which we should do for other extension modules.
* Include private modules
* Restore API docs
We'll remove them in a different branch.
* Update docs/index.rst
* Handle OverflowError from <int>code
Also repair chunks missed in rebase
* add checks in order to warn agaisnt incorrect source CRS when using RPCs to reproject
* use .from_string to be consistent with _calculate_default_transform
* raise error instead
* fix test
I'm proposing some intermingled updates to this section:
1. _New gist links for outputs_: the previously-linked mapbox classic style is now deprecated.
2. _Removal of `geojsonio` invocation_: geojson.io does not accept piped `.geojsonl`
3. _Use of the `--collection` flag_: I think it's correct to have geojsonl as the default output for various reasons, but for purposes of displaying the example results I've set the commands to output feature collections, and added a note for clarification.
* 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>
* Various fixes to documentation
* Remove in-line shell prompts
* Fix rasterize shapes type
* Convert todo's to comments
* Revert back to todo directive
* [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>
* 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