Package mapnik :: Module _mapnik

Module _mapnik

Classes
  BuildingSymbolizer
  CharProperties
  ColorizerMode
  ColorizerStop
  ColorizerStops
A RasterColorizer's collection of ordered color stops.
  CompositeOp
  Context
  DataGeometryType
  DataType
  DatasourceCache
  ExpressionSet
  Feature
  Featureset
  FontEngine
  FontSet
  FormattingExpressionFormat
  FormattingFormat
  FormattingList
  FormattingNode
  FormattingText
  Geometry2d
  GeometryType
  Grid
This class represents a feature hitgrid.
  GridView
This class represents a feature hitgrid subset.
  Image
This class represents a 32 bit RGBA image.
  ImageView
A view into an image.
  LabelCollisionDetector
Object to detect collisions between labels, used in the rendering process.
  Layer
A Mapnik map layer.
  Layers
  LinePatternSymbolizer
  LineSymbolizer
  Map
The map object.
  MarkersSymbolizer
  MemoryDatasource
  Names
  Palette
  Parameter
  Parameters
  Path
  PointSymbolizer
  PolygonPatternSymbolizer
  PolygonSymbolizer
  ProjTransform
  Query
a spatial query data object
  RasterColorizer
A Raster Colorizer object.
  RasterSymbolizer
  Rule
  Rules
  ShieldSymbolizer
  Singleton
  Stroke
  Style
  Symbolizer
  TextPlacementInfo
  TextPlacements
  TextSymbolizerProperties
  ViewTransform
  aspect_fix_mode
  filter_mode
  gamma_method
  horizontal_alignment
  justify_alignment
  label_placement
  line_cap
The possible values for a line cap used when drawing with a stroke.
  line_join
The possible values for the line joining mode when drawing with a stroke.
  line_rasterizer
  logger
  marker_placement
  pattern_alignment
  point_placement
  scaling_method
  severity_type
  text_transform
  vertical_alignment
  wkbByteOrder
Functions
 
CreateDatasource(...)
CreateDatasource( (dict)arg1) -> Datasource :
 
Expression(...)
Expression( (str)expr) -> Expression : Expression string
 
PathExpression(...)
PathExpression( (str)expr) -> PathExpression : PathExpression string
None :
clear_cache()
Clear all global caches of markers and mapped memory regions.
 
forward_(...)
forward_( (Coord)arg1, (Projection)arg2) -> Coord :
bool :
has_cairo()
Get cairo library status
bool :
has_jpeg()
Get jpeg read/write support status
bool :
has_pycairo()
Get pycairo module status
 
inverse_(...)
inverse_( (Coord)arg1, (Projection)arg2) -> Coord :
 
load_map(...)
load_map( (Map)arg1, (str)arg2 [, (bool)arg3]) -> None :
 
load_map_from_string(...)
load_map_from_string( (Map)arg1, (str)arg2 [, (bool)arg3 [, (str)arg4]]) -> None :
int :
mapnik_version()
Get the Mapnik version number
str :
mapnik_version_string()
Get the Mapnik version string
 
render(...)
render( (Map)arg1, (Image)arg2 [, (float)arg3 [, (int)arg4 [, (int)arg5]]]) -> None :
 
render_grid(...)
render_grid( (Map)map, (int)layer [, (str)key='__id__' [, (int)resolution=4 [, (list)fields=[]]]]) -> dict :
 
render_layer(...)
render_layer( (Map)map, (Image)image, (int)layer) -> None :
 
render_tile_to_file(...)
render_tile_to_file( (Map)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (str)arg7) -> None :
 
render_to_file(...)
render_to_file( (Map)arg1, (str)arg2, (str)arg3) -> None :
 
render_with_detector(...)
render_with_detector( (Map)arg1, (Image)arg2, (LabelCollisionDetector)arg3 [, (float)arg4 [, (int)arg5 [, (int)arg6]]]) -> None :
 
save_map(...)
save_map( (Map)arg1, (str)arg2 [, (bool)arg3]) -> None :
 
save_map_to_string(...)
save_map_to_string( (Map)arg1 [, (bool)arg2]) -> str :
 
scale_denominator(...)
scale_denominator( (Map)arg1, (bool)arg2) -> float :
Variables
  COLORIZER_DISCRETE = mapnik._mapnik.ColorizerMode.COLORIZER_DI...
  COLORIZER_EXACT = mapnik._mapnik.ColorizerMode.COLORIZER_EXACT
  COLORIZER_INHERIT = mapnik._mapnik.ColorizerMode.COLORIZER_INH...
  COLORIZER_LINEAR = mapnik._mapnik.ColorizerMode.COLORIZER_LINEAR
  __package__ = None
Function Details

CreateDatasource(...)

 

CreateDatasource( (dict)arg1) -> Datasource :

    C++ signature :
        boost::shared_ptr<mapnik::datasource> CreateDatasource(boost::python::dict)

Expression(...)

 

Expression( (str)expr) -> Expression :
    Expression string

    C++ signature :
        boost::shared_ptr<boost::variant<mapnik::value_adl_barrier::value, mapnik::attribute, mapnik::geometry_type_attribute, boost::recursive_wrapper<mapnik::unary_node<mapnik::tags::negate> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::plus> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::minus> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::mult> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::div> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::mod> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::less> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::less_equal> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::greater> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::greater_equal> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::equal_to> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::not_equal_to> >, boost::recursive_wrapper<mapnik::unary_node<mapnik::tags::logical_not> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::logical_and> >, boost::recursive_wrapper<mapnik::binary_node<mapnik::tags::logical_or> >, boost::recursive_wrapper<mapnik::regex_match_node>, boost::recursive_wrapper<mapnik::regex_replace_node> > > Expression(std::string)

PathExpression(...)

 

PathExpression( (str)expr) -> PathExpression :
    PathExpression string

    C++ signature :
        boost::shared_ptr<std::vector<boost::variant<std::string, mapnik::attribute, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>, std::allocator<boost::variant<std::string, mapnik::attribute, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> > > > PathExpression(std::string)

clear_cache()

 
    Clear all global caches of markers and mapped memory regions.
    
    Usage:
    >>> from mapnik import clear_cache
    >>> clear_cache()
    

    C++ signature :
        void clear_cache()

Returns: None :

forward_(...)

 

forward_( (Coord)arg1, (Projection)arg2) -> Coord :

    C++ signature :
        mapnik::coord<double, 2> forward_(mapnik::coord<double, 2>,mapnik::projection)

forward_( (Box2d)arg1, (Projection)arg2) -> Box2d :

    C++ signature :
        mapnik::box2d<double> forward_(mapnik::box2d<double>,mapnik::projection)

has_cairo()

 
    Get cairo library status

    C++ signature :
        bool has_cairo()

Returns: bool :

has_jpeg()

 
    Get jpeg read/write support status

    C++ signature :
        bool has_jpeg()

Returns: bool :

has_pycairo()

 
    Get pycairo module status

    C++ signature :
        bool has_pycairo()

Returns: bool :

inverse_(...)

 

inverse_( (Coord)arg1, (Projection)arg2) -> Coord :

    C++ signature :
        mapnik::coord<double, 2> inverse_(mapnik::coord<double, 2>,mapnik::projection)

inverse_( (Box2d)arg1, (Projection)arg2) -> Box2d :

    C++ signature :
        mapnik::box2d<double> inverse_(mapnik::box2d<double>,mapnik::projection)

load_map(...)

 

load_map( (Map)arg1, (str)arg2 [, (bool)arg3]) -> None :

    C++ signature :
        void load_map(mapnik::Map {lvalue},std::string [,bool])

load_map_from_string(...)

 

load_map_from_string( (Map)arg1, (str)arg2 [, (bool)arg3 [, (str)arg4]]) -> None :

    C++ signature :
        void load_map_from_string(mapnik::Map {lvalue},std::string [,bool [,std::string]])

mapnik_version()

 
    Get the Mapnik version number

    C++ signature :
        unsigned int mapnik_version()

Returns: int :

mapnik_version_string()

 
    Get the Mapnik version string

    C++ signature :
        std::string mapnik_version_string()

Returns: str :

render(...)

 

render( (Map)arg1, (Image)arg2 [, (float)arg3 [, (int)arg4 [, (int)arg5]]]) -> None :
    
    Render Map to an AGG image_32 using offsets
    
    Usage:
    >>> from mapnik import Map, Image, render, load_map
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> im = Image(m.width,m.height)
    >>> scale_factor=2.0
    >>> offset = [100,50]
    >>> render(m,im)
    >>> render(m,im,scale_factor)
    >>> render(m,im,scale_factor,offset[0],offset[1])
    
    

    C++ signature :
        void render(mapnik::Map,mapnik::image_32 {lvalue} [,double [,unsigned int [,unsigned int]]])

render( (Map)arg1, (object)arg2, (float)arg3, (int)arg4, (int)arg5) -> None :
    
    Render Map to Cairo Surface using offsets
    
    Usage:
    >>> from mapnik import Map, render, load_map
    >>> from cairo import SVGSurface
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> surface = SVGSurface('image.svg', m.width, m.height)
    >>> render(m,surface,1,1)
    
    

    C++ signature :
        void render(mapnik::Map,PycairoSurface*,double,unsigned int,unsigned int)

render( (Map)arg1, (object)arg2) -> None :
    
    Render Map to Cairo Surface
    
    Usage:
    >>> from mapnik import Map, render, load_map
    >>> from cairo import SVGSurface
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> surface = SVGSurface('image.svg', m.width, m.height)
    >>> render(m,surface)
    
    

    C++ signature :
        void render(mapnik::Map,PycairoSurface*)

render( (Map)arg1, (object)arg2, (float)arg3, (int)arg4, (int)arg5) -> None :
    
    Render Map to Cairo Context using offsets
    
    Usage:
    >>> from mapnik import Map, render, load_map
    >>> from cairo import SVGSurface, Context
    >>> surface = SVGSurface('image.svg', m.width, m.height)
    >>> ctx = Context(surface)
    >>> load_map(m,'mapfile.xml')
    >>> render(m,context,1,1)
    
    

    C++ signature :
        void render(mapnik::Map,PycairoContext*,double,unsigned int,unsigned int)

render( (Map)arg1, (object)arg2) -> None :
    
    Render Map to Cairo Context
    
    Usage:
    >>> from mapnik import Map, render, load_map
    >>> from cairo import SVGSurface, Context
    >>> surface = SVGSurface('image.svg', m.width, m.height)
    >>> ctx = Context(surface)
    >>> load_map(m,'mapfile.xml')
    >>> render(m,context)
    
    

    C++ signature :
        void render(mapnik::Map,PycairoContext*)

render_grid(...)

 

render_grid( (Map)map, (int)layer [, (str)key='__id__' [, (int)resolution=4 [, (list)fields=[]]]]) -> dict :

    C++ signature :
        boost::python::dict render_grid(mapnik::Map,unsigned int [,std::string='__id__' [,unsigned int=4 [,boost::python::list=[]]]])

render_layer(...)

 

render_layer( (Map)map, (Image)image, (int)layer) -> None :

    C++ signature :
        void render_layer(mapnik::Map,mapnik::image_32 {lvalue},unsigned int)

render_layer( (Map)map, (Grid)grid, (int)layer [, (list)fields=[]]) -> None :

    C++ signature :
        void render_layer(mapnik::Map,mapnik::hit_grid<int> {lvalue},unsigned int [,boost::python::list=[]])

render_tile_to_file(...)

 

render_tile_to_file( (Map)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (str)arg7) -> None :
    
    TODO
    
    

    C++ signature :
        void render_tile_to_file(mapnik::Map,unsigned int,unsigned int,unsigned int,unsigned int,std::string,std::string)

render_to_file(...)

 

render_to_file( (Map)arg1, (str)arg2, (str)arg3) -> None :
    
    Render Map to file using explicit image type.
    
    Usage:
    >>> from mapnik import Map, render_to_file, load_map
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> render_to_file(m,'image32bit.png','png')
    
    8 bit (paletted) PNG can be requested with 'png256':
    >>> render_to_file(m,'8bit_image.png','png256')
    
    JPEG quality can be controlled by adding a suffix to
    'jpeg' between 0 and 100 (default is 85):
    >>> render_to_file(m,'top_quality.jpeg','jpeg100')
    >>> render_to_file(m,'medium_quality.jpeg','jpeg50')
    

    C++ signature :
        void render_to_file(mapnik::Map,std::string,std::string)

render_to_file( (Map)arg1, (str)arg2) -> None :
    
    Render Map to file (type taken from file extension)
    
    Usage:
    >>> from mapnik import Map, render_to_file, load_map
    >>> m = Map(256,256)
    >>> render_to_file(m,'image.jpeg')
    
    

    C++ signature :
        void render_to_file(mapnik::Map,std::string)

render_to_file( (Map)arg1, (str)arg2, (str)arg3, (float)arg4) -> None :
    
    Render Map to file using explicit image type and scale factor.
    
    Usage:
    >>> from mapnik import Map, render_to_file, load_map
    >>> m = Map(256,256)
    >>> scale_factor = 4
    >>> render_to_file(m,'image.jpeg',scale_factor)
    
    

    C++ signature :
        void render_to_file(mapnik::Map,std::string,std::string,double)

render_with_detector(...)

 

render_with_detector( (Map)arg1, (Image)arg2, (LabelCollisionDetector)arg3 [, (float)arg4 [, (int)arg5 [, (int)arg6]]]) -> None :
    
    Render Map to an AGG image_32 using a pre-constructed detector.
    
    Usage:
    >>> from mapnik import Map, Image, LabelCollisionDetector, render_with_detector, load_map
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> im = Image(m.width,m.height)
    >>> detector = LabelCollisionDetector(m)
    >>> render_with_detector(m, im, detector)
    

    C++ signature :
        void render_with_detector(mapnik::Map,mapnik::image_32 {lvalue},boost::shared_ptr<mapnik::label_collision_detector4> [,double [,unsigned int [,unsigned int]]])

save_map(...)

 

save_map( (Map)arg1, (str)arg2 [, (bool)arg3]) -> None :

    C++ signature :
        void save_map(mapnik::Map,std::string [,bool])

save_map_to_string(...)

 

save_map_to_string( (Map)arg1 [, (bool)arg2]) -> str :

    C++ signature :
        std::string save_map_to_string(mapnik::Map [,bool])

scale_denominator(...)

 

scale_denominator( (Map)arg1, (bool)arg2) -> float :
    
    Return the Map Scale Denominator.
    Also available as Map.scale_denominator()
    
    Usage:
    
    >>> from mapnik import Map, Projection, scale_denominator, load_map
    >>> m = Map(256,256)
    >>> load_map(m,'mapfile.xml')
    >>> scale_denominator(m,Projection(m.srs).geographic)
    
    

    C++ signature :
        double scale_denominator(mapnik::Map,bool)


Variables Details

COLORIZER_DISCRETE

Value:
mapnik._mapnik.ColorizerMode.COLORIZER_DISCRETE

COLORIZER_INHERIT

Value:
mapnik._mapnik.ColorizerMode.COLORIZER_INHERIT