Session 2: Advanced Palawan Land Cover Lab
Multi-temporal Classification and Change Detection
Session 2: Advanced Palawan Land Cover Lab
Multi-temporal Classification and Change Detection
Advanced feature engineering and real-world NRM applications
Session Overview
Duration: 2 hours | Type: Hands-on Lab | Difficulty: Intermediate
This session builds on Session 1 by implementing advanced classification techniques for a real-world Philippine conservation scenario: detailed land cover mapping of a ~12,000 km² area of central Palawan (around Puerto Princesa) inside the Palawan Biosphere Reserve.
Presentation Slides
- ✓ Complete Session 1 (Supervised Classification with Random Forest)
- ✓ Google Earth Engine access with a registered Cloud project
- ✓ Python environment with geemap, ee, scikit-learn
- ✓ Understanding of Random Forest basics
What You’ll Learn
After completing this session, you will be able to:
- Engineer Advanced Features
- Calculate GLCM texture features (contrast, entropy, homogeneity)
- Create multi-temporal composites
- Integrate topographic data (DEM, slope, aspect)
- Stack comprehensive feature sets
- Implement Multi-temporal Analysis
- Process dry and wet season imagery
- Calculate temporal indices and metrics
- Detect seasonal patterns
- Optimize Classification Models
- Perform hyperparameter tuning
- Use out-of-bag error and a held-out validation set
- Understand class imbalance
- Apply post-processing techniques
- Conduct Change Detection
- Compare multi-temporal classifications
- Quantify deforestation rates
- Identify change hotspots
- Generate transition matrices
- Support NRM Decision-Making
- Monitor protected areas
- Detect encroachment
- Generate stakeholder reports
- Export results for GIS analysis
Lab Structure
Part A: Advanced Feature Engineering (30 minutes)
Learn to extract and combine multiple feature types for improved classification accuracy.
🌿 Texture Features (GLCM)
Calculate Gray-Level Co-occurrence Matrix features: - Contrast (local variation) - Entropy (randomness) - Homogeneity (uniformity)
Useful for: Distinguishing forest types, urban texture
📅 Temporal Features
Create seasonal composites: - Dry season (Jan-May) - Wet season (Jun-Nov) - NDVI differences - Phenological signals
Useful for: Agriculture identification, seasonal wetlands
⛰️ Topographic Features
Extract from SRTM DEM: - Elevation - Slope - Aspect
Useful for: Forest/agriculture separation, land use patterns
🎯 Feature Stacking
Combine all features: - Spectral bands (6) - Indices (4) - Texture (3) - Temporal (6) - Topographic (3)
Total: 22 features
Part B: Palawan Case Study (45 minutes)
Apply advanced classification with an 8-class scheme (Session 1 used 5 classes).
Study Area: 1° × 1° box in central Palawan (~12,000 km², land and sea)
Reference labels: derived from ESA WorldCover 2021 and the Hansen Global Forest Change dataset (a teaching proxy — not field-verified ground truth)
Classification Scheme:
| Class | Description | Key Features |
|---|---|---|
| 🌳 Primary Forest | Dense dipterocarp, closed canopy | High NDVI, low texture variation |
| 🌲 Secondary Forest | Regenerating, mixed canopy | Moderate NDVI, medium texture |
| 🌊 Mangroves | Coastal, tidal influence | High NDVI + high NDWI |
| 🌾 Agricultural | Rice, coconut plantations | Seasonal NDVI patterns |
| 🌿 Grassland | Open areas, sparse vegetation | Low-moderate NDVI |
| 💧 Water | Rivers, lakes, coastal | Very low NIR, high NDWI |
| 🏘️ Urban | Settlements, infrastructure | High NDBI, low NDVI |
| ⛏️ Bare Soil | Mining, cleared land | Bright reflectance, low NDVI |
Part C: Model Optimization (30 minutes)
Fine-tune your Random Forest classifier for maximum accuracy.
Optimization Techniques:
- Hyperparameter Tuning
- Number of trees (50, 100, 200)
- Variables per split
- Minimum samples per leaf (1, 5, 10)
- Validation
- Stratified 70/30 train/validation split
- Out-of-bag error estimate (
classifier.explain()) - Per-class producer’s/user’s accuracy
- Class Balancing
- Equal samples per class via stratified sampling
- Discuss the effect on rare classes (urban, bare soil)
- Post-Processing
- Majority filtering (reduce salt-and-pepper noise)
- Minimum mapping unit (discussion)
Part D: NRM Applications (15 minutes)
Apply your classification to real conservation challenges in Palawan.
🚨 Deforestation Detection
Compare 2020 vs 2024: - Forest loss hotspots - Conversion patterns - Quantify area changes - Cross-check with Hansen GFC loss
🌾 Agricultural Expansion
Track land conversion: - Forest → Agriculture - Grassland → Agriculture - Expansion rates - Proximity to roads
🛡️ Protected Area Monitoring
Assess threats: - Boundary encroachment - Internal degradation - Buffer zone changes - Compliance tracking
📊 Stakeholder Reports
Generate outputs: - Area statistics by class - Change matrices - Maps (GeoTIFF, PNG) - CSV summary tables
Key Concepts
GLCM Texture Analysis
What is GLCM?
Gray-Level Co-occurrence Matrix measures spatial relationships between pixel pairs, capturing image texture.
Why use it? - Distinguishes primary vs secondary forest (canopy structure) - Separates urban from bare soil (heterogeneity) - Identifies mangrove stands (unique texture)
GEE Implementation:
# Add NIR texture features
# glcmTexture needs an integer image: quantise 0-0.5 reflectance to 0-255 first
nir_8bit = image.select('B8').multiply(255 / 0.5).clamp(0, 255).toUint8()
texture = nir_8bit.glcmTexture(size=1) # 3x3 window
contrast = texture.select('B8_contrast')
entropy = texture.select('B8_ent')Multi-temporal Composites
Philippine Seasons: - Dry (Dec-May): Best for forest mapping, less cloud cover - Wet (Jun-Nov): Shows maximum vegetation, agricultural phenology
Temporal Indices: - NDVI Difference: Wet NDVI - Dry NDVI
Positive: Seasonal crops (rice)
Near zero: Evergreen forest
Negative: Dry season crops
Benefits: - Reduce cloud impacts (median compositing) - Capture phenological cycles - Improve agricultural separation - Detect irrigated vs rainfed
Hyperparameter Tuning
Key Random Forest Parameters:
| Parameter | Effect | Recommended Range |
|---|---|---|
numberOfTrees |
More trees = better but slower | 100-500 |
variablesPerSplit |
Features per split | sqrt(n) for classification |
minLeafPopulation |
Minimum samples in leaf | 1-5 |
bagFraction |
Training sample fraction | 0.5-0.7 |
Optimization Strategy: 1. Start with defaults 2. Grid search on key parameters 3. Use out-of-bag error (classifier.explain()) for a quick check 4. Validate on independent test set
Palawan Conservation Context
Why Palawan Matters
Biodiversity Hotspot: - Often called the Philippines’ “last ecological frontier” - Large share of the country’s remaining old-growth and mangrove forest - Many endemic species (e.g. Palawan peacock-pheasant, Palawan pangolin)
Threats: - Mining (nickel, chromite) - Agricultural expansion - Infrastructure development - Illegal logging - Tourism pressure
Conservation Status: - UNESCO Biosphere Reserve (1990) - Multiple protected areas - Strategic Environmental Plan (SEP) framework - National government priority
NRM Applications
DENR Monitoring: - Annual forest cover updates - REDD+ MRV requirements - Protected area assessments - Permit compliance checking
Local Government: - Land use planning - Infrastructure siting - Agricultural zoning - Disaster risk assessment
NGO Conservation: - Deforestation alerts - Community monitoring - Baseline assessments - Impact evaluation
Hands-On Notebook
Access the Lab
The complete hands-on lab is available as an interactive Jupyter notebook:
Notebook (worked examples + exercises):
session2_extended_lab_STUDENT.ipynb
Code Templates
Reusable Python functions for advanced features:
- GLCM Texture:
glcm_template.py - Temporal Composites:
temporal_composite_template.py - Change Detection:
change_detection_template.py
Expected Outcomes
Classification Performance
Indicative targets (agreement with the proxy reference labels — your numbers will vary): - Overall accuracy: around 75–85% - Weakest classes: primary vs secondary forest, grassland vs agriculture - Water, mangroves and urban are usually the most reliable
Common Confusion: - Primary ↔︎ Secondary Forest (canopy density gradient) - Mangroves ↔︎ Agriculture (wet season similarity) - Urban ↔︎ Bare Soil (bright surfaces)
Deliverables
By the end of this session, you will produce:
✅ 8-class land cover map (30 m analysis scale)
✅ Accuracy assessment with per-class metrics
✅ Feature importance analysis
✅ 2020–2024 change map, cross-checked with Hansen GFC
✅ Area statistics by class
✅ Exported GeoTIFF for GIS (optional)
Troubleshooting
Common Issues
“Computation timed out” - Reduce study area size - Use a smaller GLCM window (size=1, i.e. 3×3) - Increase tileScale in sampleRegions/reduceRegion - Export instead of calling .getInfo() on large results
“User memory limit exceeded” - Increase tileScale (e.g. 4 or 8) - Export intermediate results - Reduce feature count
“Low classification accuracy” - Check training data quality - Add more training samples - Try different feature combinations - Adjust class definitions
“GEE authentication failed”
import ee
ee.Authenticate()
ee.Initialize(project="your-cloud-project-id") # a Cloud project registered for Earth EngineGetting Help
- 📖 FAQ
- 💬 GEE Developers Forum
- 📧 dimitris@anefelo.com
Additional Resources
Documentation
Datasets
- ESA WorldCover (10 m global, 2020 and 2021)
- Esri/Impact Observatory annual land cover (10 m global, annual)
- Copernicus Global Dynamic Land Cover (100 m global)
- Hansen Global Forest Change (30 m forest loss, annual)
- Philippine Open Data Portal
Scientific Papers
- Karra et al. (2021). Global LULC with Sentinel-2 and deep learning. IGARSS
- Phiri et al. (2020). Sentinel-2 LULC classification: A review. Remote Sensing
- Belgiu & Drăguţ (2016). Random Forest in remote sensing. ISPRS
Assessment
Formative Assessment
- ✓ Complete the notebook exercises
- ✓ Explain which classes are least reliable and why
- ✓ Generate all required outputs
- ✓ Answer concept check questions
Summative Assessment
- Classification map quality (40%)
- Accuracy metrics achieved (30%)
- Change detection analysis (20%)
- Written interpretation (10%)
Next Steps
You’re now ready for deep learning approaches!
Session 3 introduces Convolutional Neural Networks (CNNs) for Earth observation, building on your classification experience.
Extended Projects
Want to go further? Try these:
- Expand Study Area: Apply to entire Palawan or other Philippine regions
- Add Classes: Separate coconut vs rice, primary forest sub-types
- Time Series: Analyze annual trends (2017-2024)
- Integration: Combine with field data or local knowledge
- Automation: Build monitoring pipeline with regular updates
Quick Links
Timing Management: - Part A (Features): Often takes 35-40 min (GLCM is computationally intensive) - Part B (Classification): 45-50 min is realistic - Part C (Optimization): Can be shortened to 20 min if needed - Part D (NRM): Good extension for fast finishers
Common Student Questions: - “Why is GLCM slow?” → Explain computational complexity, suggest smaller windows - “Can I use my own study area?” → Yes, provide bbox coordinates - “What if accuracy is low?” → Check training data, try feature selection - “How to export large areas?” → Demonstrate tiling strategy
Teaching Tips: - Demo complete workflow before exercises - Use pair programming for debugging - Show parameter exploration interactively - Gallery walk to share results