services / satellite-compare
Satellite Before/After Comparison (NASA)
Before/after satellite comparison of the same area on two dates from NASA GIBS true-color imagery (MODIS or VIIRS, about 250 m per pixel): one side-by-side JPEG with date labels plus pixel-based change metrics (share of changed pixels, brightness change) and a cloud, haze and snow estimate for each date, with a plain-language reading that says whether the change is likely real or just weather. For floods, wildfires and burn scars, drought and lake levels, snow cover, deforestation or construction at regional scale. Params: place ("Valencia, Spain") or lat + lon + radius_km (5 to 500, default 50) or bbox, date_before (default one year before date_after), date_after (default yesterday), layer, width (64 to 768 per image, default 384), include_separate.
Call it
Input
| Field | Type | Description |
|---|---|---|
| bbox | array | |
| lat | number | |
| lon | number | |
| radius_km | number = 50 | |
| layer | modis_terra | modis_aqua | viirs_snpp | viirs_noaa20 = "modis_terra" | |
| width | integer = 384 | Width of each of the two images; the composite is 2 x width + 8 px |
| place | string | Place name instead of coordinates, e.g. "Valencia, Spain" (GeoNames, cities and towns) |
| date_before | string | YYYY-MM-DD, default 365 days before date_after |
| date_after | string | YYYY-MM-DD, default yesterday |
| include_separate | boolean = false | Also return both images separately as base64 |
Output
| Field | Type | Description |
|---|---|---|
| image_base64 | string | |
| mime_type | string | |
| width | integer | |
| height | integer | |
| layout | string | |
| bbox | object | |
| date_before | string | |
| date_after | string | |
| layer | string | |
| layer_id | string | |
| change | object | |
| size_bytes | integer | |
| attribution | string | |
| note | string |
Example response (data)
{
"image_base64": "/9j/2wBDAAYEBAUEBAYFBQUG…",
"mime_type": "image/jpeg",
"width": 520,
"height": 264,
"layout": "side_by_side: left = date_before, right = date_after, date labels on top",
"bbox": {
"min_lat": -19.2005,
"min_lon": -67.5757,
"max_lat": -18.2995,
"max_lon": -66.6243
},
"date_before": "2014-05-10",
"date_after": "2016-05-10",
"layer": "modis_terra",
"layer_id": "MODIS_Terra_CorrectedReflectance_TrueColor",
"change": {
"mean_brightness_change_pct": 7.3,
"changed_pixels_pct": 20.1,
"before": {
"cloud_or_snow_pct": 0.5,
"cloud_haze_or_snow_pct": 8.6,
"no_data_pct": 13,
"mean_brightness": 42.6
},
"after": {
"cloud_or_snow_pct": 6.4,
"cloud_haze_or_snow_pct": 18.3,
"no_data_pct": 0,
"mean_brightness": 49.8
},
"reliable": true,
"reading": "Visible change in part of the area (for example water level, burn scars, flooding, snow or fields). Check the image."
},
"size_bytes": 22150,
"attribution": "NASA EOSDIS GIBS / Worldview",
"note": "Daily true-color mosaics at about 250 m per pixel. Change metrics are computed from pixels and are indicative only; seasons, sun angle, clouds and smoke all count as change."
}