I wanted to clip the ALOS elevation model to an ROI. This is the code I wrote.
var dem = ee.Image("JAXA/ALOS/AW3D30_V1_1");
var geometry =
/* color: #ffc82d */
/* displayProperties: [
{
"type": "rectangle"
}
] */
ee.Geometry.Polygon(
[[[1.3787373046875473, 49.38636777007675],
[1.3787373046875473, 48.32016208111379],
[3.5265644531250473, 48.32016208111379],
[3.5265644531250473, 49.38636777007675]]], null, false);
var clipdem = dem.filterBounds(geometry)
But it gave me this error:
dem.filterBounds is not a function
I tried casting it to an imageCollection before applying the function, but it doesn't clip the image - giving me the image for the entire world. What is causing it and is there a way to work around it?