gemgis.vector.calculate_orientations_from_strike_lines
gemgis.vector.calculate_orientations_from_strike_lines#
- gemgis.vector.calculate_orientations_from_strike_lines(gdf: geopandas.geodataframe.GeoDataFrame) geopandas.geodataframe.GeoDataFrame #
Calculating orientations based on LineStrings representing strike lines
- Parameters
gdf (gpd.geodataframe.GeoDataFrame) – GeoDataFrame containing LineStrings representing strike lines
- Returns
gdf_orient – GeoDataFrame containing the location of orientation measurements and their associated orientation values
- Return type
gpd.geodataframe.GeoDataFrame
New in version 1.0.x.
Changed in version 1.1.7.
Fixing indexing issue.
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)'
>>> # Create second LineString >>> linestring2 = LineString([(0, 10), (20, 30)]) >>> linestring2.wkt 'LINESTRING (0 10, 20 30)'
>>> # Creating GeoDataFrame from LineStrings >>> gdf = gpd.GeoDataFrame(geometry=[linestring1, linestring2]) >>> gdf['Z'] = [100,200] >>> gdf['id'] = [1,2] >>> gdf geometry Z id 0 LINESTRING (0.0 0.0, 20.0 20.0) 100 1 1 LINESTRING (0.0 10.0, 20.0 30.0) 200 2
>>> # Calculating orientations strike lines >>> orientations = gg.vector.calculate_orientations_from_strike_lines(gdf=gdf) >>> orientations dip azimuth Z geometry polarity X Y 0 85.96 135.00 150.00 POINT (10.0 15.0) 1.00 10.00 15.00
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
extract_orientations_from_map
Extracting orientations from a map
calculate_distance_linestrings
Calculating the distance between two LineStrings