Created
March 5, 2026 12:22
-
-
Save rinvictor/93806c694118daf348556c4ee134e75a to your computer and use it in GitHub Desktop.
Visualizing the 'Cartographic Lag' in GEE: A comparative analysis showing how real-time physical infrastructure (Sentinel-1 SAR 2026) outpaces annual foundation models (DeepMind AlphaEarth 2025) in rapidly growing megacities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Define exact coordinates (New Administrative Capital, Egypt) | |
| var lon = 31.75; | |
| var lat = 30.01; | |
| var targetPoint = ee.Geometry.Point([lon, lat]); | |
| var nrc = targetPoint.buffer(500).bounds(); | |
| Map.setCenter(lon, lat, 12); | |
| // Load Night Lights (VIIRS) | |
| // Comparing 2021 with the last 6 months available (up to early 2026) | |
| var lightsOld = ee.ImageCollection("NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG") | |
| .filterDate('2021-01-01', '2021-12-31') | |
| .median() | |
| .select('avg_rad'); | |
| var lightsNew = ee.ImageCollection("NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG") | |
| .filterDate('2025-09-01', '2026-02-28') | |
| .median() | |
| .select('avg_rad'); | |
| var lightDiff = lightsNew.subtract(lightsOld); | |
| // Load Radar (Sentinel-1) | |
| var radar2026 = ee.ImageCollection('COPERNICUS/S1_GRD') | |
| .filterBounds(nrc) | |
| .filterDate('2026-01-01', '2026-03-04') | |
| .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')) | |
| .median(); | |
| // Real Satellite Image (Sentinel-2) | |
| var optical2026 = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED") | |
| .filterBounds(nrc) | |
| .filterDate('2026-01-01', '2026-03-04') // Data up to today | |
| .sort('CLOUDY_PIXEL_PERCENTAGE') | |
| .first(); | |
| // Sample: super simple filter to isolate buildings | |
| var buildingsOnly = radar2026.select('VV').gt(-12); | |
| var visibleBuildings = buildingsOnly.updateMask(buildingsOnly); | |
| // AlphaEarth Foundations (Google DeepMind) | |
| var alphaEarth = ee.ImageCollection("GOOGLE/SATELLITE_EMBEDDING/V1/ANNUAL") | |
| .filterBounds(nrc) // Using your exact area in Egypt | |
| .filterDate('2024-01-01', '2025-12-31') // Getting the latest available year | |
| .first(); | |
| Map.addLayer(radar2026.select('VV'), {min: -20, max: 0}, '1. Radar 2026 (Current)'); | |
| Map.addLayer(lightDiff, {min: 0, max: 15, palette: ['black', 'blue', 'cyan', 'yellow', 'red']}, '2. Night Lights Growth (21 vs 26)'); | |
| Map.addLayer(optical2026, {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000}, '3. Satellite Photo 2026'); | |
| Map.addLayer(visibleBuildings, {palette: ['#ff0000']}, '4. Radar: Buildings Only (Highlighted)'); | |
| Map.addLayer(alphaEarth, { | |
| bands: ['A01', 'A16', 'A09'], | |
| min: -0.5, | |
| max: 0.5 | |
| }, '5. AI Vision: AlphaEarth (Urban Composite: A01, A16, A09)'); | |
| // Add a red marker to the exact coordinates | |
| Map.addLayer(targetPoint, {color: 'red'}, 'Target Location Marker'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment