Package mapnik :: Module _mapnik :: Class RasterColorizer

Class RasterColorizer

 object --+    
          |    
??.instance --+
              |
             RasterColorizer

A Raster Colorizer object.

Instance Methods
 
__init__(...)
__init__( (object)arg1, (ColorizerMode)default_mode, (Color)default_color) -> None :
 
__reduce__(...)
helper for pickle
 
add_stop(...)
add_stop( (RasterColorizer)arg1, (ColorizerStop)ColorizerStop) -> None : Add a colorizer stop to the raster colorizer.
 
get_color(...)
get_color( (RasterColorizer)arg1, (float)arg2) -> Color : Get the color assigned to a certain value in raster data.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __instance_size__ = 32
Properties
  default_color
The default color for stops added without a color (mapnik.Color).
  default_mode
The default mode (mapnik.ColorizerMode).
  epsilon
Comparison epsilon value for exact mode
  stops
The list of stops this RasterColorizer contains

Inherited from object: __class__

Method Details

__init__(...)
(Constructor)

 

__init__( (object)arg1, (ColorizerMode)default_mode, (Color)default_color) -> None :

    C++ signature :
        void __init__(_object*,mapnik::colorizer_mode_enum,mapnik::color)

__init__( (object)arg1) -> None :

    C++ signature :
        void __init__(_object*)

Overrides: object.__init__

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

add_stop(...)

 

add_stop( (RasterColorizer)arg1, (ColorizerStop)ColorizerStop) -> None :
    Add a colorizer stop to the raster colorizer.
    
    Usage:
    >>> colorizer = mapnik.RasterColorizer()
    >>> color = mapnik.Color("#0044cc")
    >>> stop = mapnik.ColorizerStop(3, mapnik.COLORIZER_INHERIT, color)
    >>> colorizer.add_stop(stop)
    

    C++ signature :
        void add_stop(boost::shared_ptr<mapnik::raster_colorizer> {lvalue},mapnik::colorizer_stop {lvalue})

add_stop( (RasterColorizer)arg1, (float)value) -> None :
    Add a colorizer stop to the raster colorizer, using the default mode and color.
    
    Usage:
    >>> default_color = mapnik.Color("#0044cc")
    >>> colorizer = mapnik.RasterColorizer(mapnik.COLORIZER_LINEAR, default_color)
    >>> colorizer.add_stop(100)
    

    C++ signature :
        void add_stop(boost::shared_ptr<mapnik::raster_colorizer> {lvalue},float)

add_stop( (RasterColorizer)arg1, (float)arg2, (Color)value) -> None :
    Add a colorizer stop to the raster colorizer, using the default mode.
    
    Usage:
    >>> default_color = mapnik.Color("#0044cc")
    >>> colorizer = mapnik.RasterColorizer(mapnik.COLORIZER_LINEAR, default_color)
    >>> colorizer.add_stop(100, mapnik.Color("#123456"))
    

    C++ signature :
        void add_stop(boost::shared_ptr<mapnik::raster_colorizer> {lvalue},float,mapnik::color)

add_stop( (RasterColorizer)arg1, (float)arg2, (ColorizerMode)value) -> None :
    Add a colorizer stop to the raster colorizer, using the default color.
    
    Usage:
    >>> default_color = mapnik.Color("#0044cc")
    >>> colorizer = mapnik.RasterColorizer(mapnik.COLORIZER_LINEAR, default_color)
    >>> colorizer.add_stop(100, mapnik.COLORIZER_EXACT)
    

    C++ signature :
        void add_stop(boost::shared_ptr<mapnik::raster_colorizer> {lvalue},float,mapnik::colorizer_mode_enum)

add_stop( (RasterColorizer)arg1, (float)arg2, (ColorizerMode)arg3, (Color)value) -> None :
    Add a colorizer stop to the raster colorizer.
    
    Usage:
    >>> default_color = mapnik.Color("#0044cc")
    >>> colorizer = mapnik.RasterColorizer(mapnik.COLORIZER_LINEAR, default_color)
    >>> colorizer.add_stop(100, mapnik.COLORIZER_DISCRETE, mapnik.Color("#112233"))
    

    C++ signature :
        void add_stop(boost::shared_ptr<mapnik::raster_colorizer> {lvalue},float,mapnik::colorizer_mode_enum,mapnik::color)

get_color(...)

 

get_color( (RasterColorizer)arg1, (float)arg2) -> Color :
    Get the color assigned to a certain value in raster data.
    
    Usage:
    >>> colorizer = mapnik.RasterColorizer()
    >>> color = mapnik.Color("#0044cc")
    >>> colorizer.add_stop(0, mapnik.COLORIZER_DISCRETE, mapnik.Color("#000000"))
    >>> colorizer.add_stop(100, mapnik.COLORIZER_DISCRETE, mapnik.Color("#0E0A06"))
    >>> colorizer.get_color(50)
    Color('#070503')
    

    C++ signature :
        mapnik::color get_color(mapnik::raster_colorizer {lvalue},float)


Property Details

default_color

The default color for stops added without a color (mapnik.Color).

Get Method:
unreachable(...)
Set Method:
unreachable(...)

default_mode

The default mode (mapnik.ColorizerMode).

If a stop is added without a mode, then it will inherit this default mode

Get Method:
unreachable(...)
Set Method:
unreachable(...)

epsilon

Comparison epsilon value for exact mode

When comparing values in exact mode, values need only be within epsilon to match.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

stops

The list of stops this RasterColorizer contains

Get Method:
unreachable(...)