g.compare.md5
Checks if two GRASS GIS maps are identical.
g.compare.md5 [-gct] ainput=name binput=string type=datatype [,datatype,...] [--verbose] [--quiet] [--qq] [--ui]
Example:
g.compare.md5 ainput=name binput=string type=raster
grass.script.parse_command("g.compare.md5", ainput, binput, type="raster", flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.parse_command("g.compare.md5", ainput="name", binput="string", type="raster")
Parameters
ainput=name [required]
Name of first map to check
binput=string [required]
Name of second map to check
type=datatype [,datatype,...] [required]
Data type(s)
Allowed values: raster, vector
Default: raster
-g
Return output in shell script style (0 fail, 1 success)
-c
Does not consider the color table for raster
-t
Does not consider the topology for vector
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
ainput : str, required
Name of first map to check
Used as: input, file, name
binput : str, required
Name of second map to check
Used as: input, file
type : str | list[str], required
Data type(s)
Used as: datatype
Allowed values: raster, vector
Default: raster
flags : str, optional
Allowed values: g, c, t
g
Return output in shell script style (0 fail, 1 success)
c
Does not consider the color table for raster
t
Does not consider the topology for vector
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
g.compare.md5 is a module that checks if two GRASS maps are identical. It uses the MD5 cryptographic hash function. For vector map layers it does not check if the attribute table(s) are identical, too.
EXAMPLE
North Carolina example, with elevation map:
# copy a raster map
g.copy raster=elevation,dem
# now check and return TRUE
g.compare.md5 ainput=elevation binput=dem
# now change the color table
r.colors map=dem color=srtm
# check again and it should return FALSE
g.compare.md5 ainput=elevation binput=dem
# but when adding the -c flag (ignore color table), TRUE is returned
g.compare.md5 -c ainput=elevation binput=dem
AUTHOR
Luca Delucchi, Fondazione Edmund Mach, Research and Innovation Centre, Department of Biodiversity and Molecular Ecology, GIS and Remote Sensing Unit, Italy
SOURCE CODE
Available at: g.compare.md5 source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819