[GRASS-user] how to change imported table column definitions - using 6.4 in Win XP

Markus Neteler neteler at osgeo.org
Thu Feb 11 03:04:30 EST 2010


On Tue, Feb 9, 2010 at 3:40 PM, Stuart Edwards <sedwards2 at cinci.rr.com> wrote:
> On Feb 9, 2010, at 5:11 AM, Laszlo Nagy wrote:
> >
> > (!) Have imported a csv to make a vector map.  All cols are listed as char.
> > There are numeric columns (either two decimal values) that are listed as
> > char. How can I change them to be numeric?

Create a .csvt file with the name of the .csv file (see manual of db.in.ogr).
In this CSV-types file you can specify a type for each column.

> I had trouble with this recently - one cause of the problem in my case was
> the presence of data gaps -- any column with a data gap seemed to be
> imported as a 'char' column.  When I modified the table to eliminate missing
> data it worked fine.

Perhaps it included white spaces?

Markus


More information about the grass-user mailing list