[GRASS-user] changing collumn type on vector map

Milton Cezar Ribeiro miltinho.astronauta at gmail.com
Thu Jul 2 14:09:50 EDT 2009


Hi Moritz,

As I am using dbf, with v.db.addcol + v.db.update it is running find.

Thanks!

milton

2009/7/2 Moritz Lennert <mlennert at club.worldonline.be>

> On 02/07/09 18:52, Milton Cezar Ribeiro wrote:
>
>> Dear all,
>>  I just imported a shapefile on GRASS, and I need to convert several
>> fields from CHAR to numeric (double precision) - at my own risk, of course.
>> Can I do it on grass, or I need to redo the thinks on arcgis ?!
>>
>
> Depends on your database backend. In PostgreSQL (and perhaps SQLite), you
> could do something like this:
>
> echo "alter table XYZ alter column ABC type numeric" | db.execute
>
> I don't think anything like this would be possible in dbf...
>
> You could also try a combination of v.db.addcol + v.db.update to create new
> numeric columns and set the value of these columns to the value of the
> varchar column.
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090702/07568f62/attachment.html


More information about the grass-user mailing list