1

Some months ago I posted Export each image from a collection in Google Earth Engine about exporting Sentinel 1 scenes from a collection and was successful with help from Rodrigo Principe.

I now have a new region of interest, which sits on the overlap between 2 scene footprints (sequential images in descending orbit). When I make a mosaic of the 2 scenes I get a small no data gap and lack of alignment between the 2 images:

// Create a geometry representing an export region.
var roi = ee.Geometry.Rectangle([-62.67, -8.31, -63.25, -8.85]);
var zoomPoint = ee.Geometry.Point([-62.35, -8.06])

// Load the Sentinel-1 ImageCollection.
var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(roi);


// Filter by metadata properties.
var IW_H = sentinel1

// Filter to get images with VV and VH dual polarization.
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))

// Filter to get images collected in interferometric wide swath mode.
.filter(ee.Filter.eq('instrumentMode', 'IW'))

// Filter IWs to get High res.
.filter(ee.Filter.eq('resolution', 'H'))

// Filter IW-Highs to get 10m res
.filter(ee.Filter.eq('resolution_meters', 10));

// Filter to get images from different look angles
var col_desc = IW_H.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));

// Spatially mosaic the images in the collection and display
var col = col_desc.mosaic();
var colVV = col.select(0)
Map.addLayer(colVV, {min:-17, max:-3}, "VV");
Map.centerObject(zoomPoint, 20);

What am I missing? Are these scenes not acquired sequentially? https://code.earthengine.google.com/ca7a4b585f1600b771a2de07c8e75792

  • do you want to download every image of col_desc or just the mosaic you made clipped with roi? – Rodrigo E. Principe Nov 15 '17 at 15:57
  • Hi Rodrigo, I would like to download every (mosiaced) image in col_desc. In the time since my post I just exported the north and south scenes separately, with the intention of merging them myself. However, there is a small missing data gap (1-3 pixels) between the 2 scenes when I do this. – ThrushJacket Nov 15 '17 at 16:00
  • Hi, I don't understand what you trying to do, you can download every image of the collection or mosaic ALL into ONE image (the mosaic). Also, I don't get what you mean by 'north and south scenes' – Rodrigo E. Principe Nov 15 '17 at 16:30
  • Hi. Sorry for the confusion. I'm attempting to filter the sentinel collection that coincides with my roi, but this falls on the region between two acquisitions. Consequently, when I try to filter and export, I'm only getting the more recent acquisition (the South scene in descending orbit) which is only half my roi. I need to merge both scenes that coincide with my roi (the North and South acquisitions) then clip and export. I tried doing separately (previous comment) but there's a no data gap. – ThrushJacket Nov 15 '17 at 17:19
1

If I understood correctly, you don't need ExportCol function because you want to download just 1 image (the mosaic). Try this:

// Create a geometry representing an export region.
var roi = ee.Geometry.Rectangle([-62.67, -8.31, -63.25, -8.85]);

// Load the Sentinel-1 ImageCollection.
var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(roi);

// Filter by metadata properties.
var IW_H = sentinel1

// Filter to get images with VV and VH dual polarization.
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))

// Filter to get images collected in interferometric wide swath mode.
.filter(ee.Filter.eq('instrumentMode', 'IW'))

// Filter IWs to get High res.
.filter(ee.Filter.eq('resolution', 'H'))

// Filter IW-Highs to get 10m res
.filter(ee.Filter.eq('resolution_meters', 10));

// Filter to get images from different look angles
var col_desc = IW_H.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'));

// Sort in descending order (latest first)
var desc = col_desc.sort("system:time_start", false)

// Mosaic
var mosaic = ee.Image(desc.mosaic())

// Check if it is what you need..
Map.addLayer(mosaic,{}, "mosaic")

// Export
var task = Export.image.toDrive({
  image: mosaic,
  region: roi.getInfo()["coordinates"],
  scale: 10,
  description:'COMPLETE', 
  folder: 'COMPLETE', 
  fileNamePrefix: 'COMPLETE',
  maxPixels: 1e13
})
  • Hi Rodrigo. Really sorry I am explaining this so poorly. I am trying to extend my original question (linked) to a scenario where the ROI overlaps the seam of 2 acquisitions. Thus, I need to query the 2 scenes that overlap my ROI (each day), merge them (with mosaic?), then crop to my ROI. I wish to do this for each orbit pass (whole collection), thus I'm attempting to do this for every scene pair over my ROI (n=30ish)- essentially looping through the pairs for each day. This is why I suspected I needed to somehow add a mosaic function inside the ExportCol function you've written. – ThrushJacket Nov 17 '17 at 12:02
  • Incidentally, I've spoke with a friend working on Sentinel data over the whole of Kenya and he has had a similar issue dealing with mosaic images output from GEE, where noData gap exists between sequential acquisitions in an orbit. He indicated there been a fair amount of discussion on this in the GEE developers group – ThrushJacket Nov 17 '17 at 12:07
  • I downloaded the image to see the results and have not seen the no-data gap, but if there is an issue there, I think we cannot do anything about it from the Client Side – Rodrigo E. Principe Nov 17 '17 at 12:13
  • Hi Rodrigo. Thanks again for the time spent on this. Looks like there are some raster alignment issues between acquisitions- if you zoom right into the seam. link to screenshot I've managed a work around for now- exporting the 2 acquisitions separately and merging them myself. Not sure why this is resolved when exported but appears in the visualization from script. – ThrushJacket Nov 17 '17 at 16:02
0

How about trying the blend() function. It seems to work in case the mosaic doesn't do the job. As GEE docs say:

blend(top) overlays one image on top of another. The images are blended together using the masks as opacity. If either of images has only 1 band, it is replicated to match the number of bands in the other image.

Hope that helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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