pyorc.CrossSection.get_planar_surface#
- CrossSection.get_planar_surface(h: float, length: float = 2.0, offset: float = 0.0, camera: bool = False, swap_y_coords=False) Polygon [source]#
Retrieve a planar water surface for a given water level, as a geometry.Polygon.
Returns a 2D Polygon if camera is True, 3D if False
- Parameters:
h (float) – water level [m]
length (float, optional) – length of the waterline [m], by default 2.0
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 polygon, 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:
rectangular horizontal polygon representing the planar water surface (2d if camera=True, 3d if camera=False).
- Return type:
shapely.geometry.Polygon
See also
CrossSection.plot_planar_surface
Plot the planar surface resulting from this method.