Hi again, > On 26/01/12 10:29, Johannes Radinger wrote: > > Hello, > > > > as it seems that there was something wrong with my post yesterday I send > it > > again (if everything was ok already yesterday, sorry for double > posting): > > > > > > For a certain application I need to transform a river from the > > raster format into the vector format and vice versa. > > > > I'd like to know how good does it work to tranform a line > > feature from vector into raster and back again into > > a vector? Is there any "stable" line which doesn't > > change anymore after x-times transforming back and > > forwards? I haven't had time to test it but I thought about: > > > > v.to.rast > > r.thin > > r.to.vect > > > > this should result in a "stable" line or does it > > need several iterations? > > I think the best way is to try, but some remarks here: > > - I don't think that r.thin avec v.to.rast will change anything. > v.to.rast should already limit the raster version of the line to a > widthof one pixel. > > - The main issue here will probably be the resolution. > > - To test, just try running v.to.rast/r.to.vect several times in a loop > and then compare the end result to the original river... >
I tried it to run v.to.rast/r.thin/r.to.vect... I am not sure but it seems that already the first run creates a "stable" vector as the the vector is just the connection of the midpoints of the cells (so only a limited number of vector directions: horizontal, vertical, diagonal). So far as I think this must be a stable vector.... The r.thin process is an important step (as recommended also in the manual) and should not be skipped at all! And so far as I think now it isn't an issue of the resolution as it is always the procedure of reconnecting the cell-midpoints... Maybe I just see something wrong..anyway i thought about testing the stability in a loop, but I got stucked in the correct map calc operation. What is the correct (boolean) operator to get: 1) NULL + NULL = NULL 2) not NULL + not NULL = NULL 3) not NULL + NULL = 1 4) NULL + not NULL = 1 this is just to find out if the two rasters are congruent (of the same shape). Maybe anyone has some suggestions... best regards, Johannes > Moritz > _______________________________________________ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://www.gmx.net/de/go/freephone/ _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user