Opened 10 years ago

Closed 10 years ago

#2455 closed defect (fixed)

r.unpack/v.unpack: add sanity check for auto-detecting if pack file contains raster or vector data

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Raster Version: svn-releasebranch70
Keywords: r.unpack, v.unpack Cc:
CPU: Unspecified Platform: All

Description

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))

Change History (1)

comment:1 by lucadelu, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in r62310 and backported to GRASS 7 r62311

Note: See TracTickets for help on using tickets.