[Qgis-user] QGIS- How to render a raster using a field other than Value [SEC=UNCLASSIFIED]

Paulo van Breugel p.vanbreugel at gmail.com
Fri Oct 30 02:19:11 PDT 2015


I guess what you are referring to is that in ArcGIS you can link 
attribute tables to rasters, and subsequently use any column to define 
the legend. There have been feature requests for this in QGIS, but it 
has not been implemented yet as far as I know.

It is however fairly easy to define the legend (color and labels) for a 
raster using a QGIS colour file. This is a simple comma delimited value 
(csv) file with raster id, R, G, B color values and label. One option is 
to have an spreadsheet with your attribute tables and generate the color 
files text file, which you can then load in QGIS, as described here 
(https://pvanb.wordpress.com/2014/02/05/creating-a-qgis-color-map-from-text-file/). 
Obviously you can achieve the same using different tools, e..g, R.

Regards

Paulo

On 30-10-15 01:02, Inna Nogeste wrote:
>
> Thanks Damien,
>
> For the purposes of the product that I'm working on the preference is 
> for the data to be maintained as a raster.
>
> I've been using QGIS to test cartographic design and Map Server export 
> (plugin) functionalities. It's worked fine for the data I've been 
> given and what I've wanted to achieve except for the land use raster. 
> I've needed to use ArcMap for the landuse raster data.
>
> The MapServer plugin isn't working in QGIS 2.10 Pisa but was working 
> in QGIS 2.8.
>
> Regards,
>
> Inna
>
> (I've removed your screen grab from an earlier email as I keep on 
> getting messages saying that this message is too big for this listing 
> so don’t know if any of the QGIS developers have seen this query).
>
> *From:*Damien Stephens [mailto:Damien.Stephens at sandfire.com.au]
> *Sent:* Wednesday, 28 October 2015 6:18 PM
> *To:* Inna Nogeste
> *Cc:* qgis-user at lists.osgeo.org
> *Subject:* RE: QGIS- How to render a raster using a field other than 
> Value [SEC=UNCLASSIFIED]
>
> At this point my only suggestion is to convert the raster to polygons. 
> Hopefully the text is maintained.
>
> Could you send a clipped version of the raster to confirm?
>
> Thanks
>
> damien
>
> *From:*Inna Nogeste [mailto:I.Nogeste at bom.gov.au] 
> <mailto:[mailto:I.Nogeste at bom.gov.au]>
> *Sent:* Wednesday, 28 October 2015 2:29 PM
> *To:* Damien Stephens; qgis-user at lists.osgeo.org 
> <mailto:qgis-user at lists.osgeo.org>
> *Subject:* RE: QGIS- How to render a raster using a field other than 
> Value [SEC=UNCLASSIFIED]
>
> Thanks for the suggestion. I've looked at it. Band = Band 1 (Gray) and 
> there is no option to select a field or even input Values.
>
> It would be good if QGIS could have the option of selecting a field to 
> symbolise as this would be useful in raster data such as land use.
>
> Inna
>
> *From:*Damien Stephens [mailto:Damien.Stephens at sandfire.com.au]
> *Sent:* Tuesday, 27 October 2015 12:08 PM
> *To:* Inna Nogeste; qgis-user at lists.osgeo.org 
> <mailto:qgis-user at lists.osgeo.org>
> *Subject:* RE: QGIS- How to render a raster using a field other than 
> Value [SEC=UNCLASSIFIED]
>
> Ah ok the text field may cause a problem.
>
> I don’t have any rasters with text values to test. What happens when 
> you  try the paletted render type with text in the band rendering tab 
> on the layer properties dialogue?
>
> Cheers
>
> Damien
>
> *From:*Inna Nogeste [mailto:I.Nogeste at bom.gov.au] 
> <mailto:[mailto:I.Nogeste at bom.gov.au]>
> *Sent:* Tuesday, 27 October 2015 7:34 AM
> *To:* Damien Stephens; qgis-user at lists.osgeo.org 
> <mailto:qgis-user at lists.osgeo.org>
> *Subject:* RE: QGIS- How to render a raster using a field other than 
> Value [SEC=UNCLASSIFIED]
>
> Hi Damien,
>
> Thanks for your reply.
>
> I am working with land use raster data which only has 1 band.
>
> The values in the Value field have been attributed to a landuse (as a 
> text attribute) in a newly created field which is what I want 
> symbolise. In ESRI ArcMap, I can select whatever Value Field I want 
> from a drop down list of fields in the raster data. It would be good 
> to have a similar function in QGIS.
>
> Inna
>
> *From:*Damien Stephens [mailto:Damien.Stephens at sandfire.com.au] 
> <mailto:[mailto:Damien.Stephens at sandfire.com.au]>
> *Sent:* Wednesday, 14 October 2015 6:37 PM
> *To:* Inna Nogeste; qgis-user at lists.osgeo.org 
> <mailto:qgis-user at lists.osgeo.org>
> *Subject:* RE: QGIS- How to render a raster using a field other than 
> Value [SEC=UNCLASSIFIED]
>
> If your raster has more than one value field (band)  it should be 
> pretty simple. The band rendering tab on the layer properties dialog 
> lets you chose the band to colour.
>
> In the attached screen grab I have chosen band 1 using a singleband 
> pseudocolour render.
>
> Hope that helps.
>
> *From:*Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] 
> <mailto:[mailto:qgis-user-bounces at lists.osgeo.org]> *On Behalf Of 
> *Inna Nogeste
> *Sent:* Wednesday, 14 October 2015 2:13 PM
> *To:* qgis-user at lists.osgeo.org <mailto:qgis-user at lists.osgeo.org>
> *Subject:* [Qgis-user] QGIS- How to render a raster using a field 
> other than Value [SEC=UNCLASSIFIED]
>
> I would like to render my raster using a field that is not the Value 
> field. Is it possible to do this in QGIS? This is easily done in ESRI 
> ArcMap.
>
> I have access to both QGIS 2.10 and QGIS 2.8.
>
> Regards,
>
> Inna Nogeste | Spatial Information Specialist
>
> Environmental Information Management
>
> Data Management
> Geospatial Data and Access Unit
>
> Bureau of Meteorology
> www.bom.gov.au <http://www.bom.gov.au/>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151030/e4783c38/attachment.html>


More information about the Qgis-user mailing list