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
--
View this message in context: http://www.nabble.com/v.in.ogr-fails-on-dbf-with-long-column-names-tp14753916p14753916.html
Sent from the Grass - Users mailing list archive at Nabble.com.
On Jan 11, 2008 5:42 AM, Craig Leat <Craig@pid.co.za> 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
richard.greenwood@gmail.com
www.greenwoodmap.com
Hi,
2008/1/11, Craig Leat <Craig@pid.co.za>:
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.
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
BTW the dbf is too big (94,000 rows) to load into OpenOffice Calc.
Regards
Craig
--
View this message in context: http://www.nabble.com/v.in.ogr-fails-on-dbf-with-long-column-names-tp14753916p14753916.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *
On Jan 11, 2008 10:42 AM, Craig Leat <Craig@pid.co.za> 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
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" <richard.greenwood@gmail.com> wrote:
On Jan 11, 2008 5:42 AM, Craig Leat <Craig@pid.co.za> 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
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.
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 <Craig@pid.co.za> 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