pyorc.CrossSection.get_csl_pol#
- CrossSection.get_csl_pol(h: Optional[float] = None, l: Optional[float] = None, length: float = 0.5, padding: Tuple[float, float] = (-0.5, 0.5), offset: float = 0.0, camera: bool = False, swap_y_coords: bool = False) List[Polygon] [source]#
Get horizontal polygon from cross-section land-line towards water or towards land.
Returns a 2D Polygon if camera is True, 3D if False
- Parameters:
h (float) – water level [m]
l (float) – coordinate of distance from left to right bank, including height [m], if provided, h must not be provided.
length (float, optional) – length of the waterline [m], by default 0.5
padding (Tuple[float, float], optional) – amount of distance [m] to extend the polygon beyond the waterline, by default (-0.5, 0.5)
offset (float, optional) – perpendicular offset of the waterline from the cross-section [m], by default 0.0
camera (bool, optional) – If set, return 2D projected polygons, by default False.
swap_y_coords (bool, optional) – if set, all y-coordinates are swapped so that they fit on a flipped version of the image. This is useful in case you plot on ascending y-coordinate axis background images (default: False)
- Returns:
List of lines perpendicular to cross section orientation, can be only one or two lines.
- Return type:
List[shapely.geometry.Polygon]