[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:55:55 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):
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.
[[BR]]
> * 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?
yes, you are right, I think G_double_to_basename_format is better. I
renamed it.
[[BR]]
> * G_get_format_name: I think you already renamed it
> to G_generate_basename
yes I forgot to update the trac list, thank you to point it out.
[[BR]]
> BTW, I prefer full names like G_get_basename_separator
> and GRASS_BASENAME_SEPARATOR, but I know they are long...
yes I think you are right they are longer but clearer, so I renamed them.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2136#comment:21>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list