Hi,
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
How come? Is it just me?
Markus
On Thu, May 19, 2016 at 6:10 PM, Markus Neteler <neteler@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
On May 20, 2016 2:35 AM, “Vaclav Petras” <wenzeslaus@gmail.com> wrote:
On Thu, May 19, 2016 at 6:10 PM, Markus Neteler <neteler@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 does not accept multiple answers
This is caused by the parser and it happens with every module:
g.region xxx region=yyy
…
ERROR: Option does not accept multiple answers
Mhh, a super bug!
Confusing…
Markus
On 20/05/16 07:12, Markus Neteler wrote:
On May 20, 2016 2:35 AM, "Vaclav Petras" <wenzeslaus@gmail.com
<mailto:wenzeslaus@gmail.com>> wrote:
>
> On Thu, May 19, 2016 at 6:10 PM, Markus Neteler <neteler@osgeo.org
<mailto:neteler@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
On Fri, May 20, 2016 at 10:39 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:
...
How is this a bug ?
... right, it is not.
...
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.
Yes. I got confused with the order in G6:
https://grass.osgeo.org/grass64/manuals/v.proj.html
v.proj [-lz] [input=name] location=name [mapset=name] ...
https://grass.osgeo.org/grass70/manuals/v.proj.html
v.proj [-lzw] location=name [mapset=name] [input=name] ...
Sorry for the noise! All fine.
cheers,
Markus