Change detection tool
The ChangeDetectionTool, which an agent sees as FindChanges, compares two time windows over indexed regions. The answer reports, per class, what appeared, disappeared, grew, and shrank.
Set time_field to the capture-time field on each region. The vectorize processor writes captured_at when you set that ingest parameter. Dates are ISO-8601 (2024-07-12 or a comma-separated pair 2024-07-01,2024-07-07). Call WhenWasThisImaged to choose windows that contain documents.
Windows
baseline and compare are dates. A single date means that whole day; a comma-separated pair is an inclusive range. The answer repeats the windows it used.
When the baseline window has no documents, the answer states that the baseline is empty and names WhenWasThisImaged.
Totals and regions
By default the tool compares class totals — how many regions of each label, and how much of measure_field they carry — in one search.
Set detail to regions to name the individual polygons that appeared and left. The answer says which pass ran.
Parameters
| Parameter | Required | Description |
|---|---|---|
index | Yes | The index holding the regions. |
time_field | Yes | The date field holding when each document was captured. |
baseline | Yes | The earlier window: a date, or a comma-separated pair. |
compare | Yes | The later window: a date, or a comma-separated pair. |
label_field | No | The field holding each region's class or label. |
measure_field | No | A numeric field summed per class (typically area). |
query | No | A phrase that restricts which regions count. |
area | No | An area of interest, as WKT. |
field | No | The geometry field area is tested against. |
detail | No | Set to regions to name individual polygons. |
Register a flow agent that runs the ChangeDetectionTool
POST /_plugins/_agent/agents/_register
{
"name": "Change_Agent",
"type": "flow",
"description": "compares two dates over indexed regions",
"tools": [
{
"type": "ChangeDetectionTool",
"name": "DemoFindChanges",
"parameters": {
"index": "land_cover",
"time_field": "captured_at",
"label_field": "label",
"measure_field": "area"
}
}
]
}
POST /_plugins/_ml/agents/<agent_id>/_execute
{
"parameters": {
"baseline": "2024-07-12",
"compare": "2024-07-19"
}
}
Related tools
- Coverage and gaps before you compare:
WhenWasThisImaged - What is in a single raster:
FindImageRegions