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

Hugues François hugues.francois at irstea.fr
Tue Oct 22 05:20:28 PDT 2013


 
Hello,

I'm sorry but I don't understand why you are looking for numerous band with a mnt. In my mind it has only one single band made of elevation values.

Rasters are not so easy to display correctly with qgis or another desktop software. On my part, when i want to make tests with or without walues, I prefer to use st_dumpaspolygons or st_envelope. You may find some information on this, maybe a bit dated now, page : http://trac.osgeo.org/postgis/wiki/WKTRaster (scroll down to Displaying postgis rasters).

Hugues.




-----Original Message-----
From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Yves Jacolin
Sent: Tuesday, October 22, 2013 1:48 PM
To: PostGIS Users Discussion
Subject: [postgis-users] [Raster] MNT 250 IGNF data import problem

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

_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list