[GRASS-stats] readVECT6 problem fo importing null data

Markus Neteler neteler at fbk.eu
Wed Dec 5 03:49:02 EST 2007


Dear Jarek,

ok, I made again a test using out NC OSGeo data set
but now PostgreSQL:

db.connect driver=pg database="host=localhost,dbname=postgres"
db.tables -p
information_schema.sql_features
...

# 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 IS NOT NULL" type=area col=blue
d.vect mylakes where="FTYPE IS NULL" type=area col=red
# ... works.

# Export test:
v.out.ogr mylakes dsn=mylakes.shp type=area

# Looking at it in openoffice: 
openoffice.org2.3 mylakes.dbf
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,
96,26382.58,1286.95,97,53957,ROCK/ISLAND,44100,
...

Also the expected empty fields here. I am using PG 8.2.5 and
GRASS 6.3-CVS.
Can you replicate this example?

Markus


Jarek Jasiewicz wrote:
> 
> 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
> 

-- 
View this message in context: http://www.nabble.com/-GRASS-stats--readVECT6-problem-fo-importing-null-data-tf4876840.html#a14167439
Sent from the Grass - Stats mailing list archive at Nabble.com.



More information about the grass-stats mailing list