Skip to contents

This helper function takes the output from either opp_get_trips or ctcrw_interpolation and produces a base grid from the trips. Grid resolution is provided in meters. If ctcrw_interpolation output is provided, by default the extents are calculated from the raw (non-interpolated) data.

Usage

createGrid(data, res = 1, extendGrid = 10)

Arguments

data

Output from either ctcrw_interpolation.

res

Numeric. Resolution in km of grid cells.

extendGrid

Numeric. Distance (km) to expand grid beyond the bounding box of tracking data. Default 10km.

interpolated

Logical (T/F). If output from ctcrw_interpolation is provided, should the raw or interpolated data be used for calculating the grid extent? This parameter is ignored if opp_get_trips data is provided.