[GRASS-dev] Weird v.proj bug: ERROR: Option <location> does not accept multiple answers

Moritz Lennert mlennert at club.worldonline.be
Fri May 20 01:39:10 PDT 2016


On 20/05/16 07:12, Markus Neteler wrote:
>
> On May 20, 2016 2:35 AM, "Vaclav Petras" <wenzeslaus at gmail.com
> <mailto:wenzeslaus at gmail.com>> wrote:
>  >
>  >
>  > On Thu, May 19, 2016 at 6:10 PM, Markus Neteler <neteler at osgeo.org
> <mailto:neteler at osgeo.org>> wrote:
>  >>
>  >>
>  >> today I came across a weird error (both 7.0.svn and trunk):
>  >>
>  >> # NC datasets
>  >> GRASS 7.0.5svn (nc_spm_08_grass7):~ > v.proj -l bla
>  >> location=nc_spf_grass7 mapset=PERMANENT
>  >>
>  >> Description:
>  >>  Re-projects a vector map from one location to the current location.
>  >> ...
>  >> ERROR: Option <location> does not accept multiple answers
>  >
>  >
>  > This is caused by the parser and it happens with every module:
>  >
>  > > g.region xxx region=yyy
>  > ...
>  > ERROR: Option <region> does not accept multiple answers
>
> Mhh, a super bug!


How is this a bug ?

The general rule in the parser is that the first parameter can be given 
unnamed, i.e.

v.proj location=nc_spf_grass7 mapset=PERMANENT

is equivalent to

v.proj nc_spf_grass7 mapset=PERMANENT

So, when you write:

v.proj -l bla location=nc_spf_grass7 mapset=PERMANENT

this translates to

v.proj -l location=bla location=nc_spf_grass7 mapset=PERMANENT

i.e. you define the location parameter twice, which is obviously an 
error and so the error message is logical.

Moritz


More information about the grass-dev mailing list