Allow Raster
(sub-)classes as inputs for Coreg.fit()
and Coreg.apply()
#174
Labels
enhancement
Feature improvement or request
We want to do two things: make things simple, and make them right. Allowing numpy arrays for DEMs is definitely right, as this can be used with
rasterio
and other frameworks. The simple part, however could maybe be improved by allowingRaster
(sub-)classes as inputs for coregistration.Data
The current syntax
If one wants to coregister a DEM and save it, these are the steps that are involved:
This is too long!!
Some issues I have with it
.fit()
method needs to be called in a separate line (but this will be fixed in Make 'Coreg.fit' return 'self' for one-liner coregistration. #173)Coreg.fit()
requires thetransform
argument, which could just as well have been read from theref_dem
raster.Coreg.apply()
returns a numpy array, which needs to be converted to aDEM
/Raster
to save.Suggestions
Raster
(sub-)class should be possible to provideCoreg.fit()
, whereby thetransform
argument should not be needed. A nearest neighbor reprojection could also be made to validate that they are on the same grid.Raster
(sub-)class is given toCoreg.apply()
, it should also return aRaster
(sub-)class of the same type.Potential future syntax
or in a horrible-to-debug one-liner!
Of course, this new functionality should not change how numpy arrays are used, and the
rasterio
compatibility would not change.The text was updated successfully, but these errors were encountered: