Remote Sensing with GeoLattice tutorial banner

Remote sensing measures the Earth without touching it. Optical sensors record reflected sunlight in a few broad bands or hundreds of narrow ones, radar sends its own microwaves and works through cloud and at night, LiDAR times laser pulses to map terrain and trees in three dimensions, and drones fly the same field every week. Turning those measurements into crop maps, flood extents, forest loss, field boundaries or the water a crop uses is the work of this chapter.

These 152 notebooks are chapter 09 of the GeoLattice tutorials. They cover data access, optical, radar, UAV, hyperspectral and LiDAR data, texture analysis, super-resolution, image classification, object detection, foundation models, the surface energy balance and soil moisture, and finish with seventeen capstone projects, using geolattice.rsense with real imagery from Bangladesh, the United States and around the world.

GeoLattice

GeoLattice is a Python library for geospatial analysis that brings vector and raster processing, spatial analysis, spatial statistics, geostatistics, spatial databases, web and cloud GIS and remote sensing together under one import. It is built on GDAL, NumPy, pandas, GeoPandas, Shapely and xarray, so its functions take and return objects these libraries already use: GeoDataFrames, xarray DataArrays and Datasets, NumPy arrays and GDAL-readable files.

Package geolattice
Repository github.com/zia207/GeoLattice
Python 3.10 or newer
License MIT
Author Zia Ahmed, Upatta Analytics

GDAL and PROJ must be installed first, with Python GDAL bindings that match the GDAL library (conda or your system package manager). Then install the remote sensing option, or the full set for the deep-learning notebooks:

python3 -m pip install "geolattice[remote-sensing]"
python3 -m pip install "geolattice[all]"                # adds PyTorch and torchgeo for deep learning

GPUs, large vision models and foundation models have their own extras (rsense-gpu, rsense-vision, rsense-foundation, rsense-uav-dl), which a plain install leaves out.

The chapter uses six imports:

import geolattice.rsense as rs
import geolattice.rsense.classify.image_classification as ic
import geolattice.rsense.foundation_models as fm
import geolattice.rsense.surface_energy_balance as seb
import geolattice.rsense.soil_moisture as sm
from geolattice.rsense import edge_detectors as ed

Data and sensors

geolattice.rsense reads imagery into xarray, runs on the CPU or a GPU, and has a submodule for each kind of sensor.

Task Functions
Core and backends (rs) set_backend, available_backends, read, write, clip, mosaic, reproject
Data access (rs.access) stac_search, earthdata_search, asf_download
Optical (rs.optical) load_sentinel2, load_landsat, load_hls, load_modis, scale, mask_clouds, composite, index, list_indices
SAR (rs.sar) to_db, lee, refined_lee, multitemporal_speckle_filter, multilook, terrain_correct, load_rtc
InSAR (rs.insar) differential_interferogram, goldstein_filter, unwrap, phase_to_los, sbas_inversion, velocity
UAV (rs.uav) flight_plan, read_frame, vegetation_indices, canopy_cover, count_plants, trait_table
Hyperspectral (rs.hyperspectral) read_envi, read_tanager, mnf, continuum_removal, extract_endmembers, unmix, rx, matched_filter
LiDAR (rs.lidar) read_las, smrf, csf, dem, dsm, chm, normalize_heights, detect_trees, building_footprints

Run from the repository root:

import xarray as xr
import geolattice.rsense as rs

rs.set_backend("auto")                                            # GPU if available, else CPU
SCENE = "Data/00_shared/data_remote_sensing/landsat9_vegas_20240708/LC09_L2SP_039035_20240708_02_T1"

bands = xr.Dataset({b: rs.read(f"{SCENE}/{b}.tif").squeeze(drop=True) for b in ["red", "nir", "swir16"]})
sr = rs.optical.scale(bands, sensor="landsat")                    # Collection 2 surface reflectance
ndvi = rs.optical.index(sr, "NDVI")                               # (NIR - red) / (NIR + red)
rs.write(ndvi, "ndvi.tif")                                        # Cloud-Optimized GeoTIFF by default

Analysis and learning

Task Functions
Texture (rs.texture) glcm_texture, glrlm_texture, lbp_texture, fourier_texture, gabor_texture, fractal_dimension, deep_texture_features
Super-resolution (rs.super_resolution) upsample, pansharpen, build_sr_model, train_super_resolution, predict_super_resolution
Image classification (ic) spatial_block_split, train_pixel_classifier, build_cnn, build_segmenter, train_model, predict_map, classification_report
Object detection (ic) build_object_detector, detection_tiles, merge_detections, mean_average_precision
Field boundaries (ed) classical_edges, build_edge_model, detect_fields_ftw, boundary_to_instances
Foundation models (fm) list_models, load_model, prepare, chip_raster, embedding_rgb, embedding_change, linear_probe
Surface energy balance (seb) net_radiation, soil_heat_flux, asce_pm_hourly, run_sebal, run_metric, run_ssebop, tseb_pt, seasonal_et
Soil moisture (sm) open_product, daily_cube, mironov_dielectric, tau_omega, saxton_rawls, change_detection, invert_wcm, dispatch, ml_downscale, validation_metrics, triple_collocation
Time series and fusion (rs) timeseries.whittaker, timeseries.phenology, fusion.upscale

Tutorials

Start with the foundation notebooks; they set up the environment, data access and the CPU and GPU backends used everywhere else. The sensor chapters (optical, radar, UAV, hyperspectral and LiDAR) can then be read in any order, followed by the analysis and learning chapters and the capstones.

Foundations

Tutorial Topic
Remote Sensing Fundamentals Remote Sensing Fundamentals
The Python Geospatial Environment The Python Geospatial Environment
Raster and Vector Data Essentials Raster and Vector Data Essentials
Data Discovery and Access Data Discovery and Access
Getting Access to Remote Sensing Images Getting Access to Remote Sensing Images

Optical

Tutorial Topic
Introduction to Optical Satellite Images Introduction to Optical Satellite Images
Preprocessing of Optical Images Preprocessing of Optical Images
Global Monitoring Every Day MODIS: Global Monitoring Every Day
Landsat Landsat: Half a Century of Earth Observation
Sentinel-2 Sentinel-2: Red Edge, 10 m and Five-Day Revisits
Sentinel-3 Sentinel-3: Ocean Colour, Surface Temperature and Altimetry
Sentinel-5P and Sentinel-5 Sentinel-5P and Sentinel-5: Mapping Air Pollution from Orbit

Radar (SAR and InSAR)

Tutorial Topic
SAR Fundamentals SAR Fundamentals
Sentinel-1 SAR Sentinel-1 SAR
Sentinel-1 SAR Processing Sentinel-1 SAR Processing
Sentinel-1 GRD Processing Sentinel-1 GRD Processing
Sentinel-1 GRD Time Series Sentinel-1 Multitemporal GRD Time Series: Deforestation around the Rohingya Camps (2017)
Topographic InSAR Topographic InSAR: a DEM from a Sentinel-1 SLC Pair
Differential InSAR Differential InSAR (DInSAR)
SBAS InSAR SBAS (Small Baseline Subset) InSAR
Persistent Scatterer InSAR Persistent Scatterer InSAR (PS-InSAR)
Dual-Pol Polarimetric Decomposition Dual-Pol Polarimetric Decomposition (SLC)
Interferometric Coherence of SLCs Interferometric Coherence of SLCs
Sentinel-1 Based Indices Sentinel-1 Based Indices
RADARSAT Constellation Mission RADARSAT Constellation Mission (RCM)
RCM Processing RADARSAT Constellation Mission (RCM) Processing
RADARSAT GRD Data RADARSAT GRD Data
RCM InSAR Processing RADARSAT Constellation Mission (RCM) InSAR Processing
RADARSAT Polarimetric SAR RADARSAT Polarimetric SAR (PolSAR)
Compact-polarimetry Compact-polarimetry (CP)
NISAR NISAR: NASA-ISRO Synthetic Aperture Radar
NISAR Processing NISAR Processing
NISAR RSLC NISAR RSLC: Range-Doppler Single Look Complex Processing
NISAR GSLC NISAR GSLC: Geocoded Single Look Complex Processing
NISAR GCOV NISAR GCOV: Geocoded Polarimetric Covariance Processing
NISAR GUNW NISAR GUNW: Geocoded Unwrapped Interferogram

UAV

Tutorial Topic
UAV Fundamentals and Mission Planning UAV Fundamentals and Mission Planning
Reading and Inspecting UAV Imagery Reading and Inspecting UAV Imagery
Photogrammetry Photogrammetry: Orthomosaic, DSM and DTM
RGB Vegetation Indices and Canopy Cover RGB Vegetation Indices and Canopy Cover
RGB + NIR Multispectral Analysis RGB + NIR Multispectral Analysis
DEM Correction and Canopy Height DEM Correction and Canopy Height
Plant Counting and Size Plant Counting and Size
Crop Health Crop Health: SAM Plant Masks and Senescence Detection
Panicle Detection with YOLO Panicle Detection with YOLO
Season-Long Phenotyping Season-Long Phenotyping

Hyperspectral

Tutorial Topic
Introduction to Imaging Spectroscopy Introduction to Imaging Spectroscopy
Reading and Exploring Hyperspectral Data Reading and Exploring Hyperspectral Data
Preprocessing Hyperspectral Cubes Preprocessing Hyperspectral Cubes
Dimensionality Reduction and Band Selection Dimensionality Reduction and Band Selection
Narrowband Indices and Vegetation Analysis Narrowband Indices and Vegetation Analysis
Biophysical and Biochemical Trait Retrieval Biophysical and Biochemical Trait Retrieval
Spectral Libraries and Spectral Matching Spectral Libraries and Spectral Matching
Endmember Extraction and Spectral Unmixing Endmember Extraction and Spectral Unmixing
Target and Anomaly Detection Target and Anomaly Detection
Greenhouse Gas Plume Detection Greenhouse Gas Plume Detection
Thematic Applications Across Tanager Scenes Thematic Applications Across Tanager Scenes
Deep Learning for Hyperspectral Classification Deep Learning for Hyperspectral Classification

LiDAR

Tutorial Topic
LiDAR Fundamentals LiDAR Fundamentals
LiDAR Processing LiDAR Processing: Quality Control, Cleaning, Ground Classification and Surface Models
Terrain and Hydrology from LiDAR DEMs Terrain and Hydrology from LiDAR DEMs
Forest Structure and Individual Trees from LiDAR Forest Structure and Individual Trees from LiDAR
Buildings and Urban Features from LiDAR Buildings and Urban Features from LiDAR
Point Cloud Classification Point Cloud Classification with Machine Learning and Deep Learning
Spaceborne LiDAR Spaceborne LiDAR: GEDI and ICESat-2
Large-Area LiDAR Processing Large-Area LiDAR Processing: Tiling, Streaming, Parallel Work and the GPU

Texture Analysis

Tutorial Topic
Texture Analysis Texture Analysis
Statistical and Structural Methods Texture Analysis of Landsat Imagery: Statistical and Structural Methods
Transform-Based Methods Texture Analysis of Landsat Imagery: Transform-Based (Spectral) Methods
Local Pattern-Based Methods Texture Analysis of Landsat Imagery: Local Pattern-Based Methods (LBP)
Model-Based Methods Texture Analysis of Landsat Imagery: Model-Based Methods
Deep-Learning-Based Methods Texture Analysis of Landsat Imagery: Deep-Learning-Based Methods

Image Super-Resolution

Tutorial Topic
Image Super-Resolution Image Super-Resolution
Landsat 8 to Sentinel-2 Landsat 8 to Sentinel-2: six-band super-resolution
Sentinel-2 to PlanetScope Sentinel-2 to PlanetScope: multispectral super-resolution
PlanetScope to NAIP-style Imagery PlanetScope to high-resolution NAIP-style imagery: super-resolution
Landsat 8 to High Resolution Landsat 8, Sentinel-2, PlanetScope, and high-resolution imagery

Image Classification

Tutorial Topic
Introduction to Image Classification Introduction to Image Classification
Image Processing Image Processing
Sampling and Accuracy Assessment Sampling, Accuracy Assessment and Reproducible Runs
Classical Image Classification Classical Image Classification: Pixel-Based and Object-Based
CNN Classification on the GPU Image Classification with a CNN on the GPU: Landsat and the Cropland Data Layer
Deep Learning for Sentinel-2 Deep Learning for Sentinel-2: CNN, ResNet, EfficientNet, ConvNeXt, ViT and Swin on the GPU
Transfer Learning and Transformers Transfer Learning and Vision Transformers for Sentinel-2: ImageNet vs Remote-Sensing Weights
Crops from Sentinel-1 Time Series Crop Classification with Sentinel-1 SAR Time Series: Pixel Classifiers and Deep CNNs (VV/VH, May-October 2024)
Multi-Sensor Crop Mapping Spatio-Temporal and Multi-Sensor Crop Mapping: Sentinel-2, Sentinel-1 and Landsat Time Series, 2020 to 2025
Change Detection Change Detection: Classical, Post-Classification and Deep Methods on Landsat and Sentinel-2, 2020 to 2025
Semantic Segmentation of Crops Semantic Segmentation of Crop Types from Sentinel-2: FCN, U-Net, DeepLabV3(+) and SegFormer on the GPU
Instance Segmentation of Fields Instance Segmentation of Agricultural Fields with Mask R-CNN
Imperfect Labels and Domain Shift Imperfect labels and domain shift
Multi-Sensor Image Fusion Multi-sensor image fusion

Object Detection

Tutorial Topic
Object Detection Object Detection
Object Detection in Aerial Imagery Object Detection in Aerial Imagery
Field Boundaries in Google Imagery Field Boundary Detection in Google Satellite Screenshots (Bangladesh)
Field Edges in WorldView Imagery Field Edge Detection in WorldView Imagery: RGB versus RGB + NIR
Field Edges in Sentinel-2 Field Edge Detection in Sentinel-2: Fields of The World versus Delineate Anything

Foundation Models

Tutorial Topic
What Foundation Models Are What Foundation Models Are and Why Remote Sensing Needs Them
Self-Supervised Pretraining Self-supervised pretraining for Sentinel-2 crop mapping
Geospatial Foundation Models Geospatial foundation models: embeddings, promptable segmentation and zero-shot classification
From a GeoTIFF to an Embedding Map From a GeoTIFF to an Embedding Map
Optical Encoders on Sentinel-2 Prithvi, SSL4EO, SatlasPretrain and Scale-MAE on Sentinel-2
One Model for Many Sensors One Model for Many Sensors: DOFA, Panopticon, Copernicus-FM, CROMA and TerraMind
Time in Foundation Models Time in Foundation Models: Prithvi-TL, AnySat, Presto and Galileo
AlphaEarth Foundations AlphaEarth Foundations: Precomputed Embeddings for the Whole Planet
Embeddings as Covariates Foundation Model Embeddings as Covariates: Digital Soil Mapping of SOC
Very High Resolution Models Very High Resolution: DINOv3-sat, Satlas NAIP, Scale-MAE and SAM 2
Vision-Language Models Vision-Language Models: Zero-Shot Classification and Text Retrieval
Change and Similarity in Embedding Space Change and Similarity in Embedding Space
Weather and Earth System Foundation Models Weather and Earth System Foundation Models
Benchmarking Foundation Models Benchmarking Foundation Models on Your Own Data

Surface Energy Balance

Tutorial Topic
ET and the Energy Balance Evapotranspiration and the Surface Energy Balance
An Analysis-Ready Stack Building an Analysis-Ready Stack for Energy Balance Models
Reference ET (ASCE Penman-Monteith) Reference ET with the ASCE Standardized Penman-Monteith Equation
Net Radiation from Landsat Net Radiation from Landsat: Albedo, Emissivity and Surface Temperature
Soil Heat Flux and Aerodynamics Soil Heat Flux, Roughness and Aerodynamic Resistance
SEBAL SEBAL: Solving for Sensible Heat with Hot and Cold Pixels
METRIC METRIC: Internal Calibration against Reference ET
SSEBop, S-SEBI, Triangle, PT-JPL SSEBop, S-SEBI, the Triangle Method and PT-JPL
Two-Source Energy Balance Two-Source Energy Balance: Separating Soil Evaporation and Transpiration
ET at Other Resolutions ET at Other Resolutions: MODIS, Sentinel-3 and Sentinel-2 with Thermal Sharpening
Seasonal ET and Crop Water Use From Snapshots to Seasonal ET and Crop Water Use
Validation and Uncertainty How Good Is the ET Map? Validation, Sensitivity and Uncertainty

Soil Moisture

Tutorial Topic
Soil Moisture Concepts Soil Moisture: Concepts and Why It Matters
Microwave Remote Sensing Microwave Remote Sensing of Soil Moisture
Missions and Products The Mission and Product Landscape
Environment and Data Access Python Environment and Data Access
SMAP L3 Enhanced Daily Cube SMAP L3 Enhanced: a Daily Cube and its Climatology
ASCAT and TU Wien Change Detection ASCAT and the TU Wien Change Detection Approach
ESA CCI Trends and Anomalies ESA CCI: Long-Term Trends and Anomalies
ESA CCI vs ERA5-Land ESA CCI vs ERA5-Land
Sentinel-1 Preprocessing Sentinel-1 Preprocessing for Soil Moisture
Sentinel-1 Change Detection Change Detection Soil Moisture from Sentinel-1
Water Cloud Model Inversion Water Cloud Model and Surface Scattering Inversion
Operational 1 km Products Operational High-Resolution Products
Downscaling: Six Methods Compared Downscaling Soil Moisture: Six Methods Compared

Capstone Projects

Tutorial Topic
Change around Pucallpa, Peru Thirty-five Years of Change around Pucallpa, Peru
Fifty Years in the Bangladesh Delta Fifty Years of Change in the Bangladesh Delta
Wildfire Burned Area Wild Fire Burned-area Mapping
Rohingya Deforestation: Sentinel-2 Timeline of the Rohingya Exodus: Deforestation in Bangladesh (2016-2018)
Flood Mapping in Sylhet Flood Mapping with Sentinel-1 Data - Sylhet, Bangladesh
Rohingya Deforestation: Sentinel-1 Timeline of the Rohingya Exodus: Deforestation in Bangladesh (2016-2018), Sentinel-1 Radar
Ship Detection, Strait of Hormuz Ship Detection in the Strait of Hormuz with Sentinel-1
Crops from NISAR GCOV Crop Classification with NISAR GCOV Time Series and Self-Supervised Learning
Sea Ice in the St. Lawrence Sea Ice Mapping for Shipping Routes in the St. Lawrence Estuary with RADARSAT Constellation Mission (RCM)
Charland Monitoring, Lower Meghna Charland Monitoring with Sentinel-1 SAR (and NISAR L-band), Lower Meghna Estuary of Bangladesh
Shrimp Ghers in Coastal Bangladesh Mapping Shrimp Ghers in Coastal Bangladesh with a 2025–2026 Sentinel-1 Time Series and Sentinel-2
Big Sur Wildfire, 2026 Mapping the 2026 Big Sur Wildfire with Time-Series Sentinel-1 SAR and Sentinel-2 Optical Images
Wetland Paddy in Bangladesh Mapping Wetland Paddy in Bangladesh with a 2025 to 2026 Sentinel-1 Time Series
Field Edges across Four Countries Field Edge Detection across Four Countries: Training in Mexico, Mali, Cambodia and Bangladesh, Testing on an Unseen Bangladesh Site
Tree Biomass and Carbon from LiDAR Tree Inventory, Biomass and Carbon from Airborne Lidar
UAV Phenotyping of Maize Nitrogen UAV-Based High-Throughput Phenotyping of Maize Nitrogen Response
Boro Rice Water Use, Bangladesh Capstone: Water Use of Boro Rice in Bangladesh

Quick reference

Remote sensing quick reference for geolattice.rsense

Sample data

The notebooks read the imagery in Data/00_shared/data_remote_sensing/ and Data/08_remote_sensing/ of the repository (Landsat, Sentinel-1, Sentinel-2, MODIS, UAV, LiDAR and commercial images), and download further scenes from STAC catalogues, NASA Earthdata and ASF where a notebook says so.

License

GeoLattice is released under the MIT License. See LICENSE.


Developed by Zia Ahmed, Upatta Analytics

Back to top