[GRASS-stats] readVECT6 problem fo importing null data
Jarek Jasiewicz
jarekj at amu.edu.pl
Wed Dec 5 00:39:05 EST 2007
Dear Markus!
The problem most probable concerns export only, when atributres are
stored in postgreSQL database and it happens when data during v.out.ogr
to shp with dbf table, in spite of NOT NULL in pgsql is set
cheers
Jarek
Markus Neteler wrote:
> Dear all,
>
> Roger notified me about this issue (I sometimes read here as time
> permits). I made some tests using out NC OSGeo data set
> (http://www.grassbook.org/data_menu3rd.php):
>
> # copy the map into your MAPSET and check for NULL
> g.copy vect=lakes,mylakes
> v.db.select mylakes
> v.db.select mylakes where="FTYPE IS NULL"
>
> # display the lakes, show undefined FTYPE lakes in red
> g.region swwake_10m
> d.mon x0
> d.erase
> d.vect mylakes where="FTYPE NOT NULL" type=area col=blue
> d.vect mylakes where="FTYPE IS NULL" type=area col=red
> # This works pretty well.
>
> # Export test:
> v.out.ogr mylakes dsn=mylakes.shp type=area
>
> # Looking at it in openoffice:
> cat,N,11,0,AREA,N,24,15,PERIMETER,N,24,15,FULL_HYDRO,N,24,15,FULL_HYDR2,N,24,15,FTYPE,C,80,FCODE,N,11,0,NAME,C,80
> 8,5310.04,334.89,9,55660,LAKE/POND,39000,
> 33,21739.17,709.53,34,54836,LAKE/POND,39000,
> 63,469.77,105.84,64,0,,0,
> 84,10564.66,402.43,85,55595,ROCK/ISLAND,44100,
> 93,7655.72,344.71,94,53621,DAM/WEIR,34300,
> 94,1357.21,178.47,95,0,,0,
> ...
>
> No problem at all: some empty FTYPE fields as desired.
> The problem must be elsewhere (or I misunderstand the problem,
> didn't read all messages).
>
> Best wishes,
> Markus
>
More information about the grass-stats
mailing list