Select to view content in your preferred language

Density output as TIF

1163
4
01-04-2018 12:54 PM
JoshuaTharp
Emerging Contributor

Is it possible to run a density tool in ArcPy and have the result rendered to a TIF file using a chosen rendering settings. Say for example run a kernel density with color ramp green to red and have the output be a TIF file with the chosen density / color ramp?

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

When specifying a filename for raster output to a folder... add *.tif to the filename in the saving path.

0 Kudos
JoshuaTharp
Emerging Contributor

I guess I don't understand the applying color ramp to the tif that is generated. I know this can be applied after adding it to arcmap. I would like to know if it is possible to apply the color ramp to the tif file that is generated.

0 Kudos
DanPatterson_Retired
MVP Emeritus

color ramps are created when you create a 'layer' file via Save to Layer (right-click on the layer in the table of contents, it is there).  

A 'layer file' contains references to the original data plus the symbology used to display it.  Name the layer the same as the raster and then you can reuse the symbology by importing it in the symbology dialog.  

When you export the raster using the density tool... it only contains the density values it doesn't become the pretty colors by default, that is just a helpful gesture on the software part to symbolize it for you, and it doesn't make an RGB raster

0 Kudos
JoshuaTharp
Emerging Contributor

Correct. Right now I am looking for a method of creating a RGB raster. I suppose with a lot of work I could do it manually but ArcMap provides a lot of help for example specifying the # of breaks and calculating the break points.

I haven't seen any programmatic functions similar to this so I am wondering if it is even possible.

Right now I have a application (ArcGIS Runtime 10.2.7) that does not support Raster Renderers (where color ramps would be possible). So I have a wonky workaround where I convert a kernel density to a shape file and then I can apply a Feature Renderer to it in ArcGIS runtime to support the color ramp.

I think we would get better results if the density could be outputted to a image file with the color ramp settings applied.

0 Kudos