DK for Delphi | GisLayerPixel.TGIS_LayerPixel.GenerateRampEx | Overloads | Constructors | Fields | Methods | Properties | Events
Generates a grid ramp from a mapped color array.
// Delphi public procedure GenerateRampEx( const _minValue : Double; const _maxValue : Double; const _colorMap : TGIS_ColorMapArray; const _params : TGIS_ParamsSectionPixel ); overload;
// C++ Builder public: void GenerateRampEx( const double _minValue, const double _maxValue, TGIS_ColorMapArray* const _colorMap, TGIS_ParamsSectionPixel* const _params ) /* overload */;
Name | Type | Description |
---|---|---|
_minValue | Double | minimum value |
_maxValue | Double | maximum value |
_colorMap | TGIS_ColorMapArray | mapped color array |
_params | TGIS_ParamsSectionPixel | parameters to be altered, if nil then a layer parameters will be altered |
Below are a few Python examples of how to apply a specified color ramp to a grid layer.
// pseudocode min_value = grid_layer.MinHeight max_value = grid_layer.MaxHeight // default representation of 'ElevationDark' color ramp color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.ElevationDark) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Continuous, 0, false ) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil) // discrete representation of 'Accent' color ramp with maximum number of colors color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.Accent) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Discrete, -1, false) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil) // reversed continuous representation of 'Spectral' color ramp, get subclass with 3 colors color_ramp = TGIS_Utils.GisColorRampList.ByName(TGIS_ColorRampNames.Spectral) color_map = color_ramp.RealizeColorMap(TGIS_ColorMapMode.Continuous, 3, true) grid_layer.GenerateRampEx(min_value, max_value, color_map, nil)