gemgis.vector.calculate_strike_direction_straight_linestring
gemgis.vector.calculate_strike_direction_straight_linestring#
- gemgis.vector.calculate_strike_direction_straight_linestring(linestring: shapely.geometry.linestring.LineString) float #
Function to calculate the strike direction of a straight Shapely LineString. The strike will always be calculated from start to end point
- Parameters
linestring (shapely.geometry.linestring.LineString) – Shapely LineString representing the surface trace of a straight geological profile, e.g.
linestring = LineString([(0, 0), (10, 10), (20, 20)])
- Returns
angle – Strike angle calculated from start to end point for a straight Shapely LineString
- Return type
float
New in version 1.0.x.
Example
>>> # Loading Libraries and creating LineString >>> import gemgis as gg >>> from shapely.geometry import LineString >>> linestring = LineString([(0, 0), (20, 20)]) >>> linestring.wkt 'LINESTRING (0 0, 20 20)'
>>> # Calculating the strike angle of the LineString >>> angle = gg.vector.calculate_strike_direction_straight_linestring(linestring=linestring) >>> angle 45.0
See also
calculate_angle
Calculating the angle of a LineString
calculate_strike_direction_bent_linestring
Calculating the strike direction of a bent LineString
calculate_dipping_angle_linestring
Calculate the dipping angle of a LineString
calculate_dipping_angles_linestrings
Calculate the dipping angles of LineStrings
Note
The LineString must only consist of two points (start and end point)