[postgis-users] How can I optimize a raster in postgis 2 for display?

José Pedro Santos zpsantos1 at hotmail.com
Fri Mar 1 01:05:24 PST 2013


Hi Santiago, 

Which version of QGIS you are using? I have QGIS 1.8 and works fine for displaying rasters (at 100mb) more than that sometimes I have troubles. See the metadata of the files after import to QGIS to check if everything is OK and try to change the appearance of the files in the properties (color ramp). 

QGIS 1.7 had some problems with the Postgis 2.0

Best Regards,
Jose Santos


> From: Pierre.Racine at sbf.ulaval.ca
> To: postgis-users at lists.osgeo.org
> Date: Thu, 28 Feb 2013 11:22:49 -0500
> Subject: Re: [postgis-users] How can I optimize a raster in postgis 2 for display?
> 
> The QGIS PostGIS raster plugin use GDAL to read rasters stored in PostGIS. I guess (but this is still not clear to me as I use OpenJump, not QGIS, to display vectorizations of PostGIS rasters), the last development version of the GDAL driver supports overviews. So:
> 
> 1) Find out which version of GDAL your QGIS installation is using (I have no idea how and it depends on your platform).
> 
> 2) Make sure to load your rasters with overviews. There is unfortunately no way yet to build overviews for already loaded raster tables. You will have to reload with the right option.
> 
> Pierre
> 
> > -----Original Message-----
> > From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> > bounces at lists.osgeo.org] On Behalf Of Ivan Santiago
> > Sent: Thursday, February 28, 2013 11:13 AM
> > To: PostGIS Users Discussion
> > Subject: [postgis-users] How can I optimize a raster in postgis 2 for display?
> > 
> > Hello all:
> > 
> > 
> > 
> > I ran rtpostgis.sql to enable postgis raster to our gis db.
> > 
> > Thanks for the advice, Pierre.
> > 
> > 
> > 
> > Now...
> > 
> > Two rasters were added to the new database
> > 
> > but I have problems viewing them in QGIS using the available plugin.
> > 
> > plugin: Load Postgis Raster to QGIS Ver 0.0.5.4
> > 
> > 
> > 
> > Original size erdas img files: 32mb, and 379mb
> > 
> > raster_columns view:
> > 
> > 
> > 
> > 
> > 
> > "gisogp";"ambiental_geologia_rasters_cuadrangulos";"o_6_ab_geol_20k";"rast
> > ";32161;6;-6;128;128;t;f;3;"{8BUI,8BUI,8BUI}";"{255,255,255}";"{f,f,f}";
> > 
> > "gisogp";"ambiental_topografia_rasters_mdt";"o_6_ab_ele";"rast";32161;6;-
> > 6;128;128;t;f;1;"{32BF}";"";"{f}";
> > "gisogp";"ambiental_topografia_rasters_mdt";"ab_ele";"rast";32161;1;-
> > 1;128;128;t;f;1;"{32BF}";"";"{f}";
> > "gisogp";"ambiental_geologia_rasters_cuadrangulos";"ab_geol_20k";"rast";321
> > 61;1;-1;128;128;t;f;3;"{8BUI,8BUI,8BUI}";"{255,255,255}";"{f,f,f}";
> > 
> > 
> > 
> > The main problem with these rasters is the extremely slow performance in QGIS.
> > 
> > Maybe the problem lies in QGIS and not in postgis raster.
> > 
> > 
> > 
> > gvSIG does not support postgis 2.0 as far as I know.
> > 
> > 
> > 
> > Then, how can I optimize a raster in postgis 2 for display?
> > 
> > 
> > 
> > OS: CentOS 5
> > 
> > PG version: 2.0.2
> > 
> > PSQL vers:  9.2
> > 
> > ---------------------------
> > 
> > Iván Santiago
> > 
> > GIS Specialist
> > 
> > Information Technologies
> > 
> > Office of Management and Budget
> > 
> > 787.725.9420 x 2378
> > 
> > Calle Cruz 254
> > 
> > PO Box 9023228
> > 
> > San Juan, PR 00902-3228
> > 
> > 
> > 
> > -----Original Message-----
> > From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> > bounces at lists.osgeo.org] On Behalf Of Pierre Racine
> > Sent: Monday, February 25, 2013 5:51 PM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] Postgis raster question: how to enable raster type in
> > 2.0
> > 
> > 
> > 
> > rtpostgis.sql if for loading raster definition and function into the database. Not
> > to upgrade.
> > 
> > 
> > 
> > http://postgis.net/docs/manual-
> > dev/postgis_installation.html#create_new_db_extensions
> > <http://postgis.net/docs/manual-
> > dev/postgis_installation.html#create_new_db_extensions>
> > 
> > 
> > 
> > http://postgis.net/docs/manual-dev/postgis_installation.html#upgrading
> > <http://postgis.net/docs/manual-dev/postgis_installation.html#upgrading>
> > 
> > 
> > 
> > Pierre
> > 
> > 
> > 
> > > -----Original Message-----
> > 
> > > From: postgis-users-bounces at lists.osgeo.org <mailto:postgis-users-
> > bounces at lists.osgeo.org>  [mailto:postgis-users-
> > 
> > > bounces at lists.osgeo.org <mailto:bounces at lists.osgeo.org> ] On Behalf Of
> > Ivan Santiago
> > 
> > > Sent: Monday, February 25, 2013 3:22 PM
> > 
> > > To: PostGIS Users Discussion
> > 
> > > Subject: Re: [postgis-users] Postgis raster question: how to enable
> > 
> > > raster type in
> > 
> > > 2.0
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Turns out it raster support was installed.  I made another DB without
> > 
> > > enabling postgis extension which includes raster.
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > I hope that solves the problem. Still need to load a raster to see if this worked.
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Did you load rtpostgis.sql?
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > It looks like rtpostgis.sql is for upgrading postgis. would you
> > 
> > > recommend me to run it?
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > we are on version 2.0.2
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > ---------------------------
> > 
> > > Iván Santiago
> > 
> > > GIS Specialist
> > 
> > > Information Technologies
> > 
> > > Office of Management and Budget
> > 
> > > <https://mail.ogp.gobierno.pr/exchweb/bin/redir.asp?URL=https://mail.o
> > 
> > > gp.go bierno.pr/exchweb/bin/redir.asp?URL=http://www.ogp.gobierno.pr/>
> > 
> > > 787.725.9420 x 2378
> > 
> > > Calle Cruz 254
> > 
> > > PO Box 9023228
> > 
> > > San Juan, PR 00902-3228
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > From: postgis-users-bounces at lists.osgeo.org <mailto:postgis-users-
> > bounces at lists.osgeo.org>  [mailto:postgis-users-
> > 
> > > bounces at lists.osgeo.org <mailto:bounces at lists.osgeo.org> ] On Behalf Of
> > Pierre Racine
> > 
> > > Sent: Monday, February 25, 2013 4:06 PM
> > 
> > > To: PostGIS Users Discussion
> > 
> > > Subject: Re: [postgis-users] Postgis raster question: how to enable
> > 
> > > raster type in
> > 
> > > 2.0
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Did you load rtpostgis.sql?
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Pierre
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > From: postgis-users-bounces at lists.osgeo.org <mailto:postgis-users-
> > bounces at lists.osgeo.org>  [mailto:postgis-users-
> > 
> > > bounces at lists.osgeo.org <mailto:bounces at lists.osgeo.org> ] On Behalf Of
> > Ivan Santiago
> > 
> > > Sent: Monday, February 25, 2013 1:42 PM
> > 
> > > To: postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>
> > 
> > > Subject: [postgis-users] Postgis raster question: how to enable raster
> > 
> > > type in 2.0
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Hello all:
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > We installed postgresql 9.2 and postgis 2.0 in a CentOS 5 virtual server.
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > after running:
> > 
> > >
> > 
> > >  select postgis_full_version();
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > I get the following:
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > >  "POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.8.0, 6
> > 
> > >
> > 
> > >  March 2012" LIBXML="2.7.6" LIBJSON="UNKNOWN""
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Raster does not appear.
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > How can I enable raster data type?
> > 
> > >
> > 
> > >
> > 
> > >
> > 
> > > Thanks in advance.
> > 
> > >
> > 
> > > ---------------------------
> > 
> > > Iván Santiago
> > 
> > > GIS Specialist
> > 
> > > Information Technologies
> > 
> > > Office of Management and Budget
> > 
> > > <https://mail.ogp.gobierno.pr/exchweb/bin/redir.asp?URL=https://mail.o
> > 
> > > gp.go bierno.pr/exchweb/bin/redir.asp?URL=http://www.ogp.gobierno.pr/>
> > 
> > > 787.725.9420 x 2378
> > 
> > > Calle Cruz 254
> > 
> > > PO Box 9023228
> > 
> > > San Juan, PR 00902-3228
> > 
> > >
> > 
> > >
> > 
> > 
> > 
> > _______________________________________________
> > 
> > postgis-users mailing list
> > 
> > postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>
> > 
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> > <http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users>
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130301/adb5caf6/attachment.html>


More information about the postgis-users mailing list