#2455: r.unpack/v.unpack: add sanity check for auto-detecting if pack file
contains raster or vector data
--------------------------------+-------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: svn-releasebranch70
Keywords: r.unpack, v.unpack | Platform: All
Cpu: Unspecified |
--------------------------------+-------------------------------------------
Small issue for GRASS data transfer via "pack" format:
In case that a user doesn't use a self-explaining file name, it may not be
obvious if r.unpack or v.unpack has to be used. In case of running the
wrong command, an "ugly" error message appears rather than telling the
user to apply the other respective unpack command.
Solution: simply check for the presence of 'mapname/cell' or
'mapname/coor' and generate a user message if the wrong content was
detected.
Message suggestions:
{{{
#r.unpack
grass.fatal(_("This GRASS GIS pack file contains vector data. Use v.unpack
to unpack <%s>) % map_name))
#v.unpack
grass.fatal(_("This GRASS GIS pack file contains raster data. Use r.unpack
to unpack <%s>) % map_name))
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2455>
GRASS GIS <http://grass.osgeo.org>