Skip to content

Error in code #269

Jan 21, 2021 · 4 comments · 5 replies
Discussion options

You must be logged in to vote

This code I tested in Google Colab.

import ee
import geemap

Map = geemap.Map()
ee.Initialize()

Map.add_basemap(basemap='HYBRID')

L8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")

roi =ee.Geometry.Polygon(
    [[
        [78.36456276631178, 13.52224244688901],
        [79.99053932881178, 13.564965726101205],
        [79.81475807881178, 16.703679438038012],
        [77.63946511006178, 16.324487178056735]
    ]]
)


def maskL8sr(image):
    cloudShadowBitMask = ee.Number(2).pow(3).int()
    cloudsBitMask = ee.Number(2).pow(5).int()
    qa = image.select('pixel_qa')
    mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0).And(qa.bitwiseAnd(cloudsBitMask).eq(0))
    return image.updateMask(mask).d…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@pardhasreechaitnya
Comment options

@pardhasreechaitnya
Comment options

Comment options

You must be logged in to vote
2 replies
@pardhasreechaitnya
Comment options

@ErikSeras
Comment options

Answer selected by giswqs
Comment options

You must be logged in to vote
1 reply
@ErikSeras
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants