The profile is defined by its end points and its width. The results are returned as summary statistics for equally spaced bins along the profile.

swath_profile(rast, X1, Y1, X2, Y2, width, inc)

Arguments

rast

input raster

X1

X coordinate of starting point defining the projection line

Y1

Y coordinate of starting point defining the projection line

X2

X coordinate of end point defining the projection line

Y2

Y coordinate of end point defining the projection line

width

one-side width of the swath profile

inc

number of bins along the profile for the stats

Value

a data frame with statistics computed for each increment along the profile