[GRASS-dev] [GRASS GIS] #2136: Create standard options for map or file base name (prefix)
GRASS GIS
trac at osgeo.org
Mon Jun 23 00:51:27 PDT 2014
#2136: Create standard options for map or file base name (prefix)
-----------------------------------------+----------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Parser | Version: svn-releasebranch64
Keywords: base name, prefix, basename | Platform: All
Cpu: All |
-----------------------------------------+----------------------------------
Comment(by zarch):
Replying to [comment:2 wenzeslaus]:
> Moreover, documentation to the standard option would
> define if underscore, dot or nothing is used to separate
> basename/prefix from the suffix/result name. So, user
> would know what to expect and programmer what to implement.
What do you think if we use two underscore (__) to join the basename with
the rest?
basename__01, basename__02, etc.
{{{
#!python
>>> import re
>>> m = re.match("^(?P<name>[a-zA-Z0-9]+)__(?P<id>\w+)$", "horizon__000")
>>> m.groups()
('horizon', '000')
>>> m.groupdict()
{'id': '000', 'name': 'pippo'}
>>> m = re.match("^(?P<name>[a-zA-Z0-9]+)__(?P<id>\w+)$", "tile__000_001")
>>> m.groups()
('tile', '000_001')
>>> m.groupdict()
{'name': 'tile', 'id': '000_001'}
}}}
So maybe in the future the GUI would be able to group maps following the
rule "basename__*" and visualize them in the wxGUI Animation or something
else...
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2136#comment:4>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list