5

I'm currently having an issue with trying to import the Sentinel-1 image collection into the Earth Engine API. My script is as follows:

var imgSentinel1 = ee.ImageCollection('COPERNICUS/S1');
Map.centerObject(imgSentinel1, 3);
Map.addLayer(imgSentinel1);

The error outputted is as follows:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141017T180916_20141017T181011_002873_0033FA_7339
Some bands might require explicit casts.

Since Sentinel-1 holds multiple bands, I try to filter the bands:

Map.addLayer(imgSentinel1, {'bands':['HH, HV']});

The following is outputted:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141013T234000_20141013T234103_002818_0032C9_90E3
Some bands might require explicit casts.

I've tried to change the bands (ex. 'HH', 'HV', 'VV', 'VH, VV'), but it would output:

Layer 1: Tile error: Expected a homogeneous image collection, but an image with incompatible bands was encountered:
  First image type: 2 bands ([HH, HV]).
Current image type: 2 bands ([VH, VV]).
      Image ID: S1A_EW_GRDH_1SDV_20141013T234000_20141013T234103_002818_0032C9_90E3
Some bands might require explicit casts.

^ when 'HH', 'HV' or 'HH, HV' was inputted, and:

Layer 1: Layer error: Image.visualize: No band named 'VV'. Available band names: [HH, HV].

^ when 'VV', 'VH', 'VH, VV' or 'VV, VH' was inputted for the bands. Other basic variables used for other satellite images like 'B1' also failed.

I wish to display any (and potentially all) bands that may be used for statistical analysis similar to displaying Landsat-8.

2

Try this code, it works for me :)

var p = function(image) { return image.log10().multiply(10)};

var pol = ['VV'];

var imgVV = ee.ImageCollection('COPERNICUS/S1').
 filter(ee.Filter.eq('transmitterReceiverPolarisation', pol)).
 filterMetadata('instrumentMode', 'equals', 'IW');

Map.addLayer(imgVV),
Map.setCenter(-119.84, 37.83, 8);
  • filter(ee.Filter.eq('transmitterReceiverPolarisation', pol)). That was what I was looking for, though someone else already helped me out on the EE group. Thanks though! – Matthew To Oct 26 '15 at 14:03
  • 2
    Hi, is there a chance you could explain what the issue was, and how this code solves it? Thanks! – Matifou Mar 16 '17 at 18:47
0

The original issue is that the 'transmitterReceiverPolarisation' metadata field is a list.

The fix shown above only retrieves instances when there is a single polarization included. This would have a metadata field of ['HH'] (for example).

Sentinel-1 may have one or two polarizations. The GEE Guide related to Sentinel-1 Algorithms shows that the metadata can be ['VV'], ['HH'], ['VV', 'VH'], or ['HH', 'HV'].

This Guide shows that the filter should be general

  .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))

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.