6b Get Plots
โถStep 6b: Get Plots
Retrieve plot (supply shed) locations with polygon geometries for map rendering. Plots are nested within facility areas and represent individual production zones.
โถWhat this step does
It reads the plot geometries for the task from /locations/plots, scoped
by filter[assets.task_id]. Each plot carries its geo polygon,
commodity, producer_name, and area, plus links back to its parent
facility and supply shed.
โถWhy it's needed
Plots are the finest-grained unit of the footprint โ when you process a
facility, Epoch derives the plots beneath it, and this is where they
surface with geometry. The map draws these nested inside the facility
polygons, and the per-plot deforestation metrics (6e) join to them by
plot_id. Without this read there are no plot boundaries to render or to
colour by compliance.
โถRequest
GET /locations/plots?filter[assets.task_id]=eq:{process-task-id}
Query parameters:
| Parameter | Description |
|---|---|
filter[assets.task_id] | Process task ID from Step 4 |
filter[commodity] | Filter by commodity type |
page[number] | Page number |
page[size] | Items per page |
โถFrontend Usage
- Map polygons: Render
geoas plot boundaries, nested inside facility polygons - Different style: Use a distinct color/opacity from facility polygons
- Click handler: On plot click, show tooltip with producer name, commodity, area, and metrics
- Navigation: Use
links.facilityto navigate to the parent facility,links.shedfor the supply shed - Metric fetch: Use
links.metrics_deforestationto fetch deforestation metrics per plot