[GRASS-dev] [GRASS GIS] #3791: r.stats.zonal with -r option

GRASS GIS trac at osgeo.org
Tue Mar 12 10:24:36 PDT 2019


#3791: r.stats.zonal with -r option
--------------------------+-------------------------
  Reporter:  frankie      |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.4.5
 Component:  Raster       |    Version:  7.2.0
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-------------------------

Comment (by mmetz):

 Replying to [ticket:3791 frankie]:
 > When using a -r option to produce a reclassified output raster as
 result, the r.reclass call at the end of the program could be *extremely*
 inefficient. I tried with large maps  many thousands of cats (derived by
 r.clump) and I got very long running times.

 That's why the default is not to create reclass maps.
 >
 > Creating the rules files instead is very fast, even in those conditions.
 In many cases, it would be sufficient giving it as an (optional) output
 file and the r.reclass step could be avoided/postponed. BTW, undestanding
 why the r.reclass module could take ages would be nice, too.

 The reason is that the underlying library function to assign category
 labels `Rast_set_cat()` becomes terribly slow with an increasing number of
 categories. The relevant parts of the raster lib would need to be
 rewritten using a dynamic binary balanced search tree for a speed-up of
 raster category handling.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3791#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list