isFieldInGWGBGebied
@svenvw/fdm-source / fdm-calculator/src / isFieldInGWGBGebied
Function: isFieldInGWGBGebied()
isFieldInGWGBGebied(
b_centroid
):Promise
<boolean
>
Defined in: fdm-calculator/src/norms/nl/2025/dierlijke-mest-gebruiksnorm.ts:21
Determines if a field is located within a grondwaterbeschermingsgebied (GWBG) in the Netherlands. This is achieved by querying a GeoTIFF file that delineates GWBG areas. The function checks the value at the field's centroid coordinates.
Parameters
b_centroid
Field
An array containing the longitude
and latitude
of the field's centroid.
This point is used to query the GeoTIFF data.
Returns
Promise
<boolean
>
A promise that resolves to true
if the GeoTIFF value at the centroid is 1 (indicating it is within a GWBG area),
and false
if the value is 0.
Throws
If the GeoTIFF returns an unexpected value, or if there are issues fetching or processing the file.