Importing GRASS Color file into ArcGIS
I'm trying to recreate a color file for some raster files. I have a color file from GRASS that is basically a list of value ranges with associated RGB codes.
I need to use this for several rasters (one for each month) and I'm looking for a simple way to do this instead of re-creating it every time. I've tried making unique values, but it won't let me create a colormap (option grayed out). I've tried copying in the symbolagy from one month, but the values are different from month to month, and I can't figure out how to get the other months in there.
Is there any way I can do this where I have what is similar to an arc/info Lookup table...?
Mapping Center Answer:
Because you want to apply the same symbology to different rasters that will have different values, using a color map will be the best option. However, because your data is 32-bit, the color map option is grayed out for you. Color maps can only be created for single-band raster datasets with a pixel depth of 16-bit unsigned or less.
So, you need to convert your grids into 16-bit unsigned data.
But that’s not your only problem – there are two more things you need to fix, and one additional step that we recommend you take.
First, your colormap file cannot have negative values and your first value is -999. So you will either need to make this NoData, which is NOT a negative value, or you will need to assign it some positive value (which I would not recommend). If your data do not contain any values of -999 then the solution is easy – simply delete this row from the colormap file.
Second, you need to understand that there must be a row in the colormap file for a ALL possible values. (This is different from the format of the colormap files we used way back when with Workstation ArcInfo). Although you used to be able to indicate ranges of values, and indeed the colormap file you got from GRASS does the same thing, you have to create a new colormap file that has all the values. So you need to add the missing values.
BUT before you do that, we recommend that you convert the units of the raster values. They are currently in hundredths of mm, so if you divide by 100 to get mm, then the number of missing values that you have to add to the colormap decreases by a factor of 100.
For example, the data for August range in values from 2462 hundredths of mm to 5911 hundredths of mm. If you divide these values by 100, your range is now from 24mm to 59mm, and you only have to fill in any missing values from 24 to 59. Thsi is much easier and faster than filling in missing values from 2462 to 5911.
For example, you could use Notepad to fill in missing values. Or you can create a custom color map file in the Layer Properties dialog box when you are setting the symbology for the raster.
Once the colormap file is created, you can apply it to a raster using the Add Colormap tool.
You can automate the process of converting to 16-bit unsigned integer and applying the colormap file using model builder iterators or in Python.
If you would like to post a comment, please login.