Given relative location and absolute locations, convert to an actual real world extent for a matrix of data.

domath(pts, xy, r = NULL, proj = NULL)

Arguments

pts

known points of 'xy'

xy

'xy' obtain from affinething

r

raster in use

proj

optional projection, if the pts are longlat and the raster is not

Value

raster extent

Details

Convert known geographic points with raw graphic control points and a reference raster to an extent for the raster in geography.

See also

Examples

## not a real example, but the extent we could provide volcano if the second set of points ## described the real world positions of the first set of points within the matrix domath(cbind(c(147, 148), c(-42, -43)), cbind(c(0.2, 0.3), c(0.1, 0.5)), raster::raster(volcano))
#> class : Extent #> xmin : 144.8333 #> xmax : 155.1667 #> ymin : -42.25714 #> ymax : -39.74286