Priyanka Sharma
2012-Sep-10 08:28 UTC
[R] How to calculate the number of points that fall inside each cell of a given raster using R
Hi everyone,
Here is a summary of what I am trying to do. Please take a look and let me
know how can i complete this below mentioned objective using R for a large
dataset.
**
- *Objective:*
- To calculate the number of points that fall inside each cell of a
given raster
- *Inputs:*
- Raster data – Geotiff, approximate size: 4000 rows x 4000 columns
- Points data – Shapefile
- *Ouptut:*
- A table with the following fields:
- Cell ID
- X-Coord (Longitude of the centroid of each raster cell)
- Y-Coord (Latitude of the centroid of each raster cell)
- Count of points in each cell
- Pixel value of raster for each cell
Thanks very much.
Priyanka Sharma
[[alternative HTML version deleted]]
