[GRASS-stats] readVECT6 problem fo importing null data

Jarosław Jasiewicz jarekj at amu.edu.pl
Thu Nov 29 03:28:46 EST 2007


>
> I can reproduce the problem, which seems related to DBFIsAttributeNULL 
> not being handled adequately on either side (both are using the OGR 
> library). Could you please try to write the temporary shapefile 
> directly using v.out.ogr, and then try to read it with readOGR() and 
> with readShape*() with * as Points, Lines, or Poly depending on what 
> getinfo.shape() says? I'll try to debug using the DBF code in the 
> foreign package to start with - numeric fields should have value /* 
> NULL numeric fields have value "****************" */ from dbfopen.c, 
> but do not seem to.
>
I tried what you sugested. I can't probably help more, but I found that:

- v.out.ogr produce dbf with 0 instead null;
- readOGR() reads dbf with 0 instead null;
- if grass dbf table null are treated as 0, but displayed as null;

I use RdbiPgSQL to import data with null values and nad readVECT6 to 
import vector and use  substitute () to merge them (if needed). it is a 
temporary solution

Jarek


More information about the grass-stats mailing list