Image reprojection and resampling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Image reprojection and resampling

Enoch Gyamfi Ampadu
Dear list,

Please I am working with a Sentinel 2 image of 20 m resolution. I have
tried to reproject and aggregate the resolution to 50 m. But after doing
the reprojection, I get the resolution in decimals and I am not sure what
factor to use for the escalation.

I tried another means to reproject with an existing image of similar
resolution 20 m using this code; Sentinel <- projectRaster(Sentinel, crs =
crs(Trying), res = 20) and
Sentinel <- projectRaster(Sentinel,crs = crs(Trying), keepres= TRUE)
After the process, I get an empty image when I plot.

I will be glad if I could have some insights on how to deal with these
issues of the reprojection and aggregation/resampling.

Best regards,

Enoch

--
*Enoch Gyamfi - Ampadu*

*Geography & Environmental Sciences*

*College of Agriculture, Engineering & Science*

*University of KwaZulu-Natal, Westville Campus*

*Private Bag X54001*
*Durban, South Africa **– 4000**.*
*Phone: +27 835 828255*

*email: [hidden email] <[hidden email]>*


*skype: enoch.ampadu*
*The highest evidence of nobility is self-control*.

*A simple act of kindness creates an endless ripple*.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Image reprojection and resampling

Bede-Fazekas Ákos
Dear Enoch,

Without a reproducible example it is hard to guess what you data looks
like and what causes the unexpected results.
Anyway, if you are sure that raster object called "Trying" has perfect
CRS and resolution, then this may solve your problem:
Sentinel <- projectRaster(from = Sentinel, to = Trying)

Have a nice weekend,
Ákos Bede-Fazekas
Hungarian Academy of Sciences

2020.07.10. 12:46 keltezéssel, Enoch Gyamfi Ampadu írta:

> Dear list,
>
> Please I am working with a Sentinel 2 image of 20 m resolution. I have
> tried to reproject and aggregate the resolution to 50 m. But after doing
> the reprojection, I get the resolution in decimals and I am not sure what
> factor to use for the escalation.
>
> I tried another means to reproject with an existing image of similar
> resolution 20 m using this code; Sentinel <- projectRaster(Sentinel, crs =
> crs(Trying), res = 20) and
> Sentinel <- projectRaster(Sentinel,crs = crs(Trying), keepres= TRUE)
> After the process, I get an empty image when I plot.
>
> I will be glad if I could have some insights on how to deal with these
> issues of the reprojection and aggregation/resampling.
>
> Best regards,
>
> Enoch
>

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo