[postgis-users] Correct or wrong raster image loading

Giannis Giakoumidakis ggiakoumidakis at yahoo.com
Mon May 14 12:07:54 PDT 2012


Thanks for the anwser.

My raster is 390x279, so I use -t 390x279. I get no errors. I didn't understand from your asnwer, the rows in the table should have been more than 1 that it is now or it is correct like that?

The .sql I get before I use psql is this, in Notepad++:

BEGIN;
CREATE TABLE "public"."cc00h00m15s" ("rid" serial PRIMARY KEY,"rast" raster);
INSERT INTO "public"."cc00h00m15s" ("rast") VALUES ('0100000400DDC80B44AA83173FF2C80B44AA8317BF1986D9154421394032D1D677B4AE414000000000000000000000000000000000E6100000860117010400828282828282828282828282.......')::raster;
ANALYZE "public"."cc00h00m15s";
SELECT AddRasterConstraints('public','cc00h00m15s','rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE);
END;

I don't know why in the sql editor of pgAdmin, the: VALUES ('0100000400DDC80B44AA83173FF2C80B44AA8317BF1986D9154421394032D1D677B4AE41400....') are missing.







________________________________
 From: Bborie Park <bkpark at ucdavis.edu>
To: postgis-users at postgis.refractions.net 
Sent: Monday, May 14, 2012 8:07 PM
Subject: Re: [postgis-users] Correct or wrong raster image loading
 
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
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120514/0f8e5e08/attachment.html>


More information about the postgis-users mailing list