gemgis.vector.calculate_coordinates_for_point_on_cross_section#

gemgis.vector.calculate_coordinates_for_point_on_cross_section(linestring: shapely.geometry.linestring.LineString, point: Union[shapely.geometry.point.Point, Tuple[float, float]])#

Calculating the coordinates for one point digitized on a cross section provided as Shapely LineString

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

  • point (Union[shapely.geometry.point.Point, Tuple[float, float]]) – Shapely object or tuple of X and Y coordinates digitized on a cross section e.g. point = Point(5, 0)

Returns

point – Shapely Point with real world X and Y coordinates extracted from cross section LineString on Map

Return type

shapely.geometry.point.Point

New in version 1.0.x.

Example

>>> # Loading Libraries and creating LineString
>>> import gemgis as gg
>>> from shapely.geometry import Point, LineString
>>> linestring = LineString([(0, 0), (20, -20)])
>>> linestring.wkt
'LINESTRING (0 0, 20 -20)'
>>> # Creating Point
>>> point = Point(5, 0)
>>> point.wkt
'POINT (5 0)'
>>> # Calculating real world coordinates for point on cross section
>>> point_xy = gg.vector.calculate_coordinates_for_point_on_cross_section(linestring=linestring, point=point)
>>> point_xy.wkt
'POINT (3.535533905932737 -3.535533905932737)'

See also

calculate_coordinates_for_linestring_on_cross_sections

Calculating the coordinates for a LineString on a cross section

calculate_coordinates_for_linestrings_on_cross_sections

Calculating the coordinates for LineStrings on cross sections

extract_interfaces_coordinates_from_cross_section

Extracting the coordinates of interfaces from cross sections

extract_xyz_from_cross_sections

Extracting the X, Y, and Z coordinates of interfaces from cross sections