[GRASS-dev] [GRASS GIS] #2136: Create standard options for map or file base name (prefix)

GRASS GIS trac at osgeo.org
Wed Jun 25 23:02:51 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:16 wenzeslaus]:
 > Replying to [comment:14 zarch]:
 > > Just for the record this are ASCII characters » (175), ■ (254)...
 >
 >
 > I wish this to be true but it is not. They might be part of some
 > [http://en.wikipedia.org/wiki/Extended_ASCII extended ASCII]; I can
 > see them at [http://www.asciitable.com/ asciitable] but not at
 > [http://www.ascii-code.com/ ascii-code]. More importantly, they
 > are not part of widely supported (and thus safe)
 > [http://en.wikipedia.org/wiki/ASCII ASCII] which has only
 > 128 printable and non-prinatble characters (to fit into 7 bits).
 > ASCII corresponds to first 128 characters of
 > [http://en.wikipedia.org/wiki/UTF-8 UTF-8].

 yes, you are right, thanks for clarification.


 Replying to [comment:14 zarch]:
 > Replying to [comment:16 wenzeslaus]:
 > > Perhaps one underscore is enough.
 >
 > I don't think so, a single underscore is too common,
 > it is too prone to casual errors.

 For example, we decide to not write the dot in float number
 (basename_000.05) as in raster maps generated by r.horizon using a single
 underscore (basename_000_05), but in this way is not clear which one is
 the basename which the id.

 If in the future we will have to generate raster maps with two floating
 points (basename_000.05_000.10), if we consider to not use the dot, it is
 not readable (basename_000_05_000_10). Use two underscore
 (basename__000_05__000_10) at least avoid these problems (but it is  not
 working in trac!).

 So I don't see too many options...

 Maybe we can define a GBASENAME_SEP variable in gis.h containing the
 default separator, and as suggested by hco, in the future add the
 possibility to set an environmental variable to customize the character or
 the sequence of characters that will be consider as basename separator.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2136#comment:17>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list