TAXNWRD Legend

498 views
Skip to first unread message

Salvator Mwaminifu

unread,
Jan 14, 2018, 12:59:16 PM1/14/18
to Global Soil Information
Dear Hengl

I am trying to classify the soils of a watershed as part of my master's thesis, but unfortunately I am stuck. I'm trying to classify through QGIS 2.18 and I'm going through the peusocolor with signle-band style, 5-class with RdylGn as I saw you were doing in the ISRIC 6 soilgrids250m tutorial presentation session. I got classes with labels 1; 16.5; 32; 42.7; 63 but the respetive color codes I receive such as # d7191c, # fdae61, # ffffc0, # a6d96a, # 1a9641 do not match the color codes shown in the legend you gave us in the file "Soilgrids250m_TAXNWRB_legend_June_2017" fand I was blocked now from many days . I also tried to use the PCT to RGB conversion tool from GDAL in QGis (Raster-Conversion-Convert-PCT to RGB) but I get an error message  using the TAXNWRD_250 m file imported into QGIS. I receive this error message and ask you to help me even if you have already spoken a lot of legend. You will find attached a screenshot of what I get

ERROR 5: E: \ SOILS \ SOIL GRID \ TAXNWRB_250m (5) .tif: GDALDataset :: GetRasterBand (63) - Illegal band #

Traceback (most recent call last):
File "C: \ PROGRA ~ 1 \ QGIS2 ~ 1.18 \ bin \ pct2rgb.py", line 119, in
ct = src_band.GetRasterColorTable ()
AttributeError: 'NoneType' object has no attribute 'GetRasterColorTable'classify
Capture-legend.PNG

Ulanbek Turdukulov

unread,
Jan 18, 2018, 7:57:04 AM1/18/18
to Global Soil Information

Dear Salvator,

 

Let me try to help you with this. If you want to apply colour scheme such as one here (ftp://ftp.soilgrids.org/data/recent/SoilGrids250m_TAXNWRB_legend_June_2016.pdf ) you might have easier option in QGIS.  In QGIS you can load an external style to your layer (i.e., colour schemes).


To do so, on SoilGrids ftp site, you will find “legends” subfolder: ftp://ftp.soilgrids.org/legends/. To apply TAXNWRB  colour scheme in QGIS, you could  download QGIS styling file: ftp://ftp.soilgrids.org/legends/TAXNWRB.qml and in the properties of your layer select:


Tiff Layer Properties->Styles->Load from file and select the downloaded .qml file. In this way you will get legend as described in ftp://ftp.soilgrids.org/data/recent/SoilGrids250m_TAXNWRB_legend_June_2016.pdf.


Hope it helps with your thesis,

 

Regards,

Ulan

Tomislav Hengl

unread,
Jan 22, 2018, 4:50:03 AM1/22/18
to Global Soil Information


On Sunday, January 14, 2018 at 6:59:16 PM UTC+1, Salvator Mwaminifu wrote:

Salvator Mwaminifu

unread,
Jan 26, 2018, 4:50:16 AM1/26/18
to Global Soil Information
Dear Hengl

Thank you a lot. I am applying the solution that you propose to me, I will come back to you as soon as possible to tell you my result. Again, thank you very much
Reply all
Reply to author
Forward
0 new messages