I want to simplify polygons that come from a raster analysis. In order to avoid overlap and gaps, I first convert my polygons to lines. The problem is that all algorithm are then keeping the two end points, which are not necessarily at the best position. The image below illustrates my problem (it is difficult to explain by words). The "manual" case is the kind of result that I expect (of course I cannot do this manually for all features because I have far to many of them):
With Wang's algorithm, I have some bends around the node and it is away from the straight line that I would like
With DP algorithm, I have the straight lines but they are shifted compared with the line that I would like.
My priority is to keep a good positional accuracy (minimizing the distance from the "middle" of the line). I would like a "T"(though not necessarily right angles) like I have with DP algorithm, but at a location that would make the lines close to the "middle" of the original lines.
I prefer solutions in QGIS 2.0 or ArcGIS 10.1 (advanced) but the implementation is a bonus for me. My question is about an algorithm that would help me find the best location of the polygon nodes for "non shifted straight lines".