GeostFrame .gst accessor#
GeoST extends Pandas and
Geopandas
with the .gst accessor, which provides all GeoST-specific methods to generic Pandas DataFrame
and Geopandas GeoDataFrame objects. The .gst accessor becomes available by importing
geost like so:
import geost
Once imported, the .gst accessor can be used on any Pandas DataFrame or Geopandas GeoDataFrame.
For example:
import pandas as pd
# create a DataFrame with x and y coordinates for three points identified by 'nr'
df = pd.DataFrame({"nr": ["a", "b", "c"], "y": [1.2, 2.3, 3.4], "x": [0.8, 1.9, 2.0]})
df.gst.has_xy_columns
# Output:
# True
Constructor#
|
Analysis#
|
Get the cumulative thickness of layers where a column contains a specified search value or values, or falls within a specified range. |
|
|
|
Find the top depth in individual survey ids where a column in a Pandas DataFrame contains specified search value or values, or falls within a specified range. |
Coordinate Reference System#
|
Change the coordinate reference system (CRS) to a given target CRS. |
|
Change the vertical datum of the object's surface levels. |
|
Transform the coordinates of GeoDataFrame or DataFrame to a given coordinate reference system (CRS). |
Generic#
Calculate the thickness of layers in the data. |
|
Standardize column names to a consistent format used in GeoST. |
|
|
Create a |
|
Create a header GeoDataFrame from the DataFrame to be used as a header table for the creation of a |
|
Validate the DataFrame by checking for the presence of crucial information, data types and consistency of the data. |
Export#
|
Write data to 2 csv files: 1) interval data and 2) time-depth chart. |
|
Create a Pyvista MultiBlock object of cylinder-shaped geometries to represent boreholes. |
|
Create a PyVista UnstructuredGrid object of the data in this instance. |
|
Write data to geopackage file that can be directly loaded in the Qgis2threejs plugin. |
Selection#
|
Do a condition-based selection on the DataFrame or GeoDataFrame: return the rows in the data where the 'condition' evaluates to True, see examples below. |
|
Select data based on the elevation of the top and/or end of the survey. |
|
Select data based on the length of the survey, which is determined by the difference between the surface and the end of the survey. |
|
Select data based on the presence of values in a given column. |
|
Slice rows from data based on matching condition. |
Slice data based on given upper and lower boundaries. |
Spatial#
|
Select all data that lie within a maximum distance from given line geometries. |
|
Select all data that lie within a maximum distance from given point geometries. |
|
Select data within a specified bounding box (xmin, ymin, xmax, ymax). |
|
Select all data that lie within given polygon geometries. |
|
Join information from another GeoDataFrame by a spatial relationship (e.g. overlap) between the geometries in the original GeoDataFrame with the geometries in the other GeoDataFrame. |
Attributes#
Get a boolean mask indicating the locations of new survey IDs in the data. |
|
Returns True if the object contains information about depth, such as 'top' and 'bottom' or 'depth' columns, False otherwise. |
|
Returns True if the object is a GeoDataFrame with a valid geometry column, False otherwise. |
|
Returns True if the object contains x and y columns, False otherwise. |
|
Get a boolean mask indicating the locations of the last row in each survey. |
|
Returns True if the object contains layered data, i.e. both 'top' and 'bottom' columns, False otherwise. |