Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using a GeoTiff raster data and trying to classify it. I was wondering what are the techniques that I can use in QGIS to do this?

The raster I have looks like

enter image description here

but I tried the reclassify tool in ArcMap and it looks like this

enter image description here

Now I wish do the similar classification using QGIS and I was able to acheive it by adding 9 entries in the Generate new Color map and clicking classify and applying it to the map. The image looks like this,

enter image description here

I again tried going to the Transparent tab and found that the No data value is -3.4e+38 and then clicked on Apply. Nothing changed. I then selected the Band1 in the Transparent band and then applied and the entire map disappears. Is it possible if I can display it in the same manner as the ArcMap's output?

share|improve this question
    
Is the raster a weather map tile as you have shown, or is it just the red-blue-green overlay? –  Simbamangu Oct 18 '12 at 7:00
    
it is actually a species map –  Sam007 Oct 18 '12 at 21:39

2 Answers 2

Try the following:

  1. Select the identify tab (an arrow with an "i")
  2. Select the black extent box to capture the value
  3. Right-click on your raster layer, select "properties"
  4. In the "Style" tab, select the color map you would like to display, select "Apply"
  5. Move to the "Transparency" tab and add the value you captured in step 2 to the "No Data Value" box and select "apply"

These steps will apply your settings to the layer properties only--they will not be permanent.

If you need to reclassify your raster into discrete steps, try using the raster calculator, here are two links to get you started: GIS.se & GIS.se2 . Also, check out the 1-band raster color table for a different color ramp.

share|improve this answer
    
ok so i tried to do the following. I did change the colormap but the problem is that there are quite a bit of varying values. Is there some way the properties color tab can import them from the raster layer? I did try to load colormap from the band but it failed saying, The color map for the band 1 failed to load. There is only one band in the raster. –  Sam007 Oct 18 '12 at 2:31
1  
@Sam007 Post edited to address comments –  Aaron Oct 18 '12 at 3:38
    
When I go to the transparency tab, the value that I need to copy and paste in the No data value is already present and when I click apply everything disappears. Everything goes white. Any idea why?? –  Sam007 Oct 25 '12 at 16:30
    
Also I tried to install the raster calculator, but I am receiving the following error, Couldn't import Python module 'pyparsing'. Without it you won't be able to run RasterCalc. –  Sam007 Oct 25 '12 at 16:39
    
I think I see your problem now--it looks like your raster dataset is binary, or consisting of two values. When you set the "black" to transparent the "white" blends in with the background. Try setting the white to a different color. By the way, if your raster is in fact binary, you will not be able to produce the color gradient like you see in the second image. –  Aaron Oct 25 '12 at 17:04

Finally I found the best way to create the raster classification. I understand that I did not provide the fact in the question that after I reclassify the raster I required it to be added to the Geoserver and viewed on an application. The above raster classification works fine but the problem was that it losses it's original data and acquires the newly assigned value. This defeats my purpose as I do not wish to change the pixel values or the data in the raster.

Therefore I found the means of creating SLD raster symbolizer and assigning it to the raster that has been added to the Geoserver in it's raw form. This is the documentation of creating the SLD for raster symbolizer.

share|improve this answer
    
whoa downvoted why? –  Sam007 Nov 29 '12 at 19:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.