I have a text file created with grdcontour that gives me a set of lines and polygons.
To reduce the number of points I used simplify there’s just so much it can do.
More specifically, within a polygon (or segment), I want to search for very close points and replace both by a mean position. (gmt spatial?)
Well, gmtselect lets selecting points that are with a search radius of given points. I’m not seeing, however, what would be a good strategy to select those knot points.
You are probably correct, but for the time being, I am looking at a pure GMT solution.
If the project gets more serious I’ll probably move to a C++ library that does exactly what I need…
What I try to do is to have the least amount of points to describe isocontours. The crux is cross-intersection. simplify doesn’t handle this kind of test but if I pre-process correctly the data with grdfilter I can somewhat get a satisfying result… apart from these remaining points within a polygon that are very close from each other but can’t be removed with simplify.
Sorry but your plot is not clear to me. It looks that some parts where hand drawn. Points are made by groups of points, etc. Like this I can’t see the limitation of the DP.