Colorization Based Elevation

369
2
04-24-2020 02:54 PM
BradDuBois
New Contributor II

I want to be able to color the map according to elevation relative to an altitude.  I am having trouble finding an example. Hopefully someone here can point me in the right direction.   The attached image shows some colorization levels relative to the altitude of an aircraft on approach, red is at or above current aircraft levels and the other colors at lower and lower thresholds.

How can I use the terrain data to achieve similar colorization using the ArcGIS Qt C++ SDK? I need to do it on a 2D as well as a 3D map.

Any and all help is much appreciated!

Thanks!

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

Yes, you should be able to do this. I think a ColormapRenderer applied to a RasterLayer might be the best option. Check out this sample - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/Layers/RasterColormapRenderer at master · Es... 

The idea is that you map pixel values in the raster to a specific color. In our sample, anything over 150 is red and under is yellow.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Depending on your data, you might look at either the StretchRenderer (StretchRenderer Class | ArcGIS for Developers ) or applying a RasterFunction (Add raster data—ArcGIS Runtime SDK for Qt | ArcGIS for Developers )

The ColorRamp may work but may be better suited for discrete data vs continuous elevation data.

0 Kudos