In raw beach profile data, the end of some cross-sections can be padded with zero values. This probably shouldn't be the case - if we wanted to assume a zero elevation at these locations, we should do that in whatever calculation, not in the raw data.
The added function will detect these padded zero values and replace them with nans.
This is so it can be changed easily. In future, expect that this will go to a proper place on the WRL coastal drive, rather than a temporary working directory.
Added two extra considerations:
1) Need to distinguish between positive and negative values when calculating distance to starting point, hence the seaward and landward intersecting lines.
2) Need to consider only checking lines with the same beach property, otherwise it is going to take too long when we have all the beaches
This function takes the profiles.mat file and uses the spiral log transformation tool to calculate the orientation of each beach profile cross section. Orientations are needed to relate dune toes and crests (from shape files) to each of the profiles.
Note there are some beaches which don't have the correct parameters in the log-spiral tool folder, so these should be followed up with Mitch.