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

I must have missed the change in r.in.gdal where the required paramter
"output" was droped and replaced with "group".

I must not "get it"... because I don't understand what group a file
would be in before it is imported.

For example, I am importing a set a worldclim files with r.in.gdal. I
used to simply set the file to import with the input parameter, and
specify it's name with the output parameter.

Thanks,

Kirk

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 - this requires
make distclean

Then r.in.gdal will look as before.

If in doubt: "make distclean" :slight_smile:

Markus

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

Thanks Markus. Doing a 'make distclean' now.

Kirk

On 10/16/07, Markus Neteler <neteler@itc.it> 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 - this requires
make distclean

Then r.in.gdal will look as before.

If in doubt: "make distclean" :slight_smile:

Markus

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

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
------------------

On 10/16/07, Markus Neteler <neteler@itc.it> wrote:

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

Yes that does make sense. Thanks for the explanation. I did not
realize that shifted paramteres carried over onto the html pages as
well. The rebuild is done and all is as it was... my scripts are
working again. Thanks.

Kirk

Kirk Wythers wrote:

> 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

Yes that does make sense. Thanks for the explanation. I did not
realize that shifted paramteres carried over onto the html pages as
well.

The top part of each HTML file (everything prior to the DESCRIPTION
section) is generated by running the program with the
--html-description flag. Thus, the HTML will always accurately reflect
the program, including any "mistakes" arising from a mismatch between
the module and libgis.

--
Glynn Clements <glynn@gclements.plus.com>

[ G_define_standard_option() ]

Markus Neteler wrote:

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 */

shall we change these to G_OPT_DB_* ?

   G_OPT_V_FIELD, /* field number */

shall we change this to G_OPT_V_LAYER ?

Hamish

On Wed, Oct 17, 2007 at 09:48:40AM +0200, Hamish wrote:

[ G_define_standard_option() ]

Markus Neteler wrote:
> 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 */

shall we change these to G_OPT_DB_* ?

You, that would be good.

> G_OPT_V_FIELD, /* field number */

shall we change this to G_OPT_V_LAYER ?

Here I am not so sure since "field" is still widely used
in the code. Perhaps a task for GRASS 7?

Markus

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