gemgis.utils.calculate_number_of_isopoints
gemgis.utils.calculate_number_of_isopoints#
- gemgis.utils.calculate_number_of_isopoints(gdf: Union[geopandas.geodataframe.GeoDataFrame, pandas.core.frame.DataFrame], increment: Union[float, int], zcol: str = 'Z') int #
Creating the number of isopoints to further 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
zcol (string) – Name of z column, e.g.
z='Z'
, default is'Z'
- Returns
number – Number of isopoints
- Return type
int
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)
>>> number = gg.utils.calculate_number_of_isopoints(gdf=gdf, increment=50) >>> number 2
See also
get_nearest_neighbor
Getting the nearest neighbor to a point