gemgis.vector.extract_orientations_from_map#

gemgis.vector.extract_orientations_from_map(gdf: geopandas.geodataframe.GeoDataFrame, dz: str = 'dZ') geopandas.geodataframe.GeoDataFrame#

Calculating orientations from LineStrings

Parameters
  • gdf (gpd.geodataframe.GeoDataFrame) – GeoDataFrame containing the orientation LineStrings

  • dz (str) – Name of the height difference column, e.g. dz='dZ'

Returns

gdf – GeoDataFrame containing the orientation values

Return type

gpd.geodataframe.GeoDataFrame

New in version 1.0.x.

Example

>>> # Loading Libraries and creating LineString
>>> import gemgis as gg
>>> from shapely.geometry import LineString
>>> import geopandas as gpd
>>> linestring1 = LineString([(0, 0), (20, -20)])
>>> linestring1.wkt
'LINESTRING (0 0, 20 -20)'
>>> # Creating second LineString
>>> linestring2 = LineString([(0, 0), (20, -10)])
>>> linestring2.wkt
'LINESTRING (0 0, 20 -10)'
>>> # Creating GeoDataFrame from LineStrings
>>> gdf = gpd.GeoDataFrame(geometry=[linestring1, linestring2])
>>> gdf['dZ'] = [100, 200]
>>> gdf
    geometry                            dz
0   LINESTRING (0.0 0.0, 20.0 -20.0)    100
1   LINESTRING (0.0 0.0, 20.0 -10.0)    200
>>> # Extracting orientations from map
>>> orientations = gg.vector.extract_orientations_from_map(gdf=gdf)
>>> orientations
    geometry            azimuth dip     X       Y       polarity
0   POINT (10.0 -10.0)  135.00  74.21   10.00   -10.00  1
1   POINT (10.0 -5.0)   116.57  83.62   10.00   -5.00   1

See also

calculate_azimuth

Calculating the azimuth for orientations on a map

create_linestring_from_points

Create LineString from points

create_linestring_gdf

Create GeoDataFrame with LineStrings from points

calculate_distance_linestrings

Calculating the distance between LineStrings

calculate_orientations_from_strike_lines

Calculating the orientations from strike lines