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

GRASS GIS trac at osgeo.org
Fri Jun 27 06:09:20 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):

 Replying to [comment:21 zarch]:
 > Thanks for your reviewing!
 > [[BR]]
 >
 > Replying to [comment:20 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_.
 >
 > Ok, I renamed it. I think that should be possible to use this function
 from the GRASS modules to determine, for example in r.horizon step
 parameter, how many decimal numbers are desired by the user.
 >
 >
 > [[BR]]
 >
 >
 > > 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?
 >
 > Sorry I'm not sure that I get your point, I would like to use
 G_get_num_decimals from r.horizon and r.sun modules to define how many
 decimal numbers are required by the user.
 >
 >


 Ah! So you take an input parameter from the user as a string and feed it
 directly to this function. I thought you already converted double to
 string by the time you call this function, then you should already know
 how many decimals you have because you used that info for conversion
 already. This function now makes sense to me.

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



More information about the grass-dev mailing list