[GRASS-dev] Re: [GRASS-CVS] martinl: grass6/vector/v.distance main.c, 1.36, 1.37

Hi,

2007/3/8, Maciej Sieczka <tutey@o2.pl>:

Martin Landa wrote:
> Hi,
>
> right, should be fixed in CVS now.

I had a moment to look into this again. The segfault is fixed - cool!
However I think another problem remains. In the command:

$ v.distance from=points to=roads from_type=point to_type=line
from_layer=1 to_layer=1 dmax=-1 upload=cat column=road_cat to_column=cat

the paramater to_column= is used while the upload=cat. In this case, an
error should propably crop out, since to_column= is reserved for
upload=to_attr only, and it should not be used without it.

What do you think?

Hmm, not sure, using to_column option & use!=to_attr should not affect
the result (or?). So why to inform the user about that?:wink:

Martin

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa wrote:

2007/3/8, Maciej Sieczka <tutey@o2.pl>:

I had a moment to look into this again. The segfault is fixed - cool!
However I think another problem remains. In the command:

$ v.distance from=points to=roads from_type=point to_type=line
from_layer=1 to_layer=1 dmax=-1 upload=cat column=road_cat to_column=cat

the paramater to_column= is used while the upload=cat. In this case, an
error should propably crop out, since to_column= is reserved for
upload=to_attr only, and it should not be used without it.

What do you think?

Hmm, not sure, using to_column option & use!=to_attr should not affect
the result (or?).

I too *guess* it should not, propably (FWIW, it's upload=to_attr, not
use=) .

So why to inform the user about that?:wink:

Since manual explicitely requires upload=to_attr for to_column= option
and vice versa, the module behavior should follow this requirement.

Moreover, since upload=to_attr without apropriate to_column= yields an
error:

ERROR: to_column option missing

the to_column= without upload=to_attr should yield an error too, eg.:

ERROR: use=to_attr required for option to_column

but it does not.

Not a great problem - you are right. But keeping the module's behavior
sane and consistent would do no harm, and would help.

Thanks for your interest anyway. You are doing Great Job sanitising and
fixing GRASS. Thank you.

Maciek