Dear Jonas,

thanks for your suggestion.

This looks like a useful workaround but it seems to be a more general issue. Is it a wanted behaviour that it is not possible without tricks to import shapes with empty table cells? As I wrote, it used to work just fine.

All the best,

Mira


Am 16.08.2017 um 22:41 schrieb Jeshua Lacock:
On Aug 16, 2017, at 2:36 PM, Jeshua Lacock <[email protected]> wrote:

#convert DBF to CSV file to properly handle blank fields
ogr2ogr  -f 'CSV' fileName.csv fileName.dbf
Ooops - first line of the example should be this instead:

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


Am 16.08.2017 um 22:36 schrieb Jeshua Lacock:
On Aug 15, 2017, at 10:06 AM, Mira Kattwinkel <[email protected]> 
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


--
Dr. Mira Kattwinkel
Quantitative Landscape Ecology
Institute for Environmental Sciences
University of Koblenz-Landau
Fortstraße 7
76829 Landau
Germany
Fon: + 49 6341 280-31553

_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to