3

I am downloading Sentinel-2 (and Landsat) images from the google public cloud using this script: https://github.com/vascobnunes/fetchLandsatSentinelFromGoogleCloud

This works fine for me, but in some dates I'm getting images like this:

enter image description here

which is not good for what I want.

I tried to find some info in the metadata where I could distinguish between a partial and a full tile but I am not finding any.

5

The metadata element that you are looking for is called 'NODATA_PIXEL_PERCENTAGE'. You can find it in the XML-files for the individual tiles. Usually around line 3295.

I'm not experienced with the specific package that you are using for interacting with the archives, so I'm not sure that you can use the nodata percentage as a search parameter.

|improve this answer|||||
  • Thanks but apparently the files from the google public cloud don't have that metadata element. :( – vascobnunes Feb 10 '17 at 12:07
  • If I remember correctly, the Amazon version does have it. – Mikkel Lydholm Rasmussen Feb 10 '17 at 12:54
  • 1
    @vascobnunes - one option that you do have is to parse the metadata files that Google does provide and look for the number of NaN values they have in some of the metadata that they do provide. It is not as easy as using reading a single parameter from the metadata, but it should be doable. – Mikkel Lydholm Rasmussen Feb 10 '17 at 15:17
  • a full tile shouldn't have any NaN values? – vascobnunes Feb 10 '17 at 15:44
  • 1
    @vascobnunes - correct, NaN is the nodata around the edge of the image. Only the partially covered tiles should have NaNs – Mikkel Lydholm Rasmussen Feb 10 '17 at 16:12

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.