I have been trying for some time to find a way to eliminate the exaggerated curves in a contour curve that I usually obtain from line 0. The idea is to obtain a polyline that is more or less faithful to the coast line but that ignores specific irregularities such as, for example, the presence of a breakwater or a dike. Although it is not an excessively complex job, this process is integrated into a tool that I am building and therefore I would like to automate it. For example, if I have the following polyline fragment:
I would like to get roughly the following output:
So far I've gotten away with simplifying the line and then smoothing it out:
arcpy.SimplifyLine_cartography(in_polyline,simp_polyline,"EFFECTIVE_AREA",45,collapsed_point_option='NO_KEEP')
arcpy.SmoothLine_cartography(sim_polyline,smooth_polyline,"PAEK",45)
However, I do not always get the desired output and it depends a lot on the area in which I am. Therefore I have decided to consult you, since I imagine that more than one will have run into a similar problem. Thank you all.