NEW
Font size
WorksheetsGeoAI_Python
Total questions: 66
Worksheet time: 33mins
What does this line create? var l8 = ee.ImageCollection("LANDSAT/LC08/C02/T1_TOA")
A single Landsat 8 image
A Landsat 8 ImageCollection (TOA reflectance)
A vector FeatureCollection
A DEM raster
What is the main purpose of .filterBounds(point)?
Filters images by cloud cover only
Filters images that intersect the given geometry
Clips images to a region
Converts images to vectors
What does .filterDate('2015-01-01', '2015-12-31') do?
Takes only January images
Filters by acquisition time of day
Keeps images captured within the year 2015
Sorts images by date
After .sort('CLOUD_COVER').first(), what image is selected?
The most recent image
The least cloudy image (lowest CLOUD_COVER)
The cloudiest image
The median cloud-cover image
In Landsat 8, which band is NIR in your script?
B4
B5
B3
B2
In Landsat 8, which band is Red in your script?
B4
B5
B6
B1
Which formula matches your NDVI calculation?
(Red−NIR)/(Red+NIR)
(NIR+Red)/(NIR−Red)
(NIR−Red)/(NIR+Red)
(Green−Red)/(Green+Red)
What is the typical range of NDVI values?
0 to 100
−100 to 100
−1 to +1
0 to 1 only
What does .rename('NDVI') do?
Changes pixel values
Changes the band name to "NDVI"
Converts NDVI to integer
Removes all other bands
What does Map.centerObject(image2015, 9) do?
Exports the image at zoom 9
Centers the map view on the image footprint at zoom level 9
Clips the image to zoom 9
Reduces resolution to 9 meters
palette:['red', 'yellow', 'green']
Water → Soil → Urban
Low NDVI → Medium NDVI → High NDVI
High NDVI → Low NDVI → No Data
Cloud → Shadow → Snow
What does this line compute? var image_diff = ndvi2015.subtract(ndvi2020)
NDVI2020 − NDVI2015
NDVI2015 − NDVI2020
Average NDVI of both years
Ratio of NDVI2015 and NDVI2020
If image_diff is positive, what does it generally imply?
NDVI increased from 2015 to 2020
NDVI decreased from 2015 to 2020
Cloud cover increased
Resolution improved
If image_diff is negative, what does it generally imply?
NDVI increased from 2015 to 2020
NDVI decreased from 2015 to 2020
NDVI became zero
The image is invalid
In your code, this threshold value is: var threshhold = 0.1
A 10% cloud mask
A change threshold for NDVI difference magnitude
A map zoom factor
A reflectance scaling factor
What is wrong with this “change mask” logic? image_diff.lte(threshhold).or(image_diff.gte(threshhold))
It detects only negative changes
It detects only positive changes
It becomes true for almost all pixels (not a real threshold filter)
It converts NDVI to cloud mask
Which is a correct way to detect “absolute NDVI change >= 0.1”?
image_diff.lte(0.1)
image_diff.gte(0.1)
image_diff.abs().gte(0.1)
image_diff.divide(0.1)
What does ee.Image.pixelArea() represent?
Pixel brightness
Area of each pixel in square meters (m²)
Area in square kilometers (km²)
Slope of each pixel
What does reduceRegion({reducer: ee.Reducer.sum(), ...}) return?
A new ImageCollection
A FeatureCollection
A dictionary of summed values for the band(s)
A map layer style object
If pixel areas are in m², what division correctly converts to km²?
Divide by 1e2
Divide by 1e3
Divide by 1e6
Divide by 1e9
What dataset is used to load Kerala boundary?
USDOS/LSIB_SIMPLE/2017
FAO/GAUL/2015/level2
TIGER/2018/States
COPERNICUS/S2_SR_HARMONIZED
What does .filter(ee.Filter.eq('ADM1_NAME', 'Kerala')) do?
Selects features where the state name is Kerala
Selects districts having Kerala in their name
Filters Sentinel-2 images only
Clips the raster to Kerala
What is the purpose of Map.centerObject(study, 7)?
Exports the map at zoom 7
Centers the map view on Kerala boundary with zoom level 7
Reduces resolution to 7 meters
Applies 7-class classification
Which Sentinel-2 band is used in the cloud masking function?
B8
SCL
QA60
B3
In the SCL mask, which classes are kept as "good land pixels" in your code?
1, 2, 3, 8
4, 5, 6, 7
8, 9, 10, 11
0, 1, 2, 3
What does image.updateMask(mask) do?
Fills masked pixels with zero
Hides pixels where mask is false (removes unwanted pixels)
Changes pixel size
Converts raster to vector
Which ImageCollection is used for Sentinel-2 Surface Reflectance?
COPERNICUS/S2
COPERNICUS/S2_SR_HARMONIZED
LANDSAT/LC08/C02/T1_TOA
MODIS/006/MOD13Q1
What time period is used for Sentinel-2 filtering?
2024-01-01 to 2024-08-01
2025-01-01 to 2025-08-01
2025-08-01 to 2025-12-31
2015-01-01 to 2020-12-31
What does .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10)) ensure?
Keeps images with >10% cloud
Keeps images with <10% cloud cover
Keeps images with exactly 10% cloud
Removes images without cloud metadata
Why is .map(maskS2sr) used?
To calculate NDWI for each image
To apply a cloud mask across the collection
To sort the collection by date
To mosaic the collection
What does .median() do here?
Selects the single least cloudy image
Creates a median composite from all filtered images
Takes the mean NDWI directly
Converts ImageCollection to FeatureCollection
What is the purpose of .clip(study)?
Resamples pixels to 10m
Crops the raster output to Kerala boundary
Filters districts inside Kerala
Exports only the boundary
Which bands are used in NDWI calculation? normalizedDifference(['B3', 'B8'])
Red and NIR
Green (B3) and NIR (B8)
NIR and SWIR
Blue and Green
NDWI formula used in your code corresponds to:
NIR+RedNIR−Red
Green+NIRGreen−NIR
SWIR+NIRSWIR−NIR
Red+GreenRed−Green
What is returned by reduceRegions()?
A single number
A FeatureCollection with new statistics added per feature
An ImageCollection
A single raster image
Which statistic is calculated for NDWI per district?
Sum
Mean
Max
Median
What does Export.table.toDrive export?
Raster NDWI as GeoTIFF
Zonal statistics table (FeatureCollection) as CSV
Map as PNG
A shapefile of pixels
What does var high_ndwi = ndwi.gt(0.3); represent?
NDWI less than 0.3
Pixels where NDWI is greater than 0.3 (high water likelihood)
Cloud mask pixels
District mean NDWI
Why is high_ndwi.updateMask(high_ndwi) done?
To convert boolean to float
To display only pixels that satisfy the high NDWI condition
To remove NDWI band
To calculate zonal mean
In your suitability classification, what class is assigned when NDWI≥0.3 ?
0
1
2
3
What does this line load? var s2 = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED");
Landsat 8 TOA collection
Sentinel-2 Surface Reflectance (harmonized) ImageCollection
Sentinel-1 SAR collection
MODIS NDVI collection
What is the purpose of Map.addLayer(ROI);?
Exports ROI as shapefile
Displays the ROI geometry on the map
Converts ROI to raster
Calculates ROI area
What does Map.centerObject(ROI, 10); do?
Clips ROI to zoom 10
Centers the map on ROI at zoom level 10
Sets image scale to 10m
Buffers ROI by 10 units
What does .filter(ee.Filter.bounds(ROI)) do?
Keeps only images outside ROI
Keeps images that intersect the ROI
Clips images to ROI
Removes images with missing ROI metadata
What does .filter(ee.Filter.date('2024-01-01', '2024-12-10')) do?
Keeps only December images
Keeps images between Jan 1, 2024 and Dec 10, 2024
Sorts images by date
Converts date strings to timestamps only
What does .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 1)) ensure?
Images with cloud cover > 1%
Images with cloud cover < 1%
Removes all cloud pixels automatically
Uses cloud mask band QA60 directly
What does .select('B.*') select?
Only band B8
Only RGB bands
All bands whose names start with "B" (B1, B2, B3, …)
Only "B.*" metadata fields
What is the output type of this line? var image = filtered.median().clip(ROI);
FeatureCollection
Single ee.Image (median composite clipped to ROI)
ImageCollection
Dictionary
Why is .median() commonly used for Sentinel-2 composites?
It selects the brightest pixel always
It reduces noise/outliers (including residual clouds) better than single image selection
It increases spatial resolution
It converts SR to TOA
What does Map.addLayer(image, imageVisParam, 'image_sent'); require to work?
A defined imageVisParam object with valid band names and visualization parameters for the image
An ROI layer added previously to the map
A web map access token
No parameters because it renders with defaults only
What is achieved by this? var Class_name = builtup.merge(Forest).merge(waterbody).merge(others);
Combines all training polygons/points into one FeatureCollection
Converts raster classes into vector
Merges all Sentinel images into one
Creates a confusion matrix automatically
What should be true about the training FeatureCollections (builtup/Forest/waterbody/others)?
They must be rasters
They must contain a property named Class (as used later)
They must be exported to Drive first
They must contain only one geometry type (points only)
Which bands are used as predictor variables in classification?
B1, B5, B6
B2, B3, B4, B8, B11, B12
Only B2, B3, B4
Only B8 and B11
Why is randomColumn('random') used?
Adds random noise to image pixels
Adds a random number to each feature for splitting datasets
Randomizes band names
Creates random ROIs
What percentage of samples go into training using < 0.8?
20%
80%
50%
100%
What does image.sampleRegions({...}) produce?
A classified image
A FeatureCollection of sampled pixel values + class labels
A confusion matrix
A geometry-only layer
In trainingSample, what does properties: ['Class'] do?
Renames the band to Class
Copies the Class label from training features into the samples
Filters only Class band from image
Creates new class labels automatically
What classifier algorithm is used here? ee.Classifier.smileCart()
Random Forest
CART (Decision Tree)
SVM
K-Means
What does .train({features: trainingSample, classProperty: 'Class', inputProperties: bands}) do?
Clips the training sample to ROI
Fits the CART model using the selected bands to predict Class
Converts training polygons into raster
Calculates NDVI and NDWI
What does image.classify(classifier) output?
ImageCollection
A classified image where each pixel has a predicted class value
FeatureCollection of classes
Dictionary of class names
Why is this visualization used? {min: 0, max: 3, palette: [...]}
Because NDVI ranges 0–3
Because there are 4 class codes (0–3) being displayed with colors
Because Sentinel-2 has 4 bands
Because CART outputs probabilities only
What is created by validationSample = image.sampleRegions({...})?
Training samples
Validation samples (pixel values extracted from validation features)
Cloud mask samples
Only geometry boundaries
What does this do? var validated = validationSample.classify(classifier);
Retrains the model
Adds a classification prediction column to validation samples
Converts validation samples into raster
Removes Class labels
What does this compute? validated.errorMatrix('Class', 'classification')
NDWI class histogram
Confusion matrix comparing true Class vs predicted classification
Cloud percentage table
Slope error matrix
Overall Accuracy represents:
Average NDVI of correct pixels
Fraction of validation samples correctly classified
Only producer accuracy for class 0
Only consumer accuracy for class 3
What does confusionMatrix.producersAccuracy() measure?
Fraction of reference samples correctly classified for each class
Fraction of predicted samples that are correct for each class
Overall accuracy across all classes
Kappa statistic value
