Skip to main content

getMeasuresForFarm

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-core/src / getMeasuresForFarm

Function: getMeasuresForFarm()

getMeasuresForFarm(fdm, principal_id, b_id_farm, timeframe?): Promise<Map<string, Measure[]>>

Defined in: fdm-core/src/measure.ts:328

Fetches measures for all fields in a farm. Returns a Map keyed by b_id.

Parameters

fdm

PgDatabase

The FDM instance providing the connection to the database.

principal_id

any

The ID of the principal making the request.

b_id_farm

any

The farm ID.

timeframe?

Timeframe

Optional timeframe to filter measures.

Returns

Promise<Map<string, Measure[]>>

A Promise resolving to a Map<b_id, Measure[]>.