[GRASS-dev] [grass-code I][524] d.vect.thematic // mysql: data-type problem

grass-dev at grass.itc.it grass-dev at grass.itc.it
Wed Oct 31 15:24:16 EDT 2007


code I item #524, was opened at 2007-10-31 15:24
Status: Open
Priority: 3
Submitted By: Michael Ash (mash)
Assigned to: Nobody (None)
Summary: d.vect.thematic // mysql:  data-type problem   
Issue type: module bug
Issue status: None
GRASS version: 6.2.2
GRASS component: vector
Operating system: Linux
Operating system version: 
GRASS CVS checkout date, if applies (YYMMDD): 


Initial Comment:
I am having some problems with data types trying to map thematic data from a mysql database table. 

Here is the table:

Field   Type    Null    Key     Default Extra
cat     int(11) YES             NULL
AREA    double  YES             NULL
PERIMETER       double  YES             NULL
BG25_D00_       double  YES             NULL
BG25_D00_I      double  YES             NULL
STATE   varchar(2)      YES             NULL
COUNTY  varchar(3)      YES             NULL
TRACT   varchar(6)      YES             NULL
BLKGROUP        varchar(1)      YES             NULL
NAME    varchar(90)     YES             NULL
LSAD    varchar(2)      YES             NULL
LSAD_TRANS      varchar(50)     YES             NULL
ToxConc2003     double  YES             NULL
lToxConc2003    double  YES             NULL
latino  decimal(16,5)   YES             NULL
black   decimal(16,5)   YES             NULL
poor    decimal(26,5)   YES             NULL

AND HERE IS THE COMPLAINT FROM GRASS:

v.info -c map=bg25_d00 layer=1
Displaying column types/names for database connection of layer 1:

MySQL driver: column 'latino', type 246 is not supported

MySQL driver: column 'black', type 246 is not supported

MySQL driver: column 'poor', type 246 is not supported
INTEGER|cat
DOUBLE PRECISION|AREA
DOUBLE PRECISION|PERIMETER
DOUBLE PRECISION|BG25_D00_
DOUBLE PRECISION|BG25_D00_I
CHARACTER|STATE
CHARACTER|COUNTY
CHARACTER|TRACT
CHARACTER|BLKGROUP
CHARACTER|NAME
CHARACTER|LSAD
CHARACTER|LSAD_TRANS
DOUBLE PRECISION|ToxConc2003
DOUBLE PRECISION|lToxConc2003



I can probably resolve this by setting the type to DOUBLE in MySQL, but d.vect.thematic should accept DECIMAL's.  I have also had problems with type FLOAT.


----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=524&group_id=21




More information about the grass-dev mailing list