[GRASS-dev] G_OPT_R_MAP vs G_OPT_R_INPUT

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?

--
Nikos

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

--
Nikos
_______________________________________________
grass-dev mailing list

grass-dev@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-dev

see

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

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/G-OPT-R-MAP-vs-G-OPT-R-INPUT-tp5173026p5173030.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On 14/11/14 14:14, Helmut Kudrnovsky wrote:

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

--
Nikos
_______________________________________________
grass-dev mailing list

grass-dev@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-dev

see

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

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=". "G_OPT_R_INPUT" would then be for
modules that have either several raster map inputs or
raster and vector maps as 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.

Ben

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/G-OPT-R-MAP-vs-G-OPT-R-INPUT-tp5173026p5173030.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

Spatial technology for the masses, not the classes:
experience free and open source GIS at http://gvsigce.org

On 14/11/14 14:25, Benjamin Ducke wrote:

On 14/11/14 14:14, Helmut Kudrnovsky wrote:

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

--
Nikos
_______________________________________________
grass-dev mailing list

grass-dev@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-dev

see

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

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=". "G_OPT_R_INPUT" would then be for
modules that have either several raster map inputs or
raster and vector maps as 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.

I've always understood the difference between MAP and INPUT as

- MAP: used for modules which treat a map, but do not have input+output logic (e.g. r.category, r.colors, etc)
- INPUT: used for modules that have input + output logic (r.cost, r.mfilter, etc)

The difference between one or multiple inputs is covered by

G_OPT_R_INPUT vs G_OPT_R_INPUTS.

Moritz

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

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

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=". "G_OPT_R_INPUT" would then be for
modules that have either several raster map inputs or
raster and vector maps as 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.

Moritz Lennert wrote:

I've always understood the difference between MAP and INPUT as
- MAP: used for modules which treat a map, but do not have
input+output logic (e.g. r.category, r.colors, etc)
- INPUT: used for modules that have input + output logic (r.cost,
r.mfilter, etc)

The difference between one or multiple inputs is covered by
G_OPT_R_INPUT vs G_OPT_R_INPUTS.

So, then we have:

G_OPT_R_INPUT -> single raster map for modules featuring output(s)
G_OPT_R_INPUTS -> multiple input raster maps for modules feat. output(s)
G_OPT_R_MAP -> single raster map for modules operating on "this" map
G_OPT_R_MAPS -> multiple raster maps for modules operating on "these" maps

Right?

Nikos

On 14/11/14 14:58, Nikos Alexandris wrote:

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

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=". "G_OPT_R_INPUT" would then be for
modules that have either several raster map inputs or
raster and vector maps as 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.

Moritz Lennert wrote:

I've always understood the difference between MAP and INPUT as
- MAP: used for modules which treat a map, but do not have
input+output logic (e.g. r.category, r.colors, etc)
- INPUT: used for modules that have input + output logic (r.cost,
r.mfilter, etc)

The difference between one or multiple inputs is covered by
G_OPT_R_INPUT vs G_OPT_R_INPUTS.

So, then we have:

G_OPT_R_INPUT -> single raster map for modules featuring output(s)
G_OPT_R_INPUTS -> multiple input raster maps for modules feat.
output(s)
G_OPT_R_MAP -> single raster map for modules operating on "this" map
G_OPT_R_MAPS -> multiple raster maps for modules operating on "these"
maps

Right?

At least that is how I've always interpreted it. You'd have to check individual modules if this is actually how things have been applied...

Moritz

On 14.11.2014 16:22, Moritz Lennert wrote:

On 14/11/14 14:58, Nikos Alexandris wrote:

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

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=". "G_OPT_R_INPUT" would then be for
modules that have either several raster map inputs or
raster and vector maps as 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.

Moritz Lennert wrote:

I've always understood the difference between MAP and INPUT as
- MAP: used for modules which treat a map, but do not have
input+output logic (e.g. r.category, r.colors, etc)
- INPUT: used for modules that have input + output logic (r.cost,
r.mfilter, etc)

The difference between one or multiple inputs is covered by
G_OPT_R_INPUT vs G_OPT_R_INPUTS.

So, then we have:

G_OPT_R_INPUT -> single raster map for modules featuring output(s)
G_OPT_R_INPUTS -> multiple input raster maps for modules feat.
output(s)
G_OPT_R_MAP -> single raster map for modules operating on "this" map
G_OPT_R_MAPS -> multiple raster maps for modules operating on "these"
maps

Right?

At least that is how I've always interpreted it. You'd have to check
individual modules if this is actually how things have been applied...

Already did. Some counts for the scripts inside /grass70/dist.x86_64-unknown-linux-gnu/scripts

G_OPT_R_MAP: x5
G_OPT_R_MAPS: x1
G_OPT_R_INPUT: x34
G_OPT_R_INPUTS: x8