| name | gemgis |
| description | Spatial data processing for geological modelling with GemPy. Use when Claude
needs to: (1) Prepare spatial data for GemPy models, (2) Extract interface
points from geological maps, (3) Process orientations/dip measurements,
(4) Sample DEMs along profiles or cross-sections, (5) Convert between GIS
formats and GemPy inputs, (6) Clip/transform vector/raster data for modeling,
(7) Create model extents from geospatial bounds.
|
| version | 1.0.0 |
| author | Geoscience Skills |
| license | MIT |
| tags | ["GIS","Geospatial","Data Preparation","DEM","Geological Modelling"] |
| dependencies | ["gemgis>=1.0.0","geopandas","rasterio"] |
| complements | ["gempy","loopstructural","pyvista"] |
| workflow_role | processing |
GemGIS - Geospatial Data for Geological Modelling
Quick Reference
import gemgis as gg
import geopandas as gpd
gdf = gpd.read_file('geology.shp')
interfaces = gg.vector.extract_xyz(gdf=gdf, dem='dem.tif')
extent = [x_min, x_max, y_min, y_max]
gdf_clipped = gg.vector.clip_by_extent(gdf=gdf, extent=extent)
Key Modules
| Module | Purpose |
|---|
gemgis.vector | Vector data processing, XYZ extraction |
gemgis.raster | Raster/DEM processing, sampling, interpolation |
gemgis.utils | Utility functions, extent management |
gemgis.postprocessing | Model postprocessing |
Essential Operations
Extract Interface Points
contacts = gpd.read_file('contacts.shp')
interfaces = gg.vector.extract_xyz(gdf=contacts, dem='dem.tif')
interfaces['formation'] = contacts['formation']
Extract Orientations
measurements = gpd.read_file('structural_measurements.shp')
orientations = gg.vector.extract_xyz(gdf=measurements, dem='dem.tif')
orientations['dip'] = measurements['dip']
orientations['azimuth'] = measurements['strike'] + 90
orientations['formation'] = measurements['formation']