MeshKernel
Public Types | Public Member Functions | Public Attributes | List of all members
meshkernel::LandBoundaries Class Reference

A class describing land boundaries. These are used to visualise the land-water interface. More...

#include <LandBoundaries.hpp>

Public Types

enum  ProjectToLandBoundaryOption {
  DoNotProjectToLandBoundary = 0, ToOriginalNetBoundary = 1, OuterMeshBoundaryToLandBoundary = 2, InnerAndOuterMeshBoundaryToLandBoundary = 3,
  WholeMesh = 4
}
 Enumerator describing the options how to project to the land boundary.
 

Public Member Functions

 LandBoundaries ()=default
 Default constructor.
 
 LandBoundaries (const std::vector< Point > &landBoundary, Mesh2D &mesh, const Polygons &polygons)
 Default constructor. More...
 
void Administrate ()
 The portion of the boundary segments close enough to the mesh boundary are flagged (admin_landboundary_segments) More...
 
void FindNearestMeshBoundary (ProjectToLandBoundaryOption projectToLandBoundaryOption)
 Find the mesh boundary line closest to the land boundary (find_nearest_meshline). More...
 
std::unique_ptr< UndoAction > SnapMeshToLandBoundaries () const
 Snap the mesh nodes to land boundaries (snap_to_landboundary)
 
auto GetNumNodes () const
 Gets the number of land boundary nodes. More...
 

Public Attributes

std::vector< UIntm_meshNodesLandBoundarySegments
 Mesh nodes to land boundary mapping (lanseg_map)
 

Detailed Description

A class describing land boundaries. These are used to visualise the land-water interface.

The main responsibility of this class is to store the land boundary polygons, categorize them based on their proximity to a mesh and provide the functionality to assign each mesh node to the appropriate land boundary polyline.

Constructor & Destructor Documentation

◆ LandBoundaries()

meshkernel::LandBoundaries::LandBoundaries ( const std::vector< Point > &  landBoundary,
Mesh2D mesh,
const Polygons polygons 
)

Default constructor.

Parameters
[in]landBoundaryA vector of points defining the land boundary.
[in]meshThe current 2d mesh.
[in]polygonsA polygon for selecting part of the land boundaries.

Member Function Documentation

◆ Administrate()

void meshkernel::LandBoundaries::Administrate ( )

The portion of the boundary segments close enough to the mesh boundary are flagged (admin_landboundary_segments)

This method uses a Point vector member variable and identifies the start-end points of each land boundary polyline with the requirement that all polyline nodes are close enough to the mesh boundary and are inside the polygon.

Land boundary segmentation

◆ FindNearestMeshBoundary()

void meshkernel::LandBoundaries::FindNearestMeshBoundary ( ProjectToLandBoundaryOption  projectToLandBoundaryOption)

Find the mesh boundary line closest to the land boundary (find_nearest_meshline).

Parameters
[in]projectToLandBoundaryOptionThe option describing the projection to the land boundary.

◆ GetNumNodes()

auto meshkernel::LandBoundaries::GetNumNodes ( ) const
inline

Gets the number of land boundary nodes.

Returns
The number of land boundary nodes.

The documentation for this class was generated from the following file: