Closed jflowernet closed 1 month ago
Hi @jflowernet, thanks for reaching out about this. The API returns the fishing effort data available that is contained within the provided shapefile, and does not perform a filling of the rest of the shapefile surface (it does not rasterize the data in the sense of assigning a value to every cell in a raster corresponding to the shapefile). For example for the data you provided, the data retrieved looks like this:
And therefore there is no expectation that the results and the shapefile provided have exactly the same bounding box.
Please let me know if this is useful or if you have any other questions about this and don't hesitate to come back with feedback for the package.
Ahh, yes of course! I was thinking that it is retrieving cells within the bounding box, but actually it is cell centroids. Many thanks for the explanation @AndreaSanchezTapia - keep up the good work :smile:
When using
get_raster()
with a user suppliedsf
region, the data returned does not fully cover the extent of thesf
object. Reprex below illustrates the issue; you can see that the ymin and ymax oftest_shape
are both higher than thetest_data
, and xmin of thetest_shape
is lower than thetest_data
, so some data is being cut-off. My guess is that the extent coordinates get rounded to the grid that GFW data uses, but rather than rounding min values down and max values up, it is rounding to the nearest grid cell, which might be higher or lower.Thanks for all the updates to
gfwr
- I appreciate the GFW team's hard work!Created on 2024-07-18 with reprex v2.1.1