[GRASS-dev] v.bd.addtable
Roger Bivand
Roger.Bivand at nhh.no
Fri Sep 16 02:27:20 EDT 2011
On Thu, 15 Sep 2011, Martin Landa wrote:
> Hi,
>
> 2011/9/15 Roger Bivand <Roger.Bivand at nhh.no>:
>> #% type: integer
>>
>> is missing in the 6.4 release branch for the interface description of layer
>
> fixed in r48304.
Hi,
Thanks, see below.
>
>> in v.db.addtable around line 36. It is in trunk, and in 6.4.1 released.
>> Without it, the type is inferred to be string.
>
> Note that in GRASS7 layer is a string. It supports layer names (not
> only layer numbers) and OGR layer names when accessing external data
> directly using OGR [1].
It is in v.in.ogr etc. But in trunk/scripts/v.db.addtable/v.db.addtable.py
line 35 is #% type: integer for layer - was this intended?
> v.db.addtable --interface-description
...
<parameter name="layer" type="integer" required="no" multiple="no">
<description>
Layer number where to add new attribute table
</description>
<default>
1
</default>
<guisection>
Definition
</guisection>
</parameter>
...
> v.to.db --interface-description
...
<parameter name="layer" type="string" required="yes"
multiple="no">
<label>
Layer number or name (write to)
</label>
<description>
A single vector map can be connected to multiple
database tables. This number determines which table to use. Layer name for
direct OGR access.
</description>
<gisprompt age="old" element="layer" prompt="layer" />
<default>
1
</default>
</parameter>
The 6/7 change here breaks spgrass6 and forces version check, so I'd
rather I could rely on layer always being integer in 6 and string in 7
everywhere it occurs.
Roger
>
> Martin
>
> [1] http://grass.osgeo.org/wiki/Working_with_external_data_in_GRASS_7#Direct_access_to_external_data
>
>
--
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the grass-dev
mailing list