RAnEnExtra::pixelsFromXs convert x and y to pixel index

pixelsFromXs(x, y, xgrids.total, start)

Arguments

x

a vector of x coordinates of the pixels starting from 1

y

a vector of y coordinates of the pixels starting from 1

xgrids.total

total number of x.

start

the counting start of pixels.

Value

the index of the pixel

Details

convert x and y coordinates index to pixels index. Assume that x and y coordinates index are counting from 1. Pixels start counting from the argument start, and they are counted row-wise.