geost.read_bhrg#
- geost.read_bhrg(files: str | Path | Iterable[str | Path], company: str | None = None, schema: dict[str, Any] = None, read_all: bool = False) BoreholeCollection [source]#
Read Geological borehole (BHR-G) XML file or files into a BoreholeCollection. This reads the XML files according to a schema that describes the structure of the of the XML data to find the relevant borehole data. Geost provides predefined schemas for the BHR-G) XML file or files into a BoreholeCollection. This XML files that are used in the Netherlands from the Dutch national BRO database. A predefined schema may also be present for a specific company, which can be specified using the company parameter. Predefined schemas from Geost can be used and extended or you can provide your own schema to extract relevant attributes (see example link below).
- Parameters:
files (str | Path | Iterable[str | Path]) – File or files to read.
company (str | None, optional) – Company name to use a predefined schema for. See
geost.io.xml.schemas
for available schemas. If None, the predefined schema for BRO BHR-G) XML file or files into a BoreholeCollection. This XML files is used by default to read the data. The default is None.schema (dict[str, Any], optional) – Schema to use for reading the data which describes the structure of the XML data. If not given and company is None, the predefined schema for BRO BHR-G) XML file or files into a BoreholeCollection. This XML files is used.
read_all (bool, optional) – XML files may contain multiple borehole elements per XML file. If True, the function will attempt to read all available data. Otherwise, only the first borehole element is read. The default is False.
- Returns:
BoreholeCollection containing the header and data attributes of the BHR-G data.
- Return type:
Examples
A full example of reading XML files can be found here: https://geost.readthedocs.io/en/latest/examples/bhrgt.html