Tool from the mesh2D toolbox to calculate unstructured grid connectivity (including finding edge nodes, which is useful for plotting the coastline)
Calculate the centroid of a polygon (assuming clockwise points)