Check if the coordinates are correct.

check_coordinates(xmn, xmx, ymn, ymx)

Arguments

xmn, xmx, ymn, ymx

The coordinates defining the study area.

Value

Return a set of valid coordinates.

Examples

check_coordinates(NA, NA, NA, NA)
#> [1] -180  180  -90   90    1    1
check_coordinates(-200, 0, 0, 90)
#> Warning: [xmn; xmx] range larger than accepted values [-180; 180]. The limits were set to -180 and/or 180.
#> [1] -180    0    0   90    1    0
check_coordinates(20, 0, 90, 0)
#> Warning: xmn was larger than xmx. The two values were inverted.
#> Warning: ymn was larger than ymx. The two values were inverted.
#> [1]  0 20  0 90  0  0