Basic function to create a 'world file' as used by various non-geo image formats
Reformat to world vector.
geo_world0(px, ul, sh = c(0, 0)) geotransform_to_world(x)
px | pixel resolution (XY, Y-negative) |
---|---|
ul | grid offset, top-left corner |
sh | affine shear (XY) |
x | geotransform parameters, as per |
vector of parameters xres, yskew, xskew, yres, xmin, ymax
world vector, as per geo_world0()
Note that xmin/xmax are centre_of_cell (of top-left cell) unlike the geotransform which is top-left corner_of_cell. The parameters are otherwise the same, but in a different order.
#> xres yskew xskew yres xmin ymax #> 1.0 0.0 0.0 -1.0 0.5 -0.5#> xmin xres yskew ymax xskew yres #> 0 1 0 0 0 -1#> xmin xres yskew ymax xskew yres #> 0 1 0 0 0 -1