geost.bro.GeoTop.select_with_points#

GeoTop.select_with_points(points: str | Path | GeoDataFrame) Dataset#

Select voxel columns at the locations of point geometries.

Parameters:

points (str | Path | gpd.GeoDataFrame) – Geodataframe (or file that can be parsed to a geodataframe) to select with.

Returns:

Selected Xarray Dataset with dimensions “idx” and “z”. The dimension “idx” is the index order of the selection points. The “z” dimension is the original depth dimension of the VoxelModel instance. The returned Dataset contains all original data variables of the VoxelModel instance.

Return type:

xr.Dataset

Examples

To sample a VoxelModel with a GeoDataFrame containing point geometries: >>> selected = voxelmodel.select_with_points(point_gdf)

This way, it is easily possible to sample a VoxelModel at point locations using GeoST Header or Collection objects by accessing their “gdf” attributes.

Using a Header object: >>> selected = voxelmodel.select_with_points(Header.gdf)

Using a Collection object: >>> selected = voxelmodel.select_with_points(Collection.header.gdf)