Skip to main content

getCurrentSoilDataForFarm

@nmi-agro/fdm-source


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

Function: getCurrentSoilDataForFarm()

getCurrentSoilDataForFarm(fdm, principal_id, b_id_farm, timeframe?): Promise<Map<string, CurrentSoilData>>

Defined in: fdm-core/src/soil.ts:738

Retrieves the most recent soil data for every field on a farm.

Parameters

fdm

PgDatabase

The FDM instance providing the connection to the database.

principal_id

any

The identifier of the principal performing the operation.

b_id_farm

any

The identifier of the farm.

timeframe?

Timeframe

Optional timeframe to exclude analyses with a sampling date after timeframe.end.

Returns

Promise<Map<string, CurrentSoilData>>

A Map where each key is a field ID (b_id) and each value is the current soil data for that field.