Opened 15 years ago

Closed 11 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 by hamish, 15 years ago

Description: modified (diff)

comment:2 by hamish, 15 years ago

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

Hamish

in reply to:  description comment:3 by glynn, 15 years ago

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 by hamish, 15 years ago

  • 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 by hamish, 11 years ago

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.