[GRASS-user] Shape file dbfs field name truncation leads to duplicate filed names on import

Tom Russo russo at bogodyn.org
Sun Apr 20 22:42:35 PDT 2014


On Sun, Apr 20, 2014 at 10:12:48PM -0700, we recorded a bogon-computron collision of the <jwd at surewest.net> flavor, containing:
> I've been working at trying bring data from either shapefile or e00
> file into GRASS 6.4.3  However some of the layers simply do not
> import.  The trouble seems to be that some of the column names in the
> shape dbf violate naming limits and result duplicate column names
> which cause a failure.  E00 files (same data but different format) also
> result in a failure.  As far as I can tell, the cause is the same.  In
> some tables the process of importing the data results in duplicate
> field names due to truncation.  Switching to the SQLite driver did not
> help here.  
> 
> The data files are USGS coverages created originally in the '90s. If
> anyone has a recommended utility that can handle this problem, please
> let me know.

The only answer I'm aware of to this problem is the "cnames=" option of
v.in.ogr, which allows you to rename the columns on import.  I've had to
use it often for precisely the reasons you're seeing.  

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

 




More information about the grass-user mailing list