[postgis-users] Correct or wrong raster image loading

Bborie Park bkpark at ucdavis.edu
Mon May 14 10:07:08 PDT 2012


What are the dimensions (width/height) of your raster?  I just tested
your raster2pgsql command string...

raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 testtable

And it has no issues.  The generated table will only have 2 or 3 columns
(3 since you specified -F).  Each raster column will have one entry in
the raster_columns view.

You may wan to check the SQL generated from raster2pgsql instead of
piping directly to psql.  I'm guessing something went wrong in the
raster loading process.  Without additional information (error messages,
if any), we really can't say what is wrong.

-bborie


On 05/14/2012 09:01 AM, Giannis Giakoumidakis wrote:
> I'm not sure if my loading of raster images is correct. 
> 
> I use "raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 public.demelevation | psql -d gisdb" from the manual. What I get is a table that has only 3 columns (rid, rast, filename) and 1 row only (I thought -t would create many rows). Also, 12 constraints. Finally, 1 row in the "raster_columns" view, which contains all the details of the loaded raster. 
> 
> 
> The difference with a loaded shapefile is that this table has 55.000 rows that contains all the vector data details.
> 
> 
> So I have a major problem when I connect to the database through QGIS. There I can load and display normally a shapefile from the database (it appeas with "MULTIPOLYGON" type), but all the tables which contains rasters appear with "no geometry" type and can't be displayed in QGIS. 
> 
> 
> Can anyone tell me where is my fault, in the QGIS or in the first loading of the raster images in the database? Thanks.
> 
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list