gemgis.vector.calculate_orientation_from_cross_section#

gemgis.vector.calculate_orientation_from_cross_section(profile_linestring: shapely.geometry.linestring.LineString, orientation_linestring: shapely.geometry.linestring.LineString) list#

Calculating the orientation for one LineString on one cross sections

Parameters
  • profile_linestring (shapely.geometry.linestring.LineString) – Shapely LineString containing the trace of a cross section on a map, e.g. profile_linestring = LineString([(0, 0), (20, 20)])

  • orientation_linestring (shapely.geometry.linestring.LineString) – Shapely LineString representing an orientation measurement on the cross section e.g. orientation_linestring = LineString([(2, -2), (5, -5)])

Returns

orientation – List containing a Shapely Point with X and Y coordinates, the Z value, dip, azimuth and polarity values

Return type

list

New in version 1.0.x.

Example

>>> # Loading Libraries and creating LineString
>>> import gemgis as gg
>>> from shapely.geometry import LineString
>>> profile_linestring = LineString([(0, 0), (20, 20)])
>>> profile_linestring.wkt
'LINESTRING (0 0, 20 20)'
>>> # Creating second LineString
>>> orientation_linestring = LineString([(2, -2), (5, -5)])
>>> orientation_linestring.wkt
'LINESTRING (2 -2, 5 -5)'
>>> # Calculating orientation orientation from cross section
>>> orientations = gg.vector.calculate_orientation_from_cross_section(profile_linestring=profile_linestring, orientation_linestring=orientation_linestring)
>>> orientations
[<shapely.geometry.point.Point at 0x231e79a5370>, -3.5, 45.0, 45.0, 1]
>>> # Inspecting the Point object of the list
>>> orientations[0].wkt
'POINT (2.474873734152916 2.474873734152916)'

See also

calculate_orientation_from_bent_cross_section

Calculating the orientation of a LineString on a bent cross section

calculate_orientations_from_cross_section

Calculating orientations for LineStrings on a cross section

extract_orientations_from_cross_sections

Calculating the orientations for LineStrings on cross sections