[GRASS-dev] r.in.gdal and "group"

Markus Neteler neteler at itc.it
Tue Oct 16 10:36:43 EDT 2007


On Tue, Oct 16, 2007 at 04:28:32PM +0200, Markus Neteler wrote:
> On Tue, Oct 16, 2007 at 04:03:31PM +0200, Kirk Wythers wrote:
> > I must have missed the change in r.in.gdal where the required paramter
> > "output" was droped and replaced with "group".
> 
> Kirk,
> 
> the parser was updated

Forgot to mention that this is a good thing:
We add macros there (they are now almost complete) to
facilitate the programming of the parser interface. Eg.:

    input = G_define_option();
    input->key             = "input";
    input->type            = TYPE_STRING;
    input->required        = YES;
    input->multiple        = NO;
    input->gisprompt       = "old,dig,vector";
    input->description     = "vector input file";

was simplified to

    input  = G_define_standard_option(G_OPT_V_INPUT);

(as defined in lib/gis/parser.c).

Additional positive side effects:
- standardized wording
- messages translated to other languages in one place only

Only, which each change in lib/gis/parser.c, a full recompilation
after "make distclean" is needed to avoid shifted parameters
as you have seen.

Hope this clarifies it.

Markus

PS: list of currently predefined macros:

    G_OPT_WHERE,    /* SQL where conditions */
    G_OPT_TABLE,    /* table name */
    G_OPT_DRIVER,   /* driver name */
    G_OPT_DATABASE, /* database name */
    G_OPT_COLUMN,   /* one attr column */
    G_OPT_COLUMNS,  /* one or more attr columns */
    G_OPT_I_GROUP,  /* old input imagery group */
    G_OPT_R_INPUT,  /* old input raster map */
    G_OPT_R_INPUTS, /* old input raster maps */
    G_OPT_R_OUTPUT, /* new output raster map */
    G_OPT_R_MAP,    /* old input raster map */
    G_OPT_R_MAPS,   /* old input rasters map */
    G_OPT_R_BASE,   /* old input base raster map */
    G_OPT_R_COVER,  /* old input cover raster map */
    G_OPT_R_ELEV,   /* old input elevation raster map */
    G_OPT_R_ELEVS,  /* old input elevation raster maps */
    G_OPT_R3_INPUT,  /* old input raster3d map */
    G_OPT_R3_INPUTS, /* old input raster3d maps */
    G_OPT_R3_OUTPUT, /* new output raster3d map */
    G_OPT_R3_MAP,    /* old input raster3d map */
    G_OPT_R3_MAPS,   /* old input raster3d maps */
    G_OPT_V_INPUT,  /* old input vector map */
    G_OPT_V_INPUTS, /* old input vector maps */
    G_OPT_V_OUTPUT, /* new output vector map */
    G_OPT_V_MAP,    /* old input vector map */
    G_OPT_V_MAPS,    /* old input vector maps */
    G_OPT_V_TYPE,   /* primitive type */
    G_OPT_V_FIELD,  /* field number */
    G_OPT_V_CAT,    /* one category */
    G_OPT_V_CATS,   /* more categories */
    G_OPT_F_INPUT,  /* old input file */
    G_OPT_F_OUTPUT, /* new output file */
    G_OPT_F_SEP,    /* data field separator */
    G_OPT_C_FG,     /* foreground color */
    G_OPT_C_BG      /* background color */


------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------




More information about the grass-dev mailing list