Closed MarianaDevault closed 1 year ago
This site is for bug report and feature request. For general questions, please use stackoverflow.com or gis.stackexchange.com.
But as you are here now: It is not clear why you are saying that the results are not good. The image is too small to be sure but it looks good to me. Is it because the blockiness in the ocean? That is probably because there were no tiles there (no land).
It seems to me that you take some unnecessary steps. Given SpatRaster x
and template eck
you can directly use project
. Using extend
is not going to change anything. If you first use aggregate
that could improve things if you use "bilinear interpolation" in the projection; but if you use "average" you would be better off not aggregating.
x <- rast(nrow=36000, ncol=86400, nlyr=2, ext=ext(-20015109, 20015109, -6671703, 10007555),
crs = "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +R=6371007.181 +units=m +no_defs")
eck_proj="+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m"
eck <- rast(xmin=-20001600, xmax=19998400, ymin=-10000800, ymax=9999200, nrows=2000, ncols=4000, crs=eck_proj)
y <- project(x, eck, "average")
Hi all,
After downloading and merging 290 granules of MOD17A3Hv006 data from EARTHDATA for year 2010, I am now trying to handle these layers in terra.
First thing I did was to redefine the extent of the merged product using
Because I don't neet such a fine resolution (500 m), I aggregated the new_extent_NPP_500_m raster (to reach 10 km x 10 km) doing
Now, I need to project it to Eckert IV, which is not giving me the correct product, given that I am getting the image below:
Can anyone help me figure out why I am getting such a deformed map and why the raster extent has changed following projection?