[GRASS-user] truncating filds of type "text" during export from grass to shp

Jarek Jasiewicz jarekj at amu.edu.pl
Wed Mar 18 10:09:44 EDT 2009


Hi

It is well-known that ogr2ogr truncate character field to 80 chars 
during export to dbf.

But I have a problem with exporting data where atributes are stored in 
postgree SQL database  and one field is type text with more than 255 chars.

It seems it cannot be exported with r.out.ogr
 so I use ogr2ogr, according to its help:

ogr2ogr -f "ESRI Shapefile" -sql "select *, cast(branch as text) from 
cieki_glowna" rivers.shp  grassdata/Rzeki/glowna/vector/cieki_glowna/head

but it also failed


So it is a way to do it, without exporting columns form pgSQL as text 
and attaching them in ESRI externaly??

kindly regards
Jarek


More information about the grass-user mailing list