wachub / jaitools

Automatically exported from code.google.com/p/jaitools
0 stars 0 forks source link

Contour algorith may generate various odd isolines #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've been fighting this war already 10 years ago while improving r.contour: the 
contouring algorithm can generate odd isolated segments that backtrack on 
themselves, cul the sacs and other funny odd isolines (see the attached 
picture).

I probably have to go and see what changes I made back then, but for sure one 
of them was to add a parameter to specify a minimum number of points for the 
single isoline element: after the line merges we probably get a 
multilinestring, we should process each component and remove any that does not 
pass the threshold.

Ah, for reference:
http://grass.fbk.eu/gdp/html_grass64/r.contour.html

Original issue reported on code.google.com by michael.bedward@gmail.com on 15 Jun 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Ah, here is a discussion from the mail archives:
http://osgeo-org.1803224.n2.nabble.com/GRASS5-r-contour-update-td1906670.html

So interesting, another cure for the above could be to add just a little bit of 
difference (enough to make it different) to points that match exactly a contour 
line level.

Original comment by michael.bedward@gmail.com on 15 Jun 2011 at 12:09

GoogleCodeExporter commented 9 years ago
> I've been fighting this war already 10 years ago while improving r.contour

How time flies when you're having fun :)

That list post reminded me that the same issue and solution is mentioned on 
Paul Bourke's page about the CONREC algorithm: 
http://local.wasp.uwa.edu.au/~pbourke/papers/conrec/ (see the note just above 
the heading "Contouring Facet Based Models".

Original comment by michael.bedward@gmail.com on 15 Jun 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Mumble, I was thinking about this one. Instead of adding a little delta to the 
data we could probably just remap the cases?
For example, instead of saying we are in the case where two are below and one 
is at the same level as the contour line, we could say it's actually two below 
and one above, and so on. That would generate line segments with two equal 
points, a case that is already taken care of later if I'm not mistaken.

Original comment by michael.bedward@gmail.com on 15 Jun 2011 at 12:09

GoogleCodeExporter commented 9 years ago
Moved issue to GitHub issue tracker
https://github.com/mbedward/jaitools/issues

Original comment by michael.bedward@gmail.com on 21 Jan 2013 at 3:06