[GRASS-dev] [grass-code R][415] r.contour needs work to reduce messy output

code R item #415, was opened at 2007-05-30 14:44
Status: Open
Priority: 3
Submitted By: William Kyngesburye (kyngchaos)
Assigned to: Nobody (None)
Summary: r.contour needs work to reduce messy output
Issue status: None
GRASS component: raster
Operating system: None
Operating system version:

Initial Comment:
I figure it's a know issue with the algorithm, so I'm doing this as a feature request. According to this note in the r.contour docs:

"If a contour level exactly matches a category value in the raster map, the contour line may backtrack on itself, causing illegal arcs to be produced in the output GRASS vector map."

I find this more the rule than the exception, so contour vectors end up with many duplicated contour lines, which is a mess to clean up. I thought v.clean with a break followed by a rmdupl might break lines at the ends, then remove the duplicate, but the "backtracking" is not an exact duplicate of the vertices and may zigzag across itself, creating many tiny short segments (another mess to clean up, though I suppose the snap tool could remedy this). And if it was exact, I wonder if break would break at each vertex anyways.

So, can something be done to fix this problem? Maybe a different contour algorithm, or tune the existing one?

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=188&aid=415&group_id=21