Skip to contents

Package

vaster vaster-package
vaster: Tools for Raster Grid Logic

Grid structure

Dimension, extent, and grid origin.

Cells & coordinates

Map between cell index, row/column, and position.

Extent alignment & cropping

Reconcile an arbitrary extent with a grid.

align_extent()
Crop an extent, snapped to the grain
snap_extent() buffer_extent()
Snap extent to resolution (buffer extent)
vcrop()
Virtual grid modification
intersect_extent()
Intersect extent
extent_dimension()
Dimension for an aligned extent

Lattice alignment & tiling

Grid-to-grid lattice relationships: exact index arithmetic between grids that share a lattice. See vignette(“lattice-alignment”).

is_aligned()
Lattice alignment of two grids
grid_offset()
Integer offset between two grids of equal resolution
snap_grid()
Snap a grid onto a parent lattice
resize_grid()
Resize a grid by a factor, keeping the extent
grid_tiles()
Partition a grid into tiles

Grids from points

Derive or fit a grid specification.

from_xyz()
Derive a grid from XYZ points
fit_dims()
Aspect ratio of dimension conflated with bbox

Neighbourhoods

adjacency()
Cell adjacency

GDAL & geotransform interop

Geotransforms, VRT extents, and RasterIO windows.

ts_te() gdal_te() gdal_ts()
Target size and extent for GDAL command line
extent_vrt()
Extents from VRT (virtual raster data set of GDAL)
geo_transform0()
Geo transform parameter creator
geo_world0() geotransform_to_world()
World file parameter creator
world_to_geotransform()
Create geotransform from world vector
extent_dim_to_gt()
Create geotransform from extent and dimension
gt_dim_to_extent()
Determine extent from geotransform vector and dimension
rasterio0()
GDAL RasterIO parameter creator
rasterio_idx() raster_sfio()
RasterIO index window
rasterio_to_sfio()
The sf/stars RasterIO list
sfio_to_rasterio()
sf package RasterIO from RasterIO window vector

Long-form & boundary conversions

vaster_long()
Convert to long form coordinates
vaster_listxyz()
Image xyz list
vaster_boundary()
Grid boundary in native resolution
vaster_boundary_cell()
Grid boundary cell index

Plotting

plot_extent()
Plot an extent
draw_extent()
Draw extent