0

I downloaded forest cover rasters from Google Earth Engine with code from MapBiomas in 30 x 30m resolution. However, when operating with the rasters, I saw that the resolution came as degrees: 0.0002694946, 0.0002694946 (x, y). From this question: How to convert resolution in degrees to resolution in meters? I understood it's not a good idea to convert degrees to meters, and I don't know how what else to do to get that data in meters since I already selected the resolution as 30 x 30m. I need to calculate the area for a cropped raster.

Is that still possible without having to redownload the data and, if I do need to redownload the data, how do I get GEE to actually give me the resolution in 30 x 30m?

This is the info of the first raster (I have a stack 2010-2019):

class      : RasterLayer 
dimensions : 20700, 33207, 687384900  (nrow, ncol, ncell)
resolution : 0.0002694946, 0.0002694946  (x, y)
extent     : -53.11038, -44.16127, -25.35809, -19.77956  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
names      : mapbiomas.brazil.collection.50.saopaulo.2019 
values     : 0, 255  (min, max)

And this is the GEE source code I used: https://code.earthengine.google.com/c94f49b3d7037af410daad3ec6b85b66?noload=1

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Julia R.
  • 137
  • 1
  • 4
  • Why aren't you computing area in Earth Engine directly? Then you don't have to mess with details like this. – Noel Gorelick Apr 03 '21 at 15:19
  • I don't know how to do that - I used a pre-made code in Earth Engine and I don't know the javascript syntax. How could I do it? – Julia R. Apr 05 '21 at 05:04

2 Answers2

2

The resolution is about 30 m

library(terra)
distance(cbind(0,-21), cbind(0,-21.0002694946), lonlat=TRUE)
#[1] 29.83764

You can get the area for each cell with area(x) and you can use projectRaster to change the coordinate reference system (crs) to something else than lon/lat. I think you can also specify another crs in GEE before download.

Robert Hijmans
  • 10,683
  • 25
  • 35
1

Your data has resolution measured in degrees because your data isn't projected - it's in lat/long coordinates. To have the resolution in meters you either need to project your data to a meters-based projection (e.g. UTM) or redownload it in this kind of projection. Since you are interested in area, you should probably use an equal area projection.

ycartwhelen
  • 2,392
  • 10
  • 20