What are the best ways to determine bays and straits programatically in a procedurally generated map?

I’ve got a procedurally generated map using Voronoi cells, with a defined sea level and a believable height map.


So far, I’ve been successful in labelling certain geographic features: land, ocean, lakes, rivers, estuaries, confluences, mountains, and biomes. Biomes include tundra, boreal forest, grassland, and temperate forest. There are also a couple other biomes there but for my purposes they aren’t important right now.

I’d like to label bays, and straits next, but I’m at a loss on how to do this properly. A bay is a recessed, coastal body of water that directly connects to the ocean.

A strait is a naturally formed, narrow waterway that connects two parts of the ocean. Basically, where two pieces of land almost touch and there’s ocean on both sides. Also called a “channel”.

For determining features, I can loop through any feature by type like this:

for each (var feature:Object in geography.getFeaturesByType(Geography.LAND))   // loop through lands   for each (var cell:Cell in feature.cells)   // loop through cells     for each (var neighbor:Cell in cell.neighbors)     // loop through a cell's features