- heightmap
A two-dimensional matrix, where each entry in the matrix is the elevation at that point.
All grid points are assumed to be evenly spaced. Alternatively, if heightmap is a logical matrix, each entry
specifies whether that point is water or not.
- zscale
Default 1. The ratio between the x and y spacing (which are assumed to be equal) and the z axis. For example, if the elevation levels are in units
of 1 meter and the grid values are separated by 10 meters, zscale would be 10.
- cutoff
Default 0.999. The lower limit of the z-component of the unit normal vector to be classified as water.
- min_area
Default length(heightmap)/400. Minimum area (in units of the height matrix x and y spacing) to be considered a body of water.
- max_height
Default NULL. If passed, this number will specify the maximum height a point can be considered to be water.
- normalvectors
Default NULL. Pre-computed array of normal vectors from the calculate_normal() function. Supplying this will speed up water detection.
- keep_groups
Default FALSE. If TRUE, the matrix returned will retain the numbered grouping information.
- progbar
Default FALSE. If TRUE, turns on progress bar.