gemgis.utils.calculate_lines#

gemgis.utils.calculate_lines(gdf: Union[geopandas.geodataframe.GeoDataFrame, pandas.core.frame.DataFrame], increment: Union[float, int], xcol: str = 'X', ycol: str = 'Y', zcol: str = 'Z') geopandas.geodataframe.GeoDataFrame#

Function to interpolate strike lines

Parameters
  • gdf (Union[gpd.geodataframe.GeoDataFrame, pd.DataFrame]) – (Geo-)DataFrame containing existing strike lines

  • increment (Union[float, int]) – Increment between the strike lines, e.g. increment=50

  • xcol (str) – Name of X column, e.g. x='X'

  • ycol (str) – Name of X column, e.g. y='Y'

  • zcol (str) – Name of Z column, e.g. z='Z'

Returns

lines – GeoDataFrame with interpolated strike lines

Return type

gpd.geodataframe.GeoDataFrame

New in version 1.0.x.

Example

>>> import gemgis as gg
>>> import geopandas as gpd
>>> gdf = gpd.read_file(filename='lines5_strike.shp')
>>> gdf
    id  Z   formation   geometry
0   7   0   Coal1   LINESTRING (1642.839 2582.579, 2829.348 2205.937)
1   6   150 Coal1   LINESTRING (1705.332 1759.201, 2875.795 1406.768)
2   5   200 Coal1   LINESTRING (1017.766 1722.234, 2979.938 1137.003)
3   4   250 Coal1   LINESTRING (99.956 1763.424, 765.837 1620.705,...
4   3   200 Coal1   LINESTRING (1078.147 1313.501, 2963.048 752.760)
>>> gdf_interpolated = gg.utils.calculate_lines(gdf=gdf, increment=50)