[GRASS-user] nc_spm_08 - 'cat' double

Hi,

some vector maps from nc_spm_08 uses double precision column as key
column. Then some modules fails...

v.info geology -c --q | grep cat
DOUBLE PRECISION|cat

v.extract in=geology where="cat > 10 and cat < 20" out=geology1 --o
[...]
ERROR: Column <cat> is not integer

?

Martin

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

Hi,

2009/10/18 Martin Landa <landa.martin@gmail.com>:

some vector maps from nc_spm_08 uses double precision column as key
column. Then some modules fails...

v.info geology -c --q | grep cat
DOUBLE PRECISION|cat

v.extract in=geology where="cat > 10 and cat < 20" out=geology1 --o
[...]
ERROR: Column <cat> is not integer

?

in GRASS 7 we can support as key column also non-integer columns, but
that's not question for GRASS 6.

Martin

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

On Sun, 2009-10-18 at 12:24 +0200, Martin Landa wrote:

Hi,
some vector maps from nc_spm_08 uses double precision column as key
column. Then some modules fails...

v.info geology -c --q | grep cat
DOUBLE PRECISION|cat

Martin, I have downloaded the nc_spm_08 dataset around May (date of
directory is 2008-05-18).

GRASS 6.4.0svn (nc_spm_08):/geo/grassdb/nc_spm_08 > v.info -c geology | grep cat
Displaying column types/names for database connection of layer 1:
INTEGER|cat

I guess something has been changed (?) since then.

Nikos

v.extract in=geology where="cat > 10 and cat < 20" out=geology1 --o
[...]
ERROR: Column <cat> is not integer

?
Martin

Hi,

2009/10/18 Nikos Alexandris <nikos.alexandris@felis.uni-freiburg.de>:

Martin, I have downloaded the nc_spm_08 dataset around May (date of
directory is 2008-05-18).

GRASS 6.4.0svn (nc_spm_08):/geo/grassdb/nc_spm_08 > v.info -c geology | grep cat
Displaying column types/names for database connection of layer 1:
INTEGER|cat

I guess something has been changed (?) since then.

no, it's seems to be bug in GRASS 7 - GRASS 6.* reports 'int'.

Martin

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

Nikos Alexandris:

> Martin, I have downloaded the nc_spm_08 dataset around May (date of
> directory is 2008-05-18):
> GRASS 6.4.0svn (nc_spm_08):/geo/grassdb/nc_spm_08 > v.info -c geology | grep cat
> Displaying column types/names for database connection of layer 1:
> INTEGER|cat

> I guess something has been changed (?) since then.

On Sun, 2009-10-18 at 12:38 +0200, Martin Landa wrote:

no, it's seems to be bug in GRASS 7 - GRASS 6.* reports 'int'.

OK. Here the same with grass70 - confirmed.
Nikos

Martin Landa wrote:

Hi,

some vector maps from nc_spm_08 uses double precision column as key
column. Then some modules fails...

v.info geology -c --q | grep cat
DOUBLE PRECISION|cat

v.extract in=geology where="cat > 10 and cat < 20" out=geology1 --o
[...]
ERROR: Column <cat> is not integer
  

See [1]. A wild guess: grass7 uses gdal and not the internal shapelib to open dbf files? At least in gdal-1.6.2, column <cat> would be interpreted as double because field length is >10. The <cat> column of geology is really integer, not double, because there are 0 decimal places.

Markus M

[1] http://trac.osgeo.org/gdal/ticket/809

Hi,

2009/10/18 Markus Metz <markus.metz.giswork@googlemail.com>:

See [1]. A wild guess: grass7 uses gdal and not the internal shapelib to
open dbf files? At least in gdal-1.6.2, column <cat> would be interpreted as
double because field length is >10. The <cat> column of geology is really
integer, not double, because there are 0 decimal places.

right, see http://trac.osgeo.org/grass/ticket/792

Martin

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