gemgis.vector.calculate_orientations_from_cross_section
gemgis.vector.calculate_orientations_from_cross_section#
- gemgis.vector.calculate_orientations_from_cross_section(profile_linestring: shapely.geometry.linestring.LineString, orientation_linestrings: Union[geopandas.geodataframe.GeoDataFrame, List[shapely.geometry.linestring.LineString]], extract_coordinates: bool = True) geopandas.geodataframe.GeoDataFrame #
Calculating orientations from a cross sections using multiple LineStrings
- 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), (5, 10), (20, 20)])
orientations_linestrings (Union[gpd.geodataframe.GeoDataFrame, List[shapely.geometry.linestring.LineString]]) – GeoDataFrame or list containing multiple orientation LineStrings
extract_coordinates (bool) – Variable to extract the X and Y coordinates from point objects. Options include:
True
orFalse
, default set toTrue
- Returns
gdf – GeoDataFrame containing the Shapely Points with X, Y coordinates, the Z value, dips, azimuths and polarities
- 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 >>> profile_linestring = LineString([(0, 0), (5, 10), (20, 20)]) >>> profile_linestring.wkt 'LINESTRING (0 0, 5 10, 20 20)'
>>> # Creating second LineString >>> orientation_linestring = LineString([(2, -2), (5, -5)]) >>> orientation_linestring.wkt 'LINESTRING (2 -2, 5 -5)'
>>> # Creating List of LineStrings >>> orientations_list = [orientation_linestring, orientation_linestring]
>>> # Calculating orientations from cross sections >>> orientations = gg.vector.calculate_orientations_from_cross_section(profile_linestring=profile_linestring, orientation_linestrings=orientations_list) >>> orientations X Y Z dip azimuth polarity geometry 0 1.57 3.13 -3.50 45.00 26.57 1.00 POINT (1.56525 3.13050) 1 1.57 3.13 -3.50 45.00 26.57 1.00 POINT (1.56525 3.13050)
See also
calculate_orientation_from_cross_section
Calculating the orientation of a LineString on a cross section
calculate_orientation_from_bent_cross_section
Calculating orientations of a LineStrings on a bent cross section
extract_orientations_from_cross_sections
Calculating the orientations for LineStrings on cross sections