Opened 11 years ago

Closed 7 years ago

#618 closed enhancement (fixed)

rfe: r.md5sum or equivalent

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 6.5.0
Component: Raster Version: svn-trunk
Keywords: testsuite, r.univar, md5sum Cc:
CPU: All Platform: All

Description (last modified by hamish)

Hi,

It would be helpful for comparing maps if there was some r.md5sum module or equivalent.

Actually I think a new flag for r.univar might be all that is needed.

presently this is what we got, and it's a bit less than optimal, especially for quickly running through a test suite:

r.mapcalc diff=map1-map2
r.univar diff
g.remove diff

thanks, Hamish

Change History (5)

comment:1 Changed 11 years ago by hamish

Description: modified (diff)

comment:2 Changed 11 years ago by hamish

see also grass/trunk/testsuite/raster/raster_md5test.sh for a r.out.ascii | md5sum solution

Hamish

comment:3 in reply to:  description Changed 11 years ago by glynn

Replying to hamish:

It would be helpful for comparing maps if there was some r.md5sum module or equivalent.

What exactly should this module compute? MD5 and other hash algorithms operate on a sequence of bytes, so you need to decide exactly how to serialise the data.

Should it operate upon the raw map data, or after reclassing, MASKing, and clipping and resampling according to the current region? How are nulls represented? Are numeric values serialised big-endian, little-endian, or in the host's native format? Or as decimal values in ASCII?

comment:4 Changed 11 years ago by hamish

  • for this task we care about data not how it is stored, so probably after endian translation
  • not sure if the differences in how FPs are stored makes this an impossiblity. (false negatives)
  • probably for this task we care about entire map not subregion(?) so not clipped to current region. or maybe you want to check that a subregion is the same (eg r.patch result..)

?, H

comment:5 Changed 7 years ago by hamish

Resolution: fixed
Status: newclosed

done as g.md5sum addon, see source:grass-addons/grass6/general/g.md5sum

Note: See TracTickets for help on using tickets.