[GRASS5] Re: [bug #3826] (grass) two r.resamp.rst issues

Hamish hamish_nospam at yahoo.com
Sun Nov 13 18:09:12 EST 2005


> this bug's URL: http://intevation.de/rt/webrt?serial_num=3826
> ---------------------------------------------------------------------
> Subject: two r.resamp.rst issues
> 
> If you run r.resamp.rst at a resolution other that that of the input
> map, the output elev map is not created at the specified ew_res= and
> ns_res= resolution.
> A warning is given that you are doing so, but it doesn't mention why
> that might be bad. Interestingly the output map is actually written at
> the target resolution, but it contains the data resolution from the
> original map. (target was 50m, original was 100m)
> 
> If the input map is in another mapset (map at othermapset) then it gives
> an error that the input map can't be found. (happens when it tries to
> copy the color table I think) and exits with an error. (but processing
> is already done so output map is ok, just without a colortable)
> 
> 
> Hamish
> 
> 
> ps - I've tidied up the module's code and strings a bit in CVS, so cvs
> update before fixing...


Michael wrote:
> We've run into that here too. One of my RA's did a test of
> interpolating to a higher resolution using r.resamp.rst and the more
> complicated procedure of generating a large number of points from a
> raster map, and then interpolating from the points to a higher
> resolution.
> 
> r.resamp.rst is faster and more straightforward. BUT (a VERY big but),
> it behaves exactly as you describe. It simply turns out a map that
> looks just like the original map is subdivided into more grid cells,
> without any interpolation. This makes the module essentially useless.

Jaro wrote:
> It's not useless because if you run the module at a resolution equal
> to  the input raster map, the result is OK.
> The warning message should be replaced by a fatal error that exits the
> command.

Ok, done in 6.1-cvs, but would a better long term fix be to address why
the region switching code alreadyt in the module doesn't take care of
this for you automatically? Maybe the first thing the module needs to do
is switch to the input map's resolution (internally). Perhaps that is
not in line with the way most other GRASS raster modules work so should
be avoided?


The colortable error in IL_resample_output_2d() is still there.
(G_open...() needs to be one of the other G__open..() fns so the mapset
isn't stripped off at the "map exists" check, or the mapset that is
returned from the G_open..() function needs to be passed to IL_resam..()
?? I may have my fn names wrong, but the fix should be along those
lines.)


Hamish




More information about the grass-dev mailing list