[postgis-users] [Raster] MNT 250 IGNF data import problem

Yves Jacolin yves.jacolin at camptocamp.com
Tue Oct 22 04:47:32 PDT 2013


Hello list,

I am currently trying importing french IGN MNT 250 into a postgis database (v 
2.0.1):

raster2pgsql -b 1 -s 2154 -I -C -t 100x100 MNT250_L93_FRANCE.ASC raster.mnt250 
| psql -d formation

When testing my raster layer I get strange result:
SELECT rid, band, (stats).*
FROM (SELECT rid, band, ST_SummaryStats(rast, band) As stats
    FROM raster.mnt250 CROSS JOIN generate_series(1,3) As band
     WHERE rid=2) As foo;

NOTICE:  Invalid band index (must use 1-based). Returning NULL
CONTEXT:  SQL function "st_summarystats" statement 1
[several time]
 rid | band | count | sum | mean | stddev | min | max 
-----+------+-------+-----+------+--------+-----+-----
   2 |    1 | 10000 |   0 |    0 |      0 |   0 |   0
   2 |    2 |       |     |      |        |     |    
   2 |    3 |       |     |      |        |     |    

QGIS can't display my layer (well the layer seems white) and if I request my 
layer I get some weird value (224964728 for example).

In QGIS log, I have:

ERROR 1: PG: dbname=formation host=localhost user=yjacolin password= port=5432 
mode=2 schema=raster table=mnt250, band 1: IReadBlock failed at X offset 32, Y 
offset 29
ERROR 1: Error retrieving raster data from database

Any idea why this is not working as expected?

When I use raster2pgsql I get this message: 
raster2pgsql: /usr/local/lib/libgdal.so.1: no version information available 
(required by raster2pgsql)

I built gdal but not postgis.

Thanks,

Y.
-- 
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel (France) : +33 4 79 26 57 98
Tel (Suisse) : 021 619 10 43 (new)
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81
Mail : yves.jacolin at camptocamp.com
http://www.camptocamp.com



More information about the postgis-users mailing list