Saturday, 16 January 2016

Loading GeoTiff with specified color band from ArcGIS to QGIS?


I have just started experimenting with QGIS. I have a GeoTIFF that I loaded in QGIS and used Singleband psuedocolor to create nice color codings for the map. However, my employer has specific colorband stored in his computer that he wants me to use. I don't know how can I export his specific colorband from ArcGIS and use it in my QGIS.


So far, I tried using the .clr file, but it didn't help me out.



Answer



It should be simple to convert the file as the formats are very similar. An ArcGIS .clr file is a space delimited text file where each line takes the form:


INDEX R G B

Example:


1 255 255 0
2 64 0 128

3 255 32 32
4 0 255 0
5 0 0 255

A QGIS colour map file is similar but takes the form:


INDEX R G B ALPHA INDEX

Example:


0 247 251 255 255 0
1 247 251 255 255 1

2 246 251 255 255 2
4 245 250 255 255 4

You could make the ArcGIS .clr compatible with QGIS by adding an alpha value of 255 and the input index for each entry.


References:


Arcgis: http://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/creating-a-color-map-clr-file.htm


Qgis: Exporting a colour map file and comparing


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...