Re: [GRASS-user] v.in.ogr fails on dbf with long column names
On Jan 11, 2008 5:42 AM, Craig Leat [EMAIL PROTECTED] wrote: Hi I have a shapefile and attributes in a dbf file. The dbf has two columns where the first ten characters of the column names are identical. The dbf driver appears to only consider the first ten letters of the name and so v.in.ogr fails reporting that two columns have the same name. Is there a way to only import selected columns? I could also delete a column before importing, but I am lacking some basic DBase know how so any pointers will be greatly appreciated. BTW the dbf is too big (94,000 rows) to load into OpenOffice Calc. Regards Craig dbf field names are limited to 10 characters. ogr2ogr (part of GDAL) has a -select clause which would allow you to select only specified columns, but might not be able to distinguish between the identical column names either. Rich -- Richard Greenwood [EMAIL PROTECTED] www.greenwoodmap.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.in.ogr fails on dbf with long column names
Wow! Lots of advice flooding in. Thanks to all. v.in.ogr Still fails to import the dbf even if sqlite is my internal database. I solved the problem by using the cnames option to v.in.ogr. Regards Craig Patton, Eric wrote: there are already several bug reports about problems (bad experiences) with the 10 characters limit in dbf. A simple solution is to use sqlite instead. Regards, Otto And even if you aren't an sqlite guru, you just have to install it on your system and use the gui-based sqlitebrowser, which provides a handy interface to the most commonly-used database functionality: http://sqlitebrowser.sourceforge.net/index.html ~ Eric. Daniel Victoria wrote: On Jan 11, 2008 10:42 AM, Craig Leat [EMAIL PROTECTED] wrote: BTW the dbf is too big (94,000 rows) to load into OpenOffice Calc. How about OpenOfice Base? It appears to open dBase files. I don'f have a dbf file here to test it but the web page says it does. Daniel Martin Landa wrote: from v.in.ogr: cnames List of column names to be used instead of original names, first is used for category column v.in.ogr cnames=cat,col1,col2,... could help you? Martin Richard Greenwood wrote: dbf field names are limited to 10 characters. ogr2ogr (part of GDAL) has a -select clause which would allow you to select only specified columns, but might not be able to distinguish between the identical column names either. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.in.ogr fails on dbf with long column names
Hi Craig, there are already several bug reports about problems (bad experiences) with the 10 characters limit in dbf. A simple solution is to use sqlite instead. Regards, Otto On Fri, 11 Jan 2008 06:04:05 -0700 Richard Greenwood [EMAIL PROTECTED] wrote: On Jan 11, 2008 5:42 AM, Craig Leat [EMAIL PROTECTED] wrote: Hi I have a shapefile and attributes in a dbf file. The dbf has two columns where the first ten characters of the column names are identical. The dbf driver appears to only consider the first ten letters of the name and so v.in.ogr fails reporting that two columns have the same name. Is there a way to only import selected columns? I could also delete a column before importing, but I am lacking some basic DBase know how so any pointers will be greatly appreciated. BTW the dbf is too big (94,000 rows) to load into OpenOffice Calc. Regards Craig dbf field names are limited to 10 characters. ogr2ogr (part of GDAL) has a -select clause which would allow you to select only specified columns, but might not be able to distinguish between the identical column names either. Rich ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user