[postgis-users] Applying symbology to a raster

Pierre LACROIX piotrlacroix at gmail.com
Fri Apr 5 11:53:36 PDT 2013


Thank you so much for your reply.

QGIS is able to get the min and max values (Layer properties > Style).
ST_SummaryStats is able to display the min and max values and other type of
information.
If I clip the raster to a TIFF file then ArcGIS is able to get the colormap
and to display the TIFF with a color ramp.

However, applying grayscale, colormap or pseudocolor styles from QGIS does
not work: the raster is still completely grey (or whatever color you
choose).
Moreover, from the layer properties in QGIS the functions from the
"colormap" tab are not accessible (they are greyed).

It might be a QGIS problem. I will try to post the issue to the QGIS
community, but I am keen on receiving more answers from PostGIS users who
have encountered the same issue. In particular, I would be interested in
knowing more about first classifying the data before applying a color ramp:
if that is a solution, how do we do that?



2013/4/5 Pierre Racine <Pierre.Racine at sbf.ulaval.ca>

> Normally you should be able to apply a color ramp to a PostGIS raster the
> same way you can apply a color ramp to any other raster. This is not a
> PostGIS problem. It is a QGIS problem.
>
> Pierre
>
> > -----Original Message-----
> > From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> > bounces at lists.osgeo.org] On Behalf Of Pietro Wadeci
> > Sent: Friday, April 05, 2013 5:28 AM
> > To: postgis-users at lists.osgeo.org
> > Subject: [postgis-users] Applying symbology to a raster
> >
> > Hi,
> >
> > I have loaded a digital elevation model into PostGIS with the command
> line:
> > raster2pgsql -s 4326 -I -C -M -N -32768 C:/temp/myDEM.tif dem | psql -h
> > localhost -d myDB -U postgres
> >
> > I have also tested the QGIS 1.8 raster loader.
> >
> > In both cases the raster has been loaded correctly. I can see it in
> QGIS, I can clip
> > it, generate contours, and apply other functions.
> > There is one band (16BSI).
> >
> >
> > However, I do not manage to apply a symbology in QGIS, e.g. a color
> ramp. How
> > should I do? Did I miss a step?
> >
> > Thanks for your reply.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130405/e60a818b/attachment.html>


More information about the postgis-users mailing list