imgVectortoRaster: Convert vector images to rasters

Description Usage Arguments Details

View source: R/imgVectortoRaster.R

Description

Takes a matrix where each row is an image in vector form and turns that into raster images. This function is specific to the data format for the upwelling project.

Usage

1
imgVectortoRaster(centers, datalist, proj.name = "+proj=longlat +datum=WGS84")

Arguments

centers

a matrix where each row is an image in vector form. It is assumed to be only the cleaned (no land) images.

datalist

a data list with information about the positive locations (non-land).

proj.name

default projection name

Details

datalist is a list with dat, dat.clean, and pos.loc. dat and dat.clean are vectorized images, meaning a raster image is made into a vector by concatenating each row of the raster into a rows x columns vector. The first 2 rows of dat and dat.clean are the latitude and longitude values. dat has the land (NAs) while dat.clean has the land removed so is smaller. pos.loc is the location of the positive values (not land) in dat. pos.loc is used to allow you to reconstruct the image from dat.clean.


UW-Upwelling-Project/imageryML documentation built on Dec. 18, 2021, 6:11 p.m.