Why are there holes in the resulting map of median reflectance values from Sentinel2 imagery on GEE?GEE...
How bad is a Computer Science course that doesn't teach Design Patterns?
Is Screenshot Time-tracking Common?
Could Comets or Meteors be used to Combat Global Warming?
What is the difference between crontab -e and nano /etc/crontab?
Can you wish for more wishes from an Efreeti bound to service via an Efreeti Bottle?
How should I ship cards?
Sauna: Wood does not feel so hot
Why does finding small effects in large studies indicate publication bias?
Is layered encryption more secure than long passwords?
Why didn't Lorentz conclude that no object can go faster than light?
Where can I educate myself on D&D universe lore, specifically on vampires and supernatural monsters?
Coworker is trying to get me to sign his petition to run for office. How to decline politely?
Discouraging missile alpha strikes
Arizona laws regarding ownership of ground glassware for chemistry usage
Isn't a semicolon (';') needed after a function declaration in C++?
Why would you use 2 alternate layout buttons instead of 1, when only one can be selected at once
Why don't reads from /dev/zero count as I/O?
Is it ethical to apply for a job on someone's behalf?
Why do we divide Permutations to get to Combinations?
Can a planet be tidally unlocked?
How to know if I am a 'Real Developer'
Fired for using Stack Exchange. What did I do wrong?
How can a kingdom keep the secret of a missing monarch from the public?
Do error bars on probabilities have any meaning?
Why are there holes in the resulting map of median reflectance values from Sentinel2 imagery on GEE?
GEE cloud-free Sentinel2 and linear RegressionGoogle Earth Engine, how to distinguish between rivers/streams and ponds/lakes in a water maskCreating a time-series from an image-collection in GEE including null-values in case all pixels are masked
I don not understand why are there holes in the resulting map of median reflectance values from S2 imagery on GEE and how do I fix it?
Also, why are all the clouds not getting masked?
//Function for masking clouds
// http://xzsunbest.tk/2018/07/05/MaskingOutCloudInSentinel2WithGEE/
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
// Simple cloudMask function for Sentinel-2 based on QA band
function cloudmask(image) {
var qa = image.select('QA60');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask);
}
var filtered = sentinel2.filterBounds(asset).filterDate('2015-01-01','2015-12-31'); //asset is Papua and West Papua i.e Indonesian side of PNG
print('Filtered (by date and ROI) Image Count: ', filtered.size()); //247
// apply the function on the image collection
var clipped = filtered.map(cloudmask);
print('Filtered and Masked Image Count: ', clipped.size());//247
// Make a composite image
var medianComp = clipped.median();
Map.addLayer(medianComp, {bands:['B4','B3','B2'], min: 0, max: 3500}, 'true color median composite', 0);
google-earth-engine sentinel-2
add a comment |
I don not understand why are there holes in the resulting map of median reflectance values from S2 imagery on GEE and how do I fix it?
Also, why are all the clouds not getting masked?
//Function for masking clouds
// http://xzsunbest.tk/2018/07/05/MaskingOutCloudInSentinel2WithGEE/
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
// Simple cloudMask function for Sentinel-2 based on QA band
function cloudmask(image) {
var qa = image.select('QA60');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask);
}
var filtered = sentinel2.filterBounds(asset).filterDate('2015-01-01','2015-12-31'); //asset is Papua and West Papua i.e Indonesian side of PNG
print('Filtered (by date and ROI) Image Count: ', filtered.size()); //247
// apply the function on the image collection
var clipped = filtered.map(cloudmask);
print('Filtered and Masked Image Count: ', clipped.size());//247
// Make a composite image
var medianComp = clipped.median();
Map.addLayer(medianComp, {bands:['B4','B3','B2'], min: 0, max: 3500}, 'true color median composite', 0);
google-earth-engine sentinel-2
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago
add a comment |
I don not understand why are there holes in the resulting map of median reflectance values from S2 imagery on GEE and how do I fix it?
Also, why are all the clouds not getting masked?
//Function for masking clouds
// http://xzsunbest.tk/2018/07/05/MaskingOutCloudInSentinel2WithGEE/
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
// Simple cloudMask function for Sentinel-2 based on QA band
function cloudmask(image) {
var qa = image.select('QA60');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask);
}
var filtered = sentinel2.filterBounds(asset).filterDate('2015-01-01','2015-12-31'); //asset is Papua and West Papua i.e Indonesian side of PNG
print('Filtered (by date and ROI) Image Count: ', filtered.size()); //247
// apply the function on the image collection
var clipped = filtered.map(cloudmask);
print('Filtered and Masked Image Count: ', clipped.size());//247
// Make a composite image
var medianComp = clipped.median();
Map.addLayer(medianComp, {bands:['B4','B3','B2'], min: 0, max: 3500}, 'true color median composite', 0);
google-earth-engine sentinel-2
I don not understand why are there holes in the resulting map of median reflectance values from S2 imagery on GEE and how do I fix it?
Also, why are all the clouds not getting masked?
//Function for masking clouds
// http://xzsunbest.tk/2018/07/05/MaskingOutCloudInSentinel2WithGEE/
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
// Simple cloudMask function for Sentinel-2 based on QA band
function cloudmask(image) {
var qa = image.select('QA60');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.updateMask(mask);
}
var filtered = sentinel2.filterBounds(asset).filterDate('2015-01-01','2015-12-31'); //asset is Papua and West Papua i.e Indonesian side of PNG
print('Filtered (by date and ROI) Image Count: ', filtered.size()); //247
// apply the function on the image collection
var clipped = filtered.map(cloudmask);
print('Filtered and Masked Image Count: ', clipped.size());//247
// Make a composite image
var medianComp = clipped.median();
Map.addLayer(medianComp, {bands:['B4','B3','B2'], min: 0, max: 3500}, 'true color median composite', 0);
google-earth-engine sentinel-2
google-earth-engine sentinel-2
edited 15 hours ago
tg110
asked 16 hours ago
tg110tg110
357110
357110
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago
add a comment |
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312978%2fwhy-are-there-holes-in-the-resulting-map-of-median-reflectance-values-from-senti%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312978%2fwhy-are-there-holes-in-the-resulting-map-of-median-reflectance-values-from-senti%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I tried filtering images in the collection by the cloudy pixel percentage and a lot of the worst images were removed, but even then there is still a great deal of haze. I wonder how effective the cloud masks are with fog. Given the humidity on PNG that could be part of the problem. See the code below for my approach (mostly inspired by @rodrigo-e-principe) code.earthengine.google.com/900484fc1311a67696dd801b9b49b75d
– JepsonNomad
10 hours ago