nc_spm_08 - 'cat' double

7 messages Options
Embed this post
Permalink
Martin Landa

nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Martin Landa

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
Hi,

2009/10/18 Martin Landa <[hidden email]>:

> 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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Nikos Alexandris

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin 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

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Martin Landa

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
Hi,

2009/10/18 Nikos Alexandris <[hidden email]>:
> 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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Nikos Alexandris

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
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



_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Metz-2

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Landa

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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Martin Landa

Re: nc_spm_08 - 'cat' double

Reply Threaded More More options
Print post
Permalink
Hi,

2009/10/18 Markus Metz <[hidden email]>:

> 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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user