[GRASS-dev] Re: [GRASS GIS] #1088: r.fillnulls: support other interpolation methods

GRASS GIS trac at osgeo.org
Fri Feb 17 03:19:59 EST 2012


#1088: r.fillnulls: support other interpolation methods
-------------------------+--------------------------------------------------
 Reporter:  kyngchaos    |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  6.4.3                    
Component:  Raster       |     Version:  svn-develbranch6         
 Keywords:  r.fillnulls  |    Platform:  All                      
      Cpu:  All          |  
-------------------------+--------------------------------------------------

Comment(by mmetz):

 Replying to [comment:26 glynn]:
 > Replying to [comment:24 mmetz]:
 > > Ok, r.buffer now (r50830) uses squared distance for metric=squared and
 regular distance in meters for metric=geodesic.
 >
 > I think that r.grow.distance needs this, right?
 >
 {{{
 > --- raster/r.grow.distance/main.c     (revision 50836)
 > +++ raster/r.grow.distance/main.c     (working copy)
 > @@ -208,8 +208,11 @@
 >      else
 >       G_fatal_error(_("Unknown metric: '%s'"), opt.met->answer);
 >
 > -    if (flag.m->answer)
 > +    if (flag.m->answer) {
 >       scale = G_database_units_to_meters_factor();
 > +     if (strcmp(opt.met->answer, "squared") == 0)
 > +         scale *= scale;
 > +    }
 >
 >      in_fd = Rast_open_old(in_name, "");
 >
 }}}

 Right. It worked in my test because map units were meters and scale thus
 1. Patch applied in r50841.

 Markus M

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1088#comment:28>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list