new code for calculating wetland geometry