[GRASS-dev] G_OPT_R_MAP vs G_OPT_R_INPUT

Nikos Alexandris nik at nikosalexandris.net
Fri Nov 14 05:52:02 PST 2014


Nikos Alexandris wrote:

>>> What is the difference between G_OPT_R_MAP and G_OPT_R_INPUT? Which 
>>> and
>>> why should I prefer for my script(s)?
>>> Is there a step-by-step run-through of all options for composing 
>>> header
>>> definitions?

Helmut Kudrnovsky wrote:

>> see
>> 
>> http://grass.osgeo.org/programming7/gis_8h.html#a5521b5269c52afe64e5051348b08fc69

Yes, I was skimming through it before.

Benjamin Ducke wrote:

> But that table doesn't really answer the question,
> does it? For both "G_OPT_R_INPUT" and "G_OPT_R_MAP"
> it lists "old input raster map". AFAIU, "G_OPT_R_MAP"
> is for modules that use only one input raster map.
> In those cases, the corresponding input option should
> be named "map=".

And what is the (semantic) purpose of G_OPT_R_MAPS (MAPS vs MAP) then?

> "G_OPT_R_INPUT" would then be for
> modules that have either several raster map inputs or
> raster and vector maps as inputs.

And, likewise, what about G_OPT_R_INPUTS?

> The corresponding input options would then be called "raster="
> and "vector=" in case of exactly one raster and one vector
> input map. Further special cases are covered by
> "G_OPT_R_BASE", "G_OPT_R_ELEV", etc.: They all exist
> for semantical purposes. All of them stand for raster
> input maps.

Nikos


More information about the grass-dev mailing list