[postgis-users] Error in raster import with WKTRaster
Mathieu Basille
basille at ase-research.org
Thu Feb 10 16:20:08 PST 2011
Dear users,
I have a problem while trying to import a raster into PostGIS
(2.0.0SVN), using WKTRaster (0.1.6d), on a Debian system.
This is a raster exported from GRASS as GeoTiff, using a float32 format
(this is a density map). I then used:
mathieu at Caribou$ /usr/lib/postgresql/8.4/bin/gdal2raster.py -r
RoadDensity_2002_2006_CV_UTM19_25m.tif -t
roaddensity_2002_2006_cv_utm19_25m -s 26919 -k 50x50 -I >
RoadDensity_2002_2006_CV_UTM19_25m.sql
and finally to import into PostGIS, as the postgres user:
postgres at Caribou:/home/mathieu$ psql -f
RoadDensity_2002_2006_CV_UTM19_25m.sql geodb
BEGIN
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:2: NOTICE: CREATE TABLE
créera des séquences implicites «
roaddensity_2002_2006_cv_utm19_25m_rid_seq » pour la colonne serial «
roaddensity_2002_2006_cv_utm19_25m.rid »
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:2: NOTICE: CREATE TABLE /
PRIMARY KEY créera un index implicite «
roaddensity_2002_2006_cv_utm19_25m_pkey » pour la table «
roaddensity_2002_2006_cv_utm19_25m »
CREATE TABLE
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:3: ERREUR: la colonne « nan
» n'existe pas
LIGNE 1 : ...','rast',26919, ARRAY['32BF'], false, true, ARRAY[nan], 25.0...
^
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:4: ERREUR: la transaction
est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:5: ERREUR: la transaction
est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
psql:RoadDensity_2002_2006_CV_UTM19_25m.sql:6: ERREUR: la transaction
est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
...
And it continues for every line (or until I stop it). In the end, the
table is not imported at all. (sorry if parts of the ouputs are in
French: the first error message is simply: "the column "nan" does not
exist", and the next ones says "the transaction is cancelled, all
commands will be ignored until the end of the bloc of the transaction")
Note that this is the exact same approach that I am generally using,
without any problem for other maps (including density maps as float32).
I am new to PostGIS and the SQL world, so it might be an easy one...
Yet, I still have no idea what's wrong here. I welcome any pointer!
All the best,
Mathieu.
--
~$ whoami
Mathieu Basille, Post-Doc
~$ locate
Laboratoire d'Écologie Comportementale et de Conservation de la Faune
+ Centre d'Étude de la Forêt
Département de Biologie
Université Laval, Québec
~$ info
http://ase-research.org/basille
~$ fortune
``If you can't win by reason, go for volume.''
Calvin, by Bill Watterson.
More information about the postgis-users
mailing list