1

I am trying to download alos-2 data from Google Earth Engine as follows.


var alos2 = ee.ImageCollection('JAXA/ALOS/PALSAR-2/Level2_2/ScanSAR').select(['HH','HV','LIN']);
var region=ee.Geometry.Rectangle([105.1,10.5,106.1,9.0]);
var point=ee.Geometry.Point([105.6,9.75]);


var dataset = alos2.filterBounds(region).filterDate('2018-10-01','2018-12-31');
//print(dataset);


var imageList = alos2.toList(100)
var image = ee.Image(imageList.get(2));
Export.image.toDrive({image:image,description:'alos2test',scale:25,crs:'EPSG:4326',folder:'gee_mekong',region:region});

The problem was only a very small size tif file (only 500kb) was saved in the Google drive directory, whose values were broken (i.e., all values were zero when I checked the data from GUI based remote sensing software). I think something is wrong with my GEE code, since file is size supposed to be much greater than this.


I tried to use python_gdal to check the pixel values as follows but still all pixel values were zero.

FileSource = r'./alos2test.tif'
dataSource = gdal.Open(FileSource)
array = np.array(dataSource.GetRasterBand(3).ReadAsArray()).astype("uint16")

plt.figure(figsize=(10,10))
plt.imshow(array[:,:])
plt.colorbar()

What is wrong?

1 Answer 1

1

Two observations:

  1. with alos2.toList(100) you are converting the first 100 elements of the whole collection (so the chance to fit with your area is low). Change it to the filtered list (dataset)

  2. use the scene CRS when exporting the image to drive.

So the code will be:

var alos2 = ee.ImageCollection('JAXA/ALOS/PALSAR-2/Level2_2/ScanSAR').select(['HH','HV','LIN']);
var region=ee.Geometry.Rectangle([105.1,10.5,106.1,9.0]);
var point=ee.Geometry.Point([105.6,9.75]);

var dataset = alos2.filterBounds(region).filterDate('2018-10-01','2018-12-31');

var imageList = dataset.toList(100);
var image = ee.Image(imageList.get(2));
Export.image.toDrive({image:image,description:'alos2test',scale:25,crs:'EPSG:32757',folder:'gee_mekong',region:region});

Take a look into geetools if you want to export the whole entire collection rather than image-by-image

2
  • Thank you very much for your instructin. ummm. though i revised as you mentioned. it does not work yet. ummm. weird. do you have other suggestion as well?
    – mush_head
    Commented Jan 19, 2023 at 22:14
  • hello. I just solved the problem by adding filter at imagecollection part like, var p2 =ee.ImageCollection('JAXA/ALOS/PALSAR-2/Level2_2/ScanSAR').filterBounds(region).filterDate('2018-10-01','2018-12-31').select(['HH','HV','LIN']); thanks!
    – mush_head
    Commented Jan 19, 2023 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.