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

GRASS GIS trac at osgeo.org
Fri Jun 27 05:22:25 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 hcho):

 I have a couple of comments:

 * G_get_numb_of_decimals => G_get_num_decimals for naming consistency with
 other get_num functions, but I'm not sure if it deserves G_. Also, it's
 counting decimal numbers from a string. # decimals has already been
 determined by a module before converting a double to a string, so why do
 we need to get it again?

 * G_double_to_str: Its name is misleading because it doesn't simply
 convert double to string, but also replaces '.' with '_'. Maybe, something
 like G_double_to_basename_format?

 * G_get_format_name: I think you already renamed it to
 G_generate_basename, which I think is better because G_get_format_name is
 not clear if it's related to basename.

 BTW, I prefer full names like G_get_basename_separator and
 GRASS_BASENAME_SEPARATOR, but I know they are long...

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



More information about the grass-dev mailing list