[GRASS-dev] v.to.db type=area: bug or typo?

Radim,

While updating the v.to.db manual I noticed that 'type=area' is
mentioned twice in the 'Examples':

v.to.db map=soils type=area option=cat

v.to.db map=soils type=area option=area col=area_size unit=h

But v.to.db says:

Error: value <area> out of range for parameter <type>
       Legal range: point,line,boundary,centroid

It was reported on Feb 2006 http://intevation.de/rt/webrt?serial_num=4044.

Shall I update the description (replace 'type=area' with
'type=centroid' ???) or is it a bug in v.to.db?

Maciek

Radim,

One more thing. v.to.db Description says:

"(...) In uploaded/printed category values (...) 'null'/'-' if category
cannot be found or multiple categories were found."

I can't reproduce that. There is a vector 'landuse' in spearfish60
which has many centroids using the same category. When I print their
coordinates only cat 6 is reported (OK) but according to what
Description says, there should be some indicator of multiple cats
printed as well. I can't see any 'null'/'-' there:

$ v.to.db -p landuse option=coor type=centroid column=dum1,dum2
cat|x|y|z
6|602900|4915650|0
8 categories read from map
0 records selected from table
0 categories read from map exist in selection from table
0 categories read from map don't exist in selection from table
0 records updated/inserted
0 update/insert errors

Is Description wrong or is it a bug?

Maciek

On 9/21/06, Maciej Sieczka <tutey@o2.pl> wrote:

Radim,

While updating the v.to.db manual I noticed that 'type=area' is
mentioned twice in the 'Examples':

v.to.db map=soils type=area option=cat

v.to.db map=soils type=area option=area col=area_size unit=h

But v.to.db says:

Error: value <area> out of range for parameter <type>
       Legal range: point,line,boundary,centroid

It was reported on Feb 2006 http://intevation.de/rt/webrt?serial_num=4044.

Shall I update the description (replace 'type=area' with
'type=centroid' ???) or is it a bug in v.to.db?

No, that would not make sense, but I am not sure if area should be added
to types. For example for length you can select line or boundary,
but for area size you dont have any option.
Probably the best is to add area type to default types but remove
that parameter from examples as it is not significant.

Radim

Maciek

On 9/21/06, Maciej Sieczka <tutey@o2.pl> wrote:

Radim,

One more thing. v.to.db Description says:

"(...) In uploaded/printed category values (...) 'null'/'-' if category
cannot be found or multiple categories were found."

I can't reproduce that. There is a vector 'landuse' in spearfish60
which has many centroids using the same category. When I print their
coordinates only cat 6 is reported (OK) but according to what
Description says, there should be some indicator of multiple cats
printed as well. I can't see any 'null'/'-' there:

$ v.to.db -p landuse option=coor type=centroid column=dum1,dum2
cat|x|y|z
6|602900|4915650|0
8 categories read from map
0 records selected from table
0 categories read from map exist in selection from table
0 categories read from map don't exist in selection from table
0 records updated/inserted
0 update/insert errors

Is Description wrong or is it a bug?

Seems to be bug in v.to.db, the categories with multiple
geoms should be printed with '-' in coor cols.

Radim

Maciek

Radim Blazek wrote:

On 9/21/06, Maciej Sieczka <tutey@o2.pl> wrote:

While updating the v.to.db manual I noticed that 'type=area' is
mentioned twice in the 'Examples':

v.to.db map=soils type=area option=cat

v.to.db map=soils type=area option=area col=area_size unit=h

But v.to.db says:

Error: value <area> out of range for parameter <type>
       Legal range: point,line,boundary,centroid

It was reported on Feb 2006
http://intevation.de/rt/webrt?serial_num=4044.

Shall I update the description (replace 'type=area' with
'type=centroid' ???) or is it a bug in v.to.db?

No, that would not make sense,

I'm not sure what you mean by "not make sense".

What I mean, is that there is an example:

v.to.db map=soils type=area option=cat

which doesn't work, because:

Error: value <area> out of range for parameter <type>
       Legal range: point,line,boundary,centroid

But if substitute "area" with "centroid", like:

v.to.db map=soils type=centroid option=cat

it works.

Do you still think replacing "area" with "centroid" is not a good idea
(I'm propably missing something, sorry)?

but I am not sure if area should be added to types. For example for
length you can select line or boundary, but for area size you dont
have any option.

If I use type=centroid it works - area size is uploaded to a specific
centroid.

Probably the best is to add area type to default types

OK.

but remove that parameter from examples as it is not significant.

Aha.

Maciek