rcpp_cell_from_xy | R Documentation |
Rcpp get cell from xy
rcpp_cell_from_xy(x, y, extent, dimensions, rcpp)
x , y |
Numeric with x,y coordinates. |
extent |
Vector with extent (xmin, xmax, ymin, ymax). |
dimensions |
Vector with number or rows and cols |
rcpp |
Logical if TRUE Rcpp index is returned. |
Get cell ID from xy coordinates. Allows only one coordinate pair at a time.
If rcpp = TRUE
indexing starts at 0 in accordance with C++.
int
Code adapted from Robert J. Hijmans (2020). raster: Geographic Data Analysis and Modeling. R package version 3.4-5. <https://CRAN.R-project.org/package=raster>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.