7

It's going to be something like this, but you'll need to play with the threshold (10 in this example) to meet your needs. Watch out for ROIs that overlap a scene's footprint, but do not contain any valid pixels. Also watch out for ROIs that are very large or span multiple WRS cells. var ic = ee.ImageCollection("LANDSAT/LC08/C01/T1_RT_TOA"); // A polygon ...


7

As far as I know, Sentinel 2 has no computed cloud-shadow mask, so I ommit that part. But for the rest, I think you should at least mask out clouds, and filter a little. I've made public a repo I have to perform this: users/fitoprincipe/geetools First the core: var computeQAbits = function(image, start, end, newName) { var pattern = 0; for (var i=...


6

In optical remote sensing in the visible spectrum you cannot see through clouds. So there is nothing you can do, except to wait for images without clouds. Cloud masks are (as far as i know) used to exclude clouded areas from (for example) landcover classification, because results there would be incorrect anyways. edit As Aaron mentioned, you can sometimes ...


6

You can use Raster > Mask > Land/Sea Mask and choose Use vector as mask and the corresponding cloud band in the dropdown menu.


5

Clouds are serious problem in optical remote sensing, but using other images from different dates to substitute the regions with clouds will reduce the accuracy of your work, especially if you are calculating NDVI which depends totally on dates (seasons). However, it might be acceptable if the difference between cloudy images and non-cloudy images is just ...


5

This a known anomaly - see anomaly #29 in the Sentinel 2 data quality report. https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-2/data-quality-report


5

Yes, it affects the values of NDVI, and it may not give the desired results sometimes. Information from Wikipedia: Normalized Difference Vegetation Index provides some details about the effects of cloud and snow as follows: clouds and snow tend to be rather bright in the red (as well as other visible wavelengths) and quite dark in the near-infrared ...


5

Just a tiny error, as far as I can see. Your substrings are incorrect. This can be seen by comparing the result from a 'which(df$bits="0000100001000100")' with a number of observed unique values, which can be seen in ArcGIS when colouring the tif-file by unique values. 00001000 01000100 = 2116, and there are 3891233 of that number in both ArcGIS and R. This ...


5

Here is an example of cloud masking for Sentinel-2: var s2 = ee.ImageCollection("COPERNICUS/S2"); var pt = ee.Geometry.Point([-122.41653442382812, 37.77180027337861]); var cloudyImage = ee.Image('COPERNICUS/S2/20151207T190417_20151207T221905_T10SEG'); Map.centerObject(cloudyImage, 10); Map.addLayer(cloudyImage, {bands: ['B4', 'B3', 'B2'], max: 2000}, '...


5

Here is a more flexible approach that can handle dual (or larger) bit patterns. The bit shifts are performed server-side, using the ee.Image.rightShift() and ee.Image.mod() methods. var RADIX = 2; // Radix for binary (base 2) data. var extractQABits = function (qaBand, bitStart, bitEnd) { var numBits = bitEnd - bitStart + 1; var qaBits = qaBand....


4

You will need to go back to your imagery provider and get imagery from an earlier (or later) date which is cloud free Mapbox provides cloud free imagery but as it is merged from lots of different photo's you can't use it for analysis and I don't know how much it costs https://www.mapbox.com/data-platform/


4

I found this answer by Christoph at the forum for Google Earth Engine Developers (https://groups.google.com/forum/#!forum/google-earth-engine-developers). var getCloudScores = function(img){ //Get the cloud cover var value = ee.Image(img).get('CLOUD_COVER'); return ee.Feature(null, {'score': value}) }; var results = landsat.map(getCloudScores);...


4

You need to know the bit pattern, in this case, pattern for bit 4 is 16 (2 at the power of 4). So: var cloudmaskL8 = function(image) { var qa = image.select('BQA'); var pattern = ee.Number(2).pow(4).toInt(); var mask = qa.bitwise_and(pattern).rightShift(4); return image.updateMask(mask.not()); } Then you can make a function to decode any other ...


3

Seninel 2's Technical documentation Cloud Masks It appears to be calculated based on reflectance, however there is a known issue as mentioned Two products have been found affected by this anomaly. The products have very small data coverage and are completely cloudy. The cloud mask is accurate but the cloud coverage metadata is reported as zero. The ...


3

There is standard example in the code editor that is pretty close to what you want. https://code.earthengine.google.com/1be28850c6c7880d8fcd5f1e0a808986 // SimpleCloudScore, an example of computing a cloud-free composite with L8 // by selecting the least-cloudy pixel from the collection. // A mapping from a common name to the sensor-specific bands. var ...


3

You can mask using the Landsat 8 QA Band. To assist with extracting values from the QA bands, USGS provides LDOPE Tools. Alternatively, you could try FMASK.


3

There is a simple way you could do this using a python script, however it does not truly create a cloud shadow. For more information on creating a cloud shadow see this paper by Zhu and Woodcock (2014) and the associated literature. EDIT: There are most probably built-on methods to shift data in most GIS software;. If you manage to replicate the result ...


3

Landsat 8 is now being digested by AWS. There is a standard directory structure and the data can be accessed via an http or through the AWS commandline interface. While this not an ftp interface, it will be quite easy to batch download in a scripting language.


3

If you are not afraid of using Python for this you can use this little tool by CESBIO called Landsat Download. The only requirements are that you have an account on earthexplorer/glovis and the datasets you want to download are available online. Landsat Download Tool


3

This will really depend on the archive times you are looking for. However, here is an FTP link to Landsat data. Most to all of the images are cloud free, or +/-10% covered: ftp://ftp.glcf.umd.edu/glcf/Landsat/WRS2/


2

As mentioned by @nicholaschris, Zhu et al's paper is nice, and they have a tool associated with it. Note that the shift is a function of 1) the position of the sun (doesn't vary on one image), 2) the position (XYZ) of the cloud and 3) the elevation of the ground (2 and 3 do vary). So that a unique shift could not be enough. To answer the question with ...


2

The only alternative when no cloud-free images are available, is radar. You could try find some Sentinel-1 scenes, that are freely available.


2

Try changing the selection mode in ArcMap to Add To Current Selection. Then you can select multiple features. See the link here for a discussion: http://resources.arcgis.com/en/help/main/10.1/index.html#//00s50000000w000000


2

The cf_mask file identifies cloud (Pixel value 4), cloud shadow (2), snow (3), and water (1) pixels. Assuming you only want "clear land" pixels (0) you can use the Con tool with the following options Input Conditional raster = "cfmask.tif" Expression = "Value = 0" Input true raster = "<surface reflectance layer>" Use the composite bands tool to make ...


2

There is actually no need to develop a cloud mask from scratch (unless you feel the absolute need of doing so). If you download the Landsat 8 surface reflectance data, there would be a quality file associated with it, which contains several cloud-related bands. If you are not happy with them, you can modify them based on your needs. It would be a much better ...


2

You can use the cloud mask .gml file provided by ESA with the archive you download from the hub or other vendors. You only need to convert the .gml file into .shp. I use GDAL's ogr2ogr to do this, a link for this conversion is here: Using ogr2ogr to convert GML to shapefile in Python?


2

The formula for a vegetative index is VI = CH2 - CH1 where CH1 is in the visible band (0.58 - 0.68 um) and CH2 is in the near infrared band (0.725 - 1.00 um). The Normalized Difference Vegetation index (NDVI) is formulated as, NDVI = (CH2 - CH1) / (Ch2 + CH1) According to [1] Vegetated areas will generally yield high values for either index [VI or ...


2

code2 works. Adapt it properly with right parameters (Always check metadata): var l8_mayo = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA') .filterDate('2000-01-01', '2018-12-31') .filter(ee.Filter.eq('WRS_PATH', 208)) .filter(ee.Filter.eq('WRS_ROW', 23)); var visParams = {bands: ['B4', 'B3', 'B2'], max: 0.3}; Map.setCenter(-9, 53, 8); Map.addLayer(...


2

You can check out this script and the docs // A mapping from a common name to the sensor-specific bands. var LC8_BANDS = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B10']; var STD_NAMES = ['blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'temp']; // Compute a cloud score. This expects the input image to have the common // band names: ["red", "blue",...


2

The cloud masking you provided removes individual pixels that are considered to be clouds. You keep the whole image and just set cloud pixels to no data. Filtering for clouds in this case is looking at the metadata properties associated with each image and removing whole images if it does not meet the criteria (or sorting based on the criteria). The ...


Only top voted, non community-wiki answers of a minimum length are eligible