Skip to main content

getRegion

@svenvw/fdm-source


@svenvw/fdm-source / fdm-calculator/src / getRegion

Function: getRegion()

getRegion(b_centroid): Promise<RegionKey>

Defined in: fdm-calculator/src/norms/nl/2025/stikstofgebruiksnorm.ts:83

Determines the specific soil region (e.g., "zand_nwc", "zand_zuid", "klei", "veen", "loess") for a given field based on its geographical coordinates. This is achieved by performing a spatial query against a vector file containing the boundaries of grondsoortenkaart in de Meststoffenwet in the Netherlands.

Parameters

b_centroid

Field

An array containing the longitude and latitude of the field's centroid. This point is used to query the geographical data.

Returns

Promise<RegionKey>

A promise that resolves to a RegionKey (e.g., "zand_nwc", "zand_zuid", "klei", "veen", "loess") if the field's centroid is found within a defined soil region.

Throws

If there are issues fetching the file, processing its stream, or if the field's coordinates do not fall within any known region.

Remarks

This function is critical for applying region-specific nitrogen norms, as these norms vary based on soil type.