SoilProfile#

class dutchsoils.soilprofile.SoilProfile(index=None, code=None, bofekcluster=None, bofekcluster_dominant=None)#

Represents a single Dutch soil profile, providing access to soil properties, horizons, and cluster information based on various identifiers (index, code, or BOFEK2020 cluster). This class supports profile lookup by index, code, cluster, or geographic location, and provides methods for retrieving soil horizon data, area statistics, and input dictionaries for pySWAP modeling. Data is loaded from CSV files located in the package’s data directory.

Parameters:
  • index (int | None)

  • code (int | None)

  • bofekcluster (int | None)

  • bofekcluster_dominant (bool | None)

index#

Soil profile index.

Type:

int or None

code#

Soil profile code.

Type:

int or None

name#

Name of the soil profile.

Type:

str

bofekcluster#

BOFEK2020 cluster number.

Type:

int or None

bofekcluster_name#

Name of the BOFEK cluster.

Type:

str

bofekcluster_dominant#

Whether the profile is dominant in its cluster.

Type:

bool or None

Examples

>>> sp = SoilProfile(index=101)
>>> sp.get_data_horizons()
>>> sp.get_area(which="profile")
>>> sp.plot()

Attributes#

Methods#

__init__

from_bofekcluster

Create SoilProfile(s) from a BOFEK cluster number.

from_code

Create SoilProfile(s) from a soil profile code.

from_index

Create SoilProfile(s) from a soil profile index.

from_location

Create SoilProfile(s) from geographic coordinates using the WMS of PDOK (https://www.pdok.nl/ogc-webservices/-/article/bro-bodemkaart-sgm-).

get_area

Returns the total area (ha) in the Netherlands of this profile or the total BOFEK2020 cluster it belongs to.

get_data_horizons

Returns a DataFrame with soil horizon data for this profile.

get_swapinput_cofani

Returns a list of 1.0 for each soil physical layer (for pySWAP).

get_swapinput_fractions

Returns a dictionary for the SOILTEXTURES table in pySWAP.

get_swapinput_hydraulicparams

Returns a dictionary for the SOILHYDRFUNC table in pySWAP.

get_swapinput_profile

Returns a dictionary for the SOILPROFILE table in pySWAP.

plot

Plots the soil profile using the DutchSoils visualization.