Shore detection for water surfaces

There has to be a better way.