pyorc.CrossSection.get_bbox_dry_wet#
- CrossSection.get_bbox_dry_wet(h: float, camera: bool = False, swap_y_coords: bool = False, dry: bool = False, expand_exterior: bool = True, exterior_split: int = 100)[source]#
Get wet (or dry) part of bounding box, by extending the water line perpendicular to the cross section.
- Parameters:
h (float) – water level [m]
camera (bool, optional) – If set, return 2D projected polygon, by default False. Note that any plotting does not provide shading or ray tracing hence plotting a 2D polygon is not recommended.
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)
dry (bool, optional) – If set, the dry parts will be returned, by default False, thus returning wet.
expand_exterior (bool, optional) – Set to True to expand the corner points to more points. This is particularly useful for plotting purposes.
exterior_split (int, optional) – Amount of subline segments to split bounding box in
- Returns:
multipolygon representing the dry or wet part of the bounding box of the camera config (2d if camera=True, 3d if camera=False).
- Return type:
shapely.geometry.MultiPolygon
See also
CrossSection.plot_bbox_dry_wetPlot the dry and wet parts of the bounding box resulting from this method.