geost.read_collection_geopackage#

geost.read_collection_geopackage(filepath: str | Path, has_inclined: bool = False, crs: str | int | CRS = 28992, vertical_datum: str | int | CRS = 5709)[source]#

Read a GeoST stored Geopackage file of geost.base.Collection objects. The Geopackage contains the Collection’s “header” and “data” attributes as layers which are read into the specified Collection.

Parameters:
  • filepath (str | Path) – GeoST stored Geopackage file of a geost.base.Collection object.

  • has_inclined (bool, optional) – If True, the borehole data table contains inclined data. The default is False.

  • crs (str | int | CRS, optional) – EPSG of the data’s horizontal reference. Takes anything that can be interpreted by pyproj.crs.CRS.from_user_input(). The default is 28992.

  • vertical_datum (str | int | CRS, optional) – EPSG of the data’s vertical datum. Takes anything that can be interpreted by pyproj.crs.CRS.from_user_input(). However, it must be a vertical datum. FYI: “NAP” is EPSG 5709 and The Belgian reference system (Ostend height) is ESPG 5710. The default is 5709.

Return type:

geost.base.Collection

Examples

Any GeoST Collection object can be stored as a geopackage file:

>>> original_collection = geost.data.boreholes_usp()
>>> original_collection
Collection:
# header = 67
>>> original_collection.to_geopackage("./collection.gpkg")

Reading the stored collection using geost.read_collection_geopackage returns the stored collection:

>>> collection = geost.read_collection_geopackage("./collection.gpkg")
>>> collection
Collection:
# header = 67