[GRASS-user] error in v.in.ogr with null values

Jeshua Lacock jeshua at 3DTOPO.com
Wed Aug 16 13:36:31 PDT 2017


> On Aug 15, 2017, at 10:06 AM, Mira Kattwinkel <kattwinkel-mira at uni-landau.de> wrote:
> 
> I was able to nail it down to empty cells in the attribute table (NULL). When filling those the error disappears.
> 
> Have there been any changes to v.in.ogr that may cause this behaviour? Or could this be related to OGR / GDAL?

Hi Mira,

I am not sure if it will work for you, but I have found that when I have empty cells, I can get around the issue by converting the file to import to CSV then back using ogr2ogr.

For instance (I have only done this with shape files):

#convert DBF to CSV file to properly handle blank fields
ogr2ogr  -f 'CSV' fileName.csv fileName.dbf

#convert back to DBF
ogr2ogr  fileName_fixed.dbf fileName.csv

#back up original DBF file before replacing:
mv fileName.dbf fileName_original.dbf

#then move “fixed” DBF file back to original filename:
mv fileName_fixed.dbf fileName.dbf


I hope this helps!


Best,

Jeshua Lacock
Founder/Engineer
<3DTOPO.com>
GlassPrinted.com



More information about the grass-user mailing list