# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.4.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _mapscript
else:
    import _mapscript

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class intarray(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, nelements):
        _mapscript.intarray_swiginit(self, _mapscript.new_intarray(nelements))
    __swig_destroy__ = _mapscript.delete_intarray

    def __getitem__(self, index):
        return _mapscript.intarray___getitem__(self, index)

    def __setitem__(self, index, value):
        return _mapscript.intarray___setitem__(self, index, value)

    def cast(self):
        return _mapscript.intarray_cast(self)

    @staticmethod
    def frompointer(t):
        return _mapscript.intarray_frompointer(t)

# Register intarray in _mapscript:
_mapscript.intarray_swigregister(intarray)

MapServerError = _mapscript.MapServerError
MapServerChildError = _mapscript.MapServerChildError

MS_TRUE = _mapscript.MS_TRUE
MS_FALSE = _mapscript.MS_FALSE
MS_UNKNOWN = _mapscript.MS_UNKNOWN
MS_ON = _mapscript.MS_ON
MS_OFF = _mapscript.MS_OFF
MS_DEFAULT = _mapscript.MS_DEFAULT
MS_EMBED = _mapscript.MS_EMBED
MS_DELETE = _mapscript.MS_DELETE
MS_YES = _mapscript.MS_YES
MS_NO = _mapscript.MS_NO
MS_LAYER_ALLOCSIZE = _mapscript.MS_LAYER_ALLOCSIZE
MS_CLASS_ALLOCSIZE = _mapscript.MS_CLASS_ALLOCSIZE
MS_STYLE_ALLOCSIZE = _mapscript.MS_STYLE_ALLOCSIZE
MS_LABEL_ALLOCSIZE = _mapscript.MS_LABEL_ALLOCSIZE
MS_MAX_LABEL_PRIORITY = _mapscript.MS_MAX_LABEL_PRIORITY
MS_MAX_LABEL_FONTS = _mapscript.MS_MAX_LABEL_FONTS
MS_DEFAULT_LABEL_PRIORITY = _mapscript.MS_DEFAULT_LABEL_PRIORITY
MS_LABEL_FORCE_GROUP = _mapscript.MS_LABEL_FORCE_GROUP
MS_RENDER_WITH_SWF = _mapscript.MS_RENDER_WITH_SWF
MS_RENDER_WITH_RAWDATA = _mapscript.MS_RENDER_WITH_RAWDATA
MS_RENDER_WITH_IMAGEMAP = _mapscript.MS_RENDER_WITH_IMAGEMAP
MS_RENDER_WITH_TEMPLATE = _mapscript.MS_RENDER_WITH_TEMPLATE
MS_RENDER_WITH_OGR = _mapscript.MS_RENDER_WITH_OGR
MS_RENDER_WITH_PLUGIN = _mapscript.MS_RENDER_WITH_PLUGIN
MS_RENDER_WITH_CAIRO_RASTER = _mapscript.MS_RENDER_WITH_CAIRO_RASTER
MS_RENDER_WITH_CAIRO_PDF = _mapscript.MS_RENDER_WITH_CAIRO_PDF
MS_RENDER_WITH_CAIRO_SVG = _mapscript.MS_RENDER_WITH_CAIRO_SVG
MS_RENDER_WITH_OGL = _mapscript.MS_RENDER_WITH_OGL
MS_RENDER_WITH_AGG = _mapscript.MS_RENDER_WITH_AGG
MS_RENDER_WITH_KML = _mapscript.MS_RENDER_WITH_KML
MS_RENDER_WITH_UTFGRID = _mapscript.MS_RENDER_WITH_UTFGRID
MS_RENDER_WITH_MVT = _mapscript.MS_RENDER_WITH_MVT
MS_NUM_CHECK_NONE = _mapscript.MS_NUM_CHECK_NONE
MS_NUM_CHECK_RANGE = _mapscript.MS_NUM_CHECK_RANGE
MS_NUM_CHECK_GT = _mapscript.MS_NUM_CHECK_GT
MS_NUM_CHECK_GTE = _mapscript.MS_NUM_CHECK_GTE
MS_FILE_MAP = _mapscript.MS_FILE_MAP
MS_FILE_SYMBOL = _mapscript.MS_FILE_SYMBOL
MS_INCHES = _mapscript.MS_INCHES
MS_FEET = _mapscript.MS_FEET
MS_MILES = _mapscript.MS_MILES
MS_METERS = _mapscript.MS_METERS
MS_KILOMETERS = _mapscript.MS_KILOMETERS
MS_DD = _mapscript.MS_DD
MS_PIXELS = _mapscript.MS_PIXELS
MS_PERCENTAGES = _mapscript.MS_PERCENTAGES
MS_NAUTICALMILES = _mapscript.MS_NAUTICALMILES
MS_INHERIT = _mapscript.MS_INHERIT
MS_SHAPE_POINT = _mapscript.MS_SHAPE_POINT
MS_SHAPE_LINE = _mapscript.MS_SHAPE_LINE
MS_SHAPE_POLYGON = _mapscript.MS_SHAPE_POLYGON
MS_SHAPE_NULL = _mapscript.MS_SHAPE_NULL
MS_LAYER_POINT = _mapscript.MS_LAYER_POINT
MS_LAYER_LINE = _mapscript.MS_LAYER_LINE
MS_LAYER_POLYGON = _mapscript.MS_LAYER_POLYGON
MS_LAYER_RASTER = _mapscript.MS_LAYER_RASTER
MS_LAYER_ANNOTATION = _mapscript.MS_LAYER_ANNOTATION
MS_LAYER_QUERY = _mapscript.MS_LAYER_QUERY
MS_LAYER_CIRCLE = _mapscript.MS_LAYER_CIRCLE
MS_LAYER_TILEINDEX = _mapscript.MS_LAYER_TILEINDEX
MS_LAYER_CHART = _mapscript.MS_LAYER_CHART
MS_TRUETYPE = _mapscript.MS_TRUETYPE
MS_BITMAP = _mapscript.MS_BITMAP
MS_FIRST_MATCHING_CLASS = _mapscript.MS_FIRST_MATCHING_CLASS
MS_ALL_MATCHING_CLASSES = _mapscript.MS_ALL_MATCHING_CLASSES
MS_POSITIONS_LENGTH = _mapscript.MS_POSITIONS_LENGTH
MS_UL = _mapscript.MS_UL
MS_LR = _mapscript.MS_LR
MS_UR = _mapscript.MS_UR
MS_LL = _mapscript.MS_LL
MS_CR = _mapscript.MS_CR
MS_CL = _mapscript.MS_CL
MS_UC = _mapscript.MS_UC
MS_LC = _mapscript.MS_LC
MS_CC = _mapscript.MS_CC
MS_AUTO = _mapscript.MS_AUTO
MS_XY = _mapscript.MS_XY
MS_NONE = _mapscript.MS_NONE
MS_AUTO2 = _mapscript.MS_AUTO2
MS_FOLLOW = _mapscript.MS_FOLLOW
MS_TINY = _mapscript.MS_TINY
MS_SMALL = _mapscript.MS_SMALL
MS_MEDIUM = _mapscript.MS_MEDIUM
MS_LARGE = _mapscript.MS_LARGE
MS_GIANT = _mapscript.MS_GIANT
MS_NORMAL = _mapscript.MS_NORMAL
MS_HILITE = _mapscript.MS_HILITE
MS_SELECTED = _mapscript.MS_SELECTED
MS_INLINE = _mapscript.MS_INLINE
MS_SHAPEFILE = _mapscript.MS_SHAPEFILE
MS_TILED_SHAPEFILE = _mapscript.MS_TILED_SHAPEFILE
MS_UNUSED_2 = _mapscript.MS_UNUSED_2
MS_OGR = _mapscript.MS_OGR
MS_UNUSED_1 = _mapscript.MS_UNUSED_1
MS_POSTGIS = _mapscript.MS_POSTGIS
MS_WMS = _mapscript.MS_WMS
MS_ORACLESPATIAL = _mapscript.MS_ORACLESPATIAL
MS_WFS = _mapscript.MS_WFS
MS_GRATICULE = _mapscript.MS_GRATICULE
MS_MYSQL = _mapscript.MS_MYSQL
MS_RASTER = _mapscript.MS_RASTER
MS_PLUGIN = _mapscript.MS_PLUGIN
MS_UNION = _mapscript.MS_UNION
MS_UVRASTER = _mapscript.MS_UVRASTER
MS_CONTOUR = _mapscript.MS_CONTOUR
MS_KERNELDENSITY = _mapscript.MS_KERNELDENSITY
MS_IDW = _mapscript.MS_IDW
MS_FLATGEOBUF = _mapscript.MS_FLATGEOBUF
MS_RASTER_LABEL = _mapscript.MS_RASTER_LABEL
MS_DB_XBASE = _mapscript.MS_DB_XBASE
MS_DB_CSV = _mapscript.MS_DB_CSV
MS_DB_MYSQL = _mapscript.MS_DB_MYSQL
MS_DB_ORACLE = _mapscript.MS_DB_ORACLE
MS_DB_POSTGRES = _mapscript.MS_DB_POSTGRES
MS_JOIN_ONE_TO_ONE = _mapscript.MS_JOIN_ONE_TO_ONE
MS_JOIN_ONE_TO_MANY = _mapscript.MS_JOIN_ONE_TO_MANY
MS_SINGLE = _mapscript.MS_SINGLE
MS_MULTIPLE = _mapscript.MS_MULTIPLE
MS_QUERY_SINGLE = _mapscript.MS_QUERY_SINGLE
MS_QUERY_MULTIPLE = _mapscript.MS_QUERY_MULTIPLE
MS_QUERY_IS_NULL = _mapscript.MS_QUERY_IS_NULL
MS_QUERY_BY_POINT = _mapscript.MS_QUERY_BY_POINT
MS_QUERY_BY_RECT = _mapscript.MS_QUERY_BY_RECT
MS_QUERY_BY_SHAPE = _mapscript.MS_QUERY_BY_SHAPE
MS_QUERY_BY_ATTRIBUTE = _mapscript.MS_QUERY_BY_ATTRIBUTE
MS_QUERY_BY_INDEX = _mapscript.MS_QUERY_BY_INDEX
MS_QUERY_BY_FILTER = _mapscript.MS_QUERY_BY_FILTER
MS_ALIGN_DEFAULT = _mapscript.MS_ALIGN_DEFAULT
MS_ALIGN_LEFT = _mapscript.MS_ALIGN_LEFT
MS_ALIGN_CENTER = _mapscript.MS_ALIGN_CENTER
MS_ALIGN_RIGHT = _mapscript.MS_ALIGN_RIGHT
MS_CJC_NONE = _mapscript.MS_CJC_NONE
MS_CJC_BEVEL = _mapscript.MS_CJC_BEVEL
MS_CJC_BUTT = _mapscript.MS_CJC_BUTT
MS_CJC_MITER = _mapscript.MS_CJC_MITER
MS_CJC_ROUND = _mapscript.MS_CJC_ROUND
MS_CJC_SQUARE = _mapscript.MS_CJC_SQUARE
MS_CJC_TRIANGLE = _mapscript.MS_CJC_TRIANGLE
MS_CJC_DEFAULT_JOIN_MAXSIZE = _mapscript.MS_CJC_DEFAULT_JOIN_MAXSIZE
MS_SUCCESS = _mapscript.MS_SUCCESS
MS_FAILURE = _mapscript.MS_FAILURE
MS_DONE = _mapscript.MS_DONE
MS_IMAGEMODE_PC256 = _mapscript.MS_IMAGEMODE_PC256
MS_IMAGEMODE_RGB = _mapscript.MS_IMAGEMODE_RGB
MS_IMAGEMODE_RGBA = _mapscript.MS_IMAGEMODE_RGBA
MS_IMAGEMODE_INT16 = _mapscript.MS_IMAGEMODE_INT16
MS_IMAGEMODE_FLOAT32 = _mapscript.MS_IMAGEMODE_FLOAT32
MS_IMAGEMODE_BYTE = _mapscript.MS_IMAGEMODE_BYTE
MS_IMAGEMODE_FEATURE = _mapscript.MS_IMAGEMODE_FEATURE
MS_IMAGEMODE_NULL = _mapscript.MS_IMAGEMODE_NULL
MS_IMAGEMODE_FLOAT64 = _mapscript.MS_IMAGEMODE_FLOAT64
MS_GEOS_EQUALS = _mapscript.MS_GEOS_EQUALS
MS_GEOS_DISJOINT = _mapscript.MS_GEOS_DISJOINT
MS_GEOS_TOUCHES = _mapscript.MS_GEOS_TOUCHES
MS_GEOS_OVERLAPS = _mapscript.MS_GEOS_OVERLAPS
MS_GEOS_CROSSES = _mapscript.MS_GEOS_CROSSES
MS_GEOS_INTERSECTS = _mapscript.MS_GEOS_INTERSECTS
MS_GEOS_WITHIN = _mapscript.MS_GEOS_WITHIN
MS_GEOS_CONTAINS = _mapscript.MS_GEOS_CONTAINS
MS_GEOS_BEYOND = _mapscript.MS_GEOS_BEYOND
MS_GEOS_DWITHIN = _mapscript.MS_GEOS_DWITHIN
MS_TRANSFORM_NONE = _mapscript.MS_TRANSFORM_NONE
MS_TRANSFORM_ROUND = _mapscript.MS_TRANSFORM_ROUND
MS_TRANSFORM_SNAPTOGRID = _mapscript.MS_TRANSFORM_SNAPTOGRID
MS_TRANSFORM_FULLRESOLUTION = _mapscript.MS_TRANSFORM_FULLRESOLUTION
MS_TRANSFORM_SIMPLIFY = _mapscript.MS_TRANSFORM_SIMPLIFY
MS_COMPOP_CLEAR = _mapscript.MS_COMPOP_CLEAR
MS_COMPOP_SRC = _mapscript.MS_COMPOP_SRC
MS_COMPOP_DST = _mapscript.MS_COMPOP_DST
MS_COMPOP_SRC_OVER = _mapscript.MS_COMPOP_SRC_OVER
MS_COMPOP_DST_OVER = _mapscript.MS_COMPOP_DST_OVER
MS_COMPOP_SRC_IN = _mapscript.MS_COMPOP_SRC_IN
MS_COMPOP_DST_IN = _mapscript.MS_COMPOP_DST_IN
MS_COMPOP_SRC_OUT = _mapscript.MS_COMPOP_SRC_OUT
MS_COMPOP_DST_OUT = _mapscript.MS_COMPOP_DST_OUT
MS_COMPOP_SRC_ATOP = _mapscript.MS_COMPOP_SRC_ATOP
MS_COMPOP_DST_ATOP = _mapscript.MS_COMPOP_DST_ATOP
MS_COMPOP_XOR = _mapscript.MS_COMPOP_XOR
MS_COMPOP_PLUS = _mapscript.MS_COMPOP_PLUS
MS_COMPOP_MINUS = _mapscript.MS_COMPOP_MINUS
MS_COMPOP_MULTIPLY = _mapscript.MS_COMPOP_MULTIPLY
MS_COMPOP_SCREEN = _mapscript.MS_COMPOP_SCREEN
MS_COMPOP_OVERLAY = _mapscript.MS_COMPOP_OVERLAY
MS_COMPOP_DARKEN = _mapscript.MS_COMPOP_DARKEN
MS_COMPOP_LIGHTEN = _mapscript.MS_COMPOP_LIGHTEN
MS_COMPOP_COLOR_DODGE = _mapscript.MS_COMPOP_COLOR_DODGE
MS_COMPOP_COLOR_BURN = _mapscript.MS_COMPOP_COLOR_BURN
MS_COMPOP_HARD_LIGHT = _mapscript.MS_COMPOP_HARD_LIGHT
MS_COMPOP_SOFT_LIGHT = _mapscript.MS_COMPOP_SOFT_LIGHT
MS_COMPOP_DIFFERENCE = _mapscript.MS_COMPOP_DIFFERENCE
MS_COMPOP_EXCLUSION = _mapscript.MS_COMPOP_EXCLUSION
MS_COMPOP_CONTRAST = _mapscript.MS_COMPOP_CONTRAST
MS_COMPOP_INVERT = _mapscript.MS_COMPOP_INVERT
MS_COMPOP_INVERT_RGB = _mapscript.MS_COMPOP_INVERT_RGB
MS_COMPOP_HSL_HUE = _mapscript.MS_COMPOP_HSL_HUE
MS_COMPOP_HSL_LUMINOSITY = _mapscript.MS_COMPOP_HSL_LUMINOSITY
MS_COMPOP_HSL_SATURATION = _mapscript.MS_COMPOP_HSL_SATURATION
MS_COMPOP_HSL_COLOR = _mapscript.MS_COMPOP_HSL_COLOR
class CompositingFilter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    filter = property(_mapscript.CompositingFilter_filter_get, _mapscript.CompositingFilter_filter_set)
    next = property(_mapscript.CompositingFilter_next_get, _mapscript.CompositingFilter_next_set)

    def __init__(self):
        _mapscript.CompositingFilter_swiginit(self, _mapscript.new_CompositingFilter())
    __swig_destroy__ = _mapscript.delete_CompositingFilter

# Register CompositingFilter in _mapscript:
_mapscript.CompositingFilter_swigregister(CompositingFilter)
class LayerCompositer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    comp_op = property(_mapscript.LayerCompositer_comp_op_get, _mapscript.LayerCompositer_comp_op_set)
    opacity = property(_mapscript.LayerCompositer_opacity_get, _mapscript.LayerCompositer_opacity_set)
    filter = property(_mapscript.LayerCompositer_filter_get, _mapscript.LayerCompositer_filter_set)
    next = property(_mapscript.LayerCompositer_next_get, _mapscript.LayerCompositer_next_set)

    def __init__(self):
        _mapscript.LayerCompositer_swiginit(self, _mapscript.new_LayerCompositer())
    __swig_destroy__ = _mapscript.delete_LayerCompositer

# Register LayerCompositer in _mapscript:
_mapscript.LayerCompositer_swigregister(LayerCompositer)
MS_STYLE_BINDING_LENGTH = _mapscript.MS_STYLE_BINDING_LENGTH
MS_STYLE_BINDING_SIZE = _mapscript.MS_STYLE_BINDING_SIZE
MS_STYLE_BINDING_WIDTH = _mapscript.MS_STYLE_BINDING_WIDTH
MS_STYLE_BINDING_ANGLE = _mapscript.MS_STYLE_BINDING_ANGLE
MS_STYLE_BINDING_COLOR = _mapscript.MS_STYLE_BINDING_COLOR
MS_STYLE_BINDING_OUTLINECOLOR = _mapscript.MS_STYLE_BINDING_OUTLINECOLOR
MS_STYLE_BINDING_SYMBOL = _mapscript.MS_STYLE_BINDING_SYMBOL
MS_STYLE_BINDING_OUTLINEWIDTH = _mapscript.MS_STYLE_BINDING_OUTLINEWIDTH
MS_STYLE_BINDING_OPACITY = _mapscript.MS_STYLE_BINDING_OPACITY
MS_STYLE_BINDING_OFFSET_X = _mapscript.MS_STYLE_BINDING_OFFSET_X
MS_STYLE_BINDING_OFFSET_Y = _mapscript.MS_STYLE_BINDING_OFFSET_Y
MS_STYLE_BINDING_POLAROFFSET_PIXEL = _mapscript.MS_STYLE_BINDING_POLAROFFSET_PIXEL
MS_STYLE_BINDING_POLAROFFSET_ANGLE = _mapscript.MS_STYLE_BINDING_POLAROFFSET_ANGLE
MS_LABEL_BINDING_LENGTH = _mapscript.MS_LABEL_BINDING_LENGTH
MS_LABEL_BINDING_SIZE = _mapscript.MS_LABEL_BINDING_SIZE
MS_LABEL_BINDING_ANGLE = _mapscript.MS_LABEL_BINDING_ANGLE
MS_LABEL_BINDING_COLOR = _mapscript.MS_LABEL_BINDING_COLOR
MS_LABEL_BINDING_OUTLINECOLOR = _mapscript.MS_LABEL_BINDING_OUTLINECOLOR
MS_LABEL_BINDING_FONT = _mapscript.MS_LABEL_BINDING_FONT
MS_LABEL_BINDING_PRIORITY = _mapscript.MS_LABEL_BINDING_PRIORITY
MS_LABEL_BINDING_POSITION = _mapscript.MS_LABEL_BINDING_POSITION
MS_LABEL_BINDING_SHADOWSIZEX = _mapscript.MS_LABEL_BINDING_SHADOWSIZEX
MS_LABEL_BINDING_SHADOWSIZEY = _mapscript.MS_LABEL_BINDING_SHADOWSIZEY
MS_LABEL_BINDING_OFFSET_X = _mapscript.MS_LABEL_BINDING_OFFSET_X
MS_LABEL_BINDING_OFFSET_Y = _mapscript.MS_LABEL_BINDING_OFFSET_Y
MS_LABEL_BINDING_ALIGN = _mapscript.MS_LABEL_BINDING_ALIGN
class fontSetObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    filename = property(_mapscript.fontSetObj_filename_get)
    numfonts = property(_mapscript.fontSetObj_numfonts_get)
    fonts = property(_mapscript.fontSetObj_fonts_get)

    def __init__(self):
        _mapscript.fontSetObj_swiginit(self, _mapscript.new_fontSetObj())
    __swig_destroy__ = _mapscript.delete_fontSetObj

# Register fontSetObj in _mapscript:
_mapscript.fontSetObj_swigregister(fontSetObj)
MS_TOKEN_LOGICAL_AND = _mapscript.MS_TOKEN_LOGICAL_AND
MS_TOKEN_LOGICAL_OR = _mapscript.MS_TOKEN_LOGICAL_OR
MS_TOKEN_LOGICAL_NOT = _mapscript.MS_TOKEN_LOGICAL_NOT
MS_TOKEN_LITERAL_NUMBER = _mapscript.MS_TOKEN_LITERAL_NUMBER
MS_TOKEN_LITERAL_STRING = _mapscript.MS_TOKEN_LITERAL_STRING
MS_TOKEN_LITERAL_TIME = _mapscript.MS_TOKEN_LITERAL_TIME
MS_TOKEN_LITERAL_SHAPE = _mapscript.MS_TOKEN_LITERAL_SHAPE
MS_TOKEN_LITERAL_BOOLEAN = _mapscript.MS_TOKEN_LITERAL_BOOLEAN
MS_TOKEN_COMPARISON_EQ = _mapscript.MS_TOKEN_COMPARISON_EQ
MS_TOKEN_COMPARISON_NE = _mapscript.MS_TOKEN_COMPARISON_NE
MS_TOKEN_COMPARISON_GT = _mapscript.MS_TOKEN_COMPARISON_GT
MS_TOKEN_COMPARISON_LT = _mapscript.MS_TOKEN_COMPARISON_LT
MS_TOKEN_COMPARISON_LE = _mapscript.MS_TOKEN_COMPARISON_LE
MS_TOKEN_COMPARISON_GE = _mapscript.MS_TOKEN_COMPARISON_GE
MS_TOKEN_COMPARISON_IEQ = _mapscript.MS_TOKEN_COMPARISON_IEQ
MS_TOKEN_COMPARISON_RE = _mapscript.MS_TOKEN_COMPARISON_RE
MS_TOKEN_COMPARISON_IRE = _mapscript.MS_TOKEN_COMPARISON_IRE
MS_TOKEN_COMPARISON_IN = _mapscript.MS_TOKEN_COMPARISON_IN
MS_TOKEN_COMPARISON_LIKE = _mapscript.MS_TOKEN_COMPARISON_LIKE
MS_TOKEN_COMPARISON_INTERSECTS = _mapscript.MS_TOKEN_COMPARISON_INTERSECTS
MS_TOKEN_COMPARISON_DISJOINT = _mapscript.MS_TOKEN_COMPARISON_DISJOINT
MS_TOKEN_COMPARISON_TOUCHES = _mapscript.MS_TOKEN_COMPARISON_TOUCHES
MS_TOKEN_COMPARISON_OVERLAPS = _mapscript.MS_TOKEN_COMPARISON_OVERLAPS
MS_TOKEN_COMPARISON_CROSSES = _mapscript.MS_TOKEN_COMPARISON_CROSSES
MS_TOKEN_COMPARISON_WITHIN = _mapscript.MS_TOKEN_COMPARISON_WITHIN
MS_TOKEN_COMPARISON_CONTAINS = _mapscript.MS_TOKEN_COMPARISON_CONTAINS
MS_TOKEN_COMPARISON_EQUALS = _mapscript.MS_TOKEN_COMPARISON_EQUALS
MS_TOKEN_COMPARISON_BEYOND = _mapscript.MS_TOKEN_COMPARISON_BEYOND
MS_TOKEN_COMPARISON_DWITHIN = _mapscript.MS_TOKEN_COMPARISON_DWITHIN
MS_TOKEN_FUNCTION_LENGTH = _mapscript.MS_TOKEN_FUNCTION_LENGTH
MS_TOKEN_FUNCTION_TOSTRING = _mapscript.MS_TOKEN_FUNCTION_TOSTRING
MS_TOKEN_FUNCTION_COMMIFY = _mapscript.MS_TOKEN_FUNCTION_COMMIFY
MS_TOKEN_FUNCTION_AREA = _mapscript.MS_TOKEN_FUNCTION_AREA
MS_TOKEN_FUNCTION_ROUND = _mapscript.MS_TOKEN_FUNCTION_ROUND
MS_TOKEN_FUNCTION_FROMTEXT = _mapscript.MS_TOKEN_FUNCTION_FROMTEXT
MS_TOKEN_FUNCTION_BUFFER = _mapscript.MS_TOKEN_FUNCTION_BUFFER
MS_TOKEN_FUNCTION_DIFFERENCE = _mapscript.MS_TOKEN_FUNCTION_DIFFERENCE
MS_TOKEN_FUNCTION_SIMPLIFY = _mapscript.MS_TOKEN_FUNCTION_SIMPLIFY
MS_TOKEN_FUNCTION_SIMPLIFYPT = _mapscript.MS_TOKEN_FUNCTION_SIMPLIFYPT
MS_TOKEN_FUNCTION_GENERALIZE = _mapscript.MS_TOKEN_FUNCTION_GENERALIZE
MS_TOKEN_FUNCTION_SMOOTHSIA = _mapscript.MS_TOKEN_FUNCTION_SMOOTHSIA
MS_TOKEN_FUNCTION_CENTERLINE = _mapscript.MS_TOKEN_FUNCTION_CENTERLINE
MS_TOKEN_FUNCTION_DENSIFY = _mapscript.MS_TOKEN_FUNCTION_DENSIFY
MS_TOKEN_FUNCTION_OUTER = _mapscript.MS_TOKEN_FUNCTION_OUTER
MS_TOKEN_FUNCTION_INNER = _mapscript.MS_TOKEN_FUNCTION_INNER
MS_TOKEN_FUNCTION_JAVASCRIPT = _mapscript.MS_TOKEN_FUNCTION_JAVASCRIPT
MS_TOKEN_FUNCTION_UPPER = _mapscript.MS_TOKEN_FUNCTION_UPPER
MS_TOKEN_FUNCTION_LOWER = _mapscript.MS_TOKEN_FUNCTION_LOWER
MS_TOKEN_FUNCTION_INITCAP = _mapscript.MS_TOKEN_FUNCTION_INITCAP
MS_TOKEN_FUNCTION_FIRSTCAP = _mapscript.MS_TOKEN_FUNCTION_FIRSTCAP
MS_TOKEN_BINDING_DOUBLE = _mapscript.MS_TOKEN_BINDING_DOUBLE
MS_TOKEN_BINDING_INTEGER = _mapscript.MS_TOKEN_BINDING_INTEGER
MS_TOKEN_BINDING_STRING = _mapscript.MS_TOKEN_BINDING_STRING
MS_TOKEN_BINDING_TIME = _mapscript.MS_TOKEN_BINDING_TIME
MS_TOKEN_BINDING_SHAPE = _mapscript.MS_TOKEN_BINDING_SHAPE
MS_TOKEN_BINDING_MAP_CELLSIZE = _mapscript.MS_TOKEN_BINDING_MAP_CELLSIZE
MS_TOKEN_BINDING_DATA_CELLSIZE = _mapscript.MS_TOKEN_BINDING_DATA_CELLSIZE
MS_PARSE_TYPE_BOOLEAN = _mapscript.MS_PARSE_TYPE_BOOLEAN
MS_PARSE_TYPE_STRING = _mapscript.MS_PARSE_TYPE_STRING
MS_PARSE_TYPE_SHAPE = _mapscript.MS_PARSE_TYPE_SHAPE
MS_PARSE_TYPE_SLD = _mapscript.MS_PARSE_TYPE_SLD
class clusterObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    maxdistance = property(_mapscript.clusterObj_maxdistance_get, _mapscript.clusterObj_maxdistance_set)
    buffer = property(_mapscript.clusterObj_buffer_get, _mapscript.clusterObj_buffer_set)
    region = property(_mapscript.clusterObj_region_get, _mapscript.clusterObj_region_set)

    def updateFromString(self, snippet):
        return _mapscript.clusterObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.clusterObj_convertToString(self)

    def setGroup(self, group):
        return _mapscript.clusterObj_setGroup(self, group)

    def getGroupString(self):
        return _mapscript.clusterObj_getGroupString(self)

    def setFilter(self, filter):
        return _mapscript.clusterObj_setFilter(self, filter)

    def getFilterString(self):
        return _mapscript.clusterObj_getFilterString(self)

    def __init__(self):
        _mapscript.clusterObj_swiginit(self, _mapscript.new_clusterObj())
    __swig_destroy__ = _mapscript.delete_clusterObj

# Register clusterObj in _mapscript:
_mapscript.clusterObj_swigregister(clusterObj)
class outputFormatObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numformatoptions = property(_mapscript.outputFormatObj_numformatoptions_get)
    name = property(_mapscript.outputFormatObj_name_get, _mapscript.outputFormatObj_name_set)
    mimetype = property(_mapscript.outputFormatObj_mimetype_get, _mapscript.outputFormatObj_mimetype_set)
    driver = property(_mapscript.outputFormatObj_driver_get, _mapscript.outputFormatObj_driver_set)
    extension = property(_mapscript.outputFormatObj_extension_get, _mapscript.outputFormatObj_extension_set)
    renderer = property(_mapscript.outputFormatObj_renderer_get, _mapscript.outputFormatObj_renderer_set)
    imagemode = property(_mapscript.outputFormatObj_imagemode_get, _mapscript.outputFormatObj_imagemode_set)
    transparent = property(_mapscript.outputFormatObj_transparent_get, _mapscript.outputFormatObj_transparent_set)
    bands = property(_mapscript.outputFormatObj_bands_get, _mapscript.outputFormatObj_bands_set)
    inmapfile = property(_mapscript.outputFormatObj_inmapfile_get, _mapscript.outputFormatObj_inmapfile_set)

    def __init__(self, driver, name=None):
        _mapscript.outputFormatObj_swiginit(self, _mapscript.new_outputFormatObj(driver, name))
    __swig_destroy__ = _mapscript.delete_outputFormatObj

    def setExtension(self, extension):
        return _mapscript.outputFormatObj_setExtension(self, extension)

    def setMimetype(self, mimetype):
        return _mapscript.outputFormatObj_setMimetype(self, mimetype)

    def setOption(self, key, value):
        return _mapscript.outputFormatObj_setOption(self, key, value)

    def validate(self):
        return _mapscript.outputFormatObj_validate(self)

    def getOption(self, *args):
        return _mapscript.outputFormatObj_getOption(self, *args)

    def getOptionAt(self, i):
        return _mapscript.outputFormatObj_getOptionAt(self, i)

    def attachDevice(self, device):
        return _mapscript.outputFormatObj_attachDevice(self, device)

# Register outputFormatObj in _mapscript:
_mapscript.outputFormatObj_swigregister(outputFormatObj)
MS_NOOVERRIDE = _mapscript.MS_NOOVERRIDE
class queryMapObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    map = property(_mapscript.queryMapObj_map_get)
    height = property(_mapscript.queryMapObj_height_get, _mapscript.queryMapObj_height_set)
    width = property(_mapscript.queryMapObj_width_get, _mapscript.queryMapObj_width_set)
    status = property(_mapscript.queryMapObj_status_get, _mapscript.queryMapObj_status_set)
    style = property(_mapscript.queryMapObj_style_get, _mapscript.queryMapObj_style_set)
    color = property(_mapscript.queryMapObj_color_get, _mapscript.queryMapObj_color_set)

    def updateFromString(self, snippet):
        return _mapscript.queryMapObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.queryMapObj_convertToString(self)

    def __init__(self):
        _mapscript.queryMapObj_swiginit(self, _mapscript.new_queryMapObj())
    __swig_destroy__ = _mapscript.delete_queryMapObj

# Register queryMapObj in _mapscript:
_mapscript.queryMapObj_swigregister(queryMapObj)
class webObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    metadata = property(_mapscript.webObj_metadata_get)
    validation = property(_mapscript.webObj_validation_get)
    map = property(_mapscript.webObj_map_get)
    imagepath = property(_mapscript.webObj_imagepath_get, _mapscript.webObj_imagepath_set)
    imageurl = property(_mapscript.webObj_imageurl_get, _mapscript.webObj_imageurl_set)
    temppath = property(_mapscript.webObj_temppath_get, _mapscript.webObj_temppath_set)
    header = property(_mapscript.webObj_header_get, _mapscript.webObj_header_set)
    footer = property(_mapscript.webObj_footer_get, _mapscript.webObj_footer_set)
    empty = property(_mapscript.webObj_empty_get, _mapscript.webObj_empty_set)
    error = property(_mapscript.webObj_error_get, _mapscript.webObj_error_set)
    minscaledenom = property(_mapscript.webObj_minscaledenom_get, _mapscript.webObj_minscaledenom_set)
    maxscaledenom = property(_mapscript.webObj_maxscaledenom_get, _mapscript.webObj_maxscaledenom_set)
    mintemplate = property(_mapscript.webObj_mintemplate_get, _mapscript.webObj_mintemplate_set)
    maxtemplate = property(_mapscript.webObj_maxtemplate_get, _mapscript.webObj_maxtemplate_set)
    queryformat = property(_mapscript.webObj_queryformat_get, _mapscript.webObj_queryformat_set)
    legendformat = property(_mapscript.webObj_legendformat_get, _mapscript.webObj_legendformat_set)
    browseformat = property(_mapscript.webObj_browseformat_get, _mapscript.webObj_browseformat_set)
    template = property(_mapscript.webObj_template_get, _mapscript.webObj_template_set)

    def __init__(self):
        _mapscript.webObj_swiginit(self, _mapscript.new_webObj())
    __swig_destroy__ = _mapscript.delete_webObj

    def updateFromString(self, snippet):
        return _mapscript.webObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.webObj_convertToString(self)

# Register webObj in _mapscript:
_mapscript.webObj_swigregister(webObj)
class styleObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refcount = property(_mapscript.styleObj_refcount_get)
    symbolname = property(_mapscript.styleObj_symbolname_get)
    patternlength = property(_mapscript.styleObj_patternlength_get)
    angle = property(_mapscript.styleObj_angle_get, _mapscript.styleObj_angle_set)
    autoangle = property(_mapscript.styleObj_autoangle_get, _mapscript.styleObj_autoangle_set)
    antialiased = property(_mapscript.styleObj_antialiased_get, _mapscript.styleObj_antialiased_set)
    color = property(_mapscript.styleObj_color_get, _mapscript.styleObj_color_set)
    outlinecolor = property(_mapscript.styleObj_outlinecolor_get, _mapscript.styleObj_outlinecolor_set)
    opacity = property(_mapscript.styleObj_opacity_get, _mapscript.styleObj_opacity_set)
    mincolor = property(_mapscript.styleObj_mincolor_get, _mapscript.styleObj_mincolor_set)
    maxcolor = property(_mapscript.styleObj_maxcolor_get, _mapscript.styleObj_maxcolor_set)
    minvalue = property(_mapscript.styleObj_minvalue_get, _mapscript.styleObj_minvalue_set)
    maxvalue = property(_mapscript.styleObj_maxvalue_get, _mapscript.styleObj_maxvalue_set)
    rangeitem = property(_mapscript.styleObj_rangeitem_get, _mapscript.styleObj_rangeitem_set)
    rangeitemindex = property(_mapscript.styleObj_rangeitemindex_get, _mapscript.styleObj_rangeitemindex_set)
    symbol = property(_mapscript.styleObj_symbol_get, _mapscript.styleObj_symbol_set)
    size = property(_mapscript.styleObj_size_get, _mapscript.styleObj_size_set)
    minsize = property(_mapscript.styleObj_minsize_get, _mapscript.styleObj_minsize_set)
    maxsize = property(_mapscript.styleObj_maxsize_get, _mapscript.styleObj_maxsize_set)
    gap = property(_mapscript.styleObj_gap_get, _mapscript.styleObj_gap_set)
    initialgap = property(_mapscript.styleObj_initialgap_get, _mapscript.styleObj_initialgap_set)
    linecap = property(_mapscript.styleObj_linecap_get, _mapscript.styleObj_linecap_set)
    linejoin = property(_mapscript.styleObj_linejoin_get, _mapscript.styleObj_linejoin_set)
    linejoinmaxsize = property(_mapscript.styleObj_linejoinmaxsize_get, _mapscript.styleObj_linejoinmaxsize_set)
    width = property(_mapscript.styleObj_width_get, _mapscript.styleObj_width_set)
    outlinewidth = property(_mapscript.styleObj_outlinewidth_get, _mapscript.styleObj_outlinewidth_set)
    minwidth = property(_mapscript.styleObj_minwidth_get, _mapscript.styleObj_minwidth_set)
    maxwidth = property(_mapscript.styleObj_maxwidth_get, _mapscript.styleObj_maxwidth_set)
    offsetx = property(_mapscript.styleObj_offsetx_get, _mapscript.styleObj_offsetx_set)
    offsety = property(_mapscript.styleObj_offsety_get, _mapscript.styleObj_offsety_set)
    polaroffsetpixel = property(_mapscript.styleObj_polaroffsetpixel_get, _mapscript.styleObj_polaroffsetpixel_set)
    polaroffsetangle = property(_mapscript.styleObj_polaroffsetangle_get, _mapscript.styleObj_polaroffsetangle_set)
    minscaledenom = property(_mapscript.styleObj_minscaledenom_get, _mapscript.styleObj_minscaledenom_set)
    maxscaledenom = property(_mapscript.styleObj_maxscaledenom_get, _mapscript.styleObj_maxscaledenom_set)
    sizeunits = property(_mapscript.styleObj_sizeunits_get, _mapscript.styleObj_sizeunits_set)

    def __init__(self, parent_class=None):
        _mapscript.styleObj_swiginit(self, _mapscript.new_styleObj(parent_class))
    __swig_destroy__ = _mapscript.delete_styleObj

    def updateFromString(self, snippet):
        return _mapscript.styleObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.styleObj_convertToString(self)

    def clone(self):
        return _mapscript.styleObj_clone(self)

    def setSymbolByName(self, map, symbolname):
        return _mapscript.styleObj_setSymbolByName(self, map, symbolname)

    def removeBinding(self, binding):
        return _mapscript.styleObj_removeBinding(self, binding)

    def setBinding(self, binding, item):
        return _mapscript.styleObj_setBinding(self, binding, item)

    def getBinding(self, binding):
        return _mapscript.styleObj_getBinding(self, binding)

    def getGeomTransform(self):
        return _mapscript.styleObj_getGeomTransform(self)

    def setGeomTransform(self, transform):
        return _mapscript.styleObj_setGeomTransform(self, transform)

    def pattern_set(self, nListSize):
        return _mapscript.styleObj_pattern_set(self, nListSize)

    def pattern_get(self):
        return _mapscript.styleObj_pattern_get(self)


    pattern = property(pattern_get, pattern_set, doc=r"""pattern : list **Python Only**""")



# Register styleObj in _mapscript:
_mapscript.styleObj_swigregister(styleObj)
MS_STYLE_SINGLE_SIDED_OFFSET = _mapscript.MS_STYLE_SINGLE_SIDED_OFFSET
MS_STYLE_DOUBLE_SIDED_OFFSET = _mapscript.MS_STYLE_DOUBLE_SIDED_OFFSET
class labelLeaderObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numstyles = property(_mapscript.labelLeaderObj_numstyles_get)
    maxdistance = property(_mapscript.labelLeaderObj_maxdistance_get, _mapscript.labelLeaderObj_maxdistance_set)
    gridstep = property(_mapscript.labelLeaderObj_gridstep_get, _mapscript.labelLeaderObj_gridstep_set)

    def __init__(self):
        _mapscript.labelLeaderObj_swiginit(self, _mapscript.new_labelLeaderObj())
    __swig_destroy__ = _mapscript.delete_labelLeaderObj

# Register labelLeaderObj in _mapscript:
_mapscript.labelLeaderObj_swigregister(labelLeaderObj)
class labelObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refcount = property(_mapscript.labelObj_refcount_get)
    font = property(_mapscript.labelObj_font_get, _mapscript.labelObj_font_set)
    color = property(_mapscript.labelObj_color_get, _mapscript.labelObj_color_set)
    outlinecolor = property(_mapscript.labelObj_outlinecolor_get, _mapscript.labelObj_outlinecolor_set)
    outlinewidth = property(_mapscript.labelObj_outlinewidth_get, _mapscript.labelObj_outlinewidth_set)
    shadowcolor = property(_mapscript.labelObj_shadowcolor_get, _mapscript.labelObj_shadowcolor_set)
    shadowsizex = property(_mapscript.labelObj_shadowsizex_get, _mapscript.labelObj_shadowsizex_set)
    shadowsizey = property(_mapscript.labelObj_shadowsizey_get, _mapscript.labelObj_shadowsizey_set)
    size = property(_mapscript.labelObj_size_get, _mapscript.labelObj_size_set)
    minsize = property(_mapscript.labelObj_minsize_get, _mapscript.labelObj_minsize_set)
    maxsize = property(_mapscript.labelObj_maxsize_get, _mapscript.labelObj_maxsize_set)
    position = property(_mapscript.labelObj_position_get, _mapscript.labelObj_position_set)
    offsetx = property(_mapscript.labelObj_offsetx_get, _mapscript.labelObj_offsetx_set)
    offsety = property(_mapscript.labelObj_offsety_get, _mapscript.labelObj_offsety_set)
    angle = property(_mapscript.labelObj_angle_get, _mapscript.labelObj_angle_set)
    anglemode = property(_mapscript.labelObj_anglemode_get, _mapscript.labelObj_anglemode_set)
    buffer = property(_mapscript.labelObj_buffer_get, _mapscript.labelObj_buffer_set)
    align = property(_mapscript.labelObj_align_get, _mapscript.labelObj_align_set)
    wrap = property(_mapscript.labelObj_wrap_get, _mapscript.labelObj_wrap_set)
    maxlength = property(_mapscript.labelObj_maxlength_get, _mapscript.labelObj_maxlength_set)
    space_size_10 = property(_mapscript.labelObj_space_size_10_get, _mapscript.labelObj_space_size_10_set)
    minfeaturesize = property(_mapscript.labelObj_minfeaturesize_get, _mapscript.labelObj_minfeaturesize_set)
    autominfeaturesize = property(_mapscript.labelObj_autominfeaturesize_get, _mapscript.labelObj_autominfeaturesize_set)
    minscaledenom = property(_mapscript.labelObj_minscaledenom_get, _mapscript.labelObj_minscaledenom_set)
    maxscaledenom = property(_mapscript.labelObj_maxscaledenom_get, _mapscript.labelObj_maxscaledenom_set)
    mindistance = property(_mapscript.labelObj_mindistance_get, _mapscript.labelObj_mindistance_set)
    repeatdistance = property(_mapscript.labelObj_repeatdistance_get, _mapscript.labelObj_repeatdistance_set)
    maxoverlapangle = property(_mapscript.labelObj_maxoverlapangle_get, _mapscript.labelObj_maxoverlapangle_set)
    partials = property(_mapscript.labelObj_partials_get, _mapscript.labelObj_partials_set)
    force = property(_mapscript.labelObj_force_get, _mapscript.labelObj_force_set)
    encoding = property(_mapscript.labelObj_encoding_get, _mapscript.labelObj_encoding_set)
    priority = property(_mapscript.labelObj_priority_get, _mapscript.labelObj_priority_set)
    numstyles = property(_mapscript.labelObj_numstyles_get, _mapscript.labelObj_numstyles_set)
    sizeunits = property(_mapscript.labelObj_sizeunits_get, _mapscript.labelObj_sizeunits_set)

    def __init__(self):
        _mapscript.labelObj_swiginit(self, _mapscript.new_labelObj())
    __swig_destroy__ = _mapscript.delete_labelObj

    def updateFromString(self, snippet):
        return _mapscript.labelObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.labelObj_convertToString(self)

    def removeBinding(self, binding):
        return _mapscript.labelObj_removeBinding(self, binding)

    def getBinding(self, binding):
        return _mapscript.labelObj_getBinding(self, binding)

    def setBinding(self, binding, item):
        return _mapscript.labelObj_setBinding(self, binding, item)

    def removeExpressionBinding(self, binding):
        return _mapscript.labelObj_removeExpressionBinding(self, binding)

    def getExpressionBinding(self, binding):
        return _mapscript.labelObj_getExpressionBinding(self, binding)

    def setExpressionBinding(self, binding, text):
        return _mapscript.labelObj_setExpressionBinding(self, binding, text)

    def setExpression(self, expression):
        return _mapscript.labelObj_setExpression(self, expression)

    def getExpressionString(self):
        return _mapscript.labelObj_getExpressionString(self)

    def setText(self, text):
        return _mapscript.labelObj_setText(self, text)

    def getTextString(self):
        return _mapscript.labelObj_getTextString(self)

    def getStyle(self, i):
        return _mapscript.labelObj_getStyle(self, i)

    def insertStyle(self, style, index=-1):
        return _mapscript.labelObj_insertStyle(self, style, index)

    def removeStyle(self, index):
        return _mapscript.labelObj_removeStyle(self, index)

    def moveStyleUp(self, index):
        return _mapscript.labelObj_moveStyleUp(self, index)

    def moveStyleDown(self, index):
        return _mapscript.labelObj_moveStyleDown(self, index)

# Register labelObj in _mapscript:
_mapscript.labelObj_swigregister(labelObj)
MS_LABEL_PERPENDICULAR_OFFSET = _mapscript.MS_LABEL_PERPENDICULAR_OFFSET
MS_LABEL_PERPENDICULAR_TOP_OFFSET = _mapscript.MS_LABEL_PERPENDICULAR_TOP_OFFSET
class classObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    metadata = property(_mapscript.classObj_metadata_get)
    validation = property(_mapscript.classObj_validation_get)
    numstyles = property(_mapscript.classObj_numstyles_get)
    numlabels = property(_mapscript.classObj_numlabels_get)
    refcount = property(_mapscript.classObj_refcount_get)
    layer = property(_mapscript.classObj_layer_get)
    leader = property(_mapscript.classObj_leader_get)
    status = property(_mapscript.classObj_status_get, _mapscript.classObj_status_set)
    isfallback = property(_mapscript.classObj_isfallback_get, _mapscript.classObj_isfallback_set)
    name = property(_mapscript.classObj_name_get, _mapscript.classObj_name_set)
    title = property(_mapscript.classObj_title_get, _mapscript.classObj_title_set)
    minscaledenom = property(_mapscript.classObj_minscaledenom_get, _mapscript.classObj_minscaledenom_set)
    maxscaledenom = property(_mapscript.classObj_maxscaledenom_get, _mapscript.classObj_maxscaledenom_set)
    minfeaturesize = property(_mapscript.classObj_minfeaturesize_get, _mapscript.classObj_minfeaturesize_set)
    debug = property(_mapscript.classObj_debug_get, _mapscript.classObj_debug_set)
    keyimage = property(_mapscript.classObj_keyimage_get, _mapscript.classObj_keyimage_set)
    group = property(_mapscript.classObj_group_get, _mapscript.classObj_group_set)
    sizeunits = property(_mapscript.classObj_sizeunits_get, _mapscript.classObj_sizeunits_set)
    template = property(_mapscript.classObj_template_get, _mapscript.classObj_template_set)

    def __init__(self, layer=None):
        _mapscript.classObj_swiginit(self, _mapscript.new_classObj(layer))

        self.p_layer = None
        if layer: 
            self.p_layer = layer


    __swig_destroy__ = _mapscript.delete_classObj

    def updateFromString(self, snippet):
        return _mapscript.classObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.classObj_convertToString(self)

    def clone(self):
        return _mapscript.classObj_clone(self)

    def setExpression(self, expression):
        return _mapscript.classObj_setExpression(self, expression)

    def getExpressionString(self):
        return _mapscript.classObj_getExpressionString(self)

    def setText(self, text):
        return _mapscript.classObj_setText(self, text)

    def getTextString(self):
        return _mapscript.classObj_getTextString(self)

    def drawLegendIcon(self, map, layer, width, height, dstImage, dstX, dstY):
        return _mapscript.classObj_drawLegendIcon(self, map, layer, width, height, dstImage, dstX, dstY)

    def createLegendIcon(self, map, layer, width, height):
        return _mapscript.classObj_createLegendIcon(self, map, layer, width, height)

    def getLabel(self, i):
        return _mapscript.classObj_getLabel(self, i)

    def addLabel(self, label):
        return _mapscript.classObj_addLabel(self, label)

    def removeLabel(self, index):
        return _mapscript.classObj_removeLabel(self, index)

    def getStyle(self, i):
        return _mapscript.classObj_getStyle(self, i)

    def insertStyle(self, style, index=-1):
        return _mapscript.classObj_insertStyle(self, style, index)

    def removeStyle(self, index):
        return _mapscript.classObj_removeStyle(self, index)

    def moveStyleUp(self, index):
        return _mapscript.classObj_moveStyleUp(self, index)

    def moveStyleDown(self, index):
        return _mapscript.classObj_moveStyleDown(self, index)

# Register classObj in _mapscript:
_mapscript.classObj_swigregister(classObj)
class labelCacheMemberObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numtextsymbols = property(_mapscript.labelCacheMemberObj_numtextsymbols_get)
    layerindex = property(_mapscript.labelCacheMemberObj_layerindex_get)
    classindex = property(_mapscript.labelCacheMemberObj_classindex_get)
    status = property(_mapscript.labelCacheMemberObj_status_get)
    markerid = property(_mapscript.labelCacheMemberObj_markerid_get)
    point = property(_mapscript.labelCacheMemberObj_point_get)
    bbox = property(_mapscript.labelCacheMemberObj_bbox_get)
    leaderline = property(_mapscript.labelCacheMemberObj_leaderline_get)
    leaderbbox = property(_mapscript.labelCacheMemberObj_leaderbbox_get)

    def __init__(self):
        _mapscript.labelCacheMemberObj_swiginit(self, _mapscript.new_labelCacheMemberObj())
    __swig_destroy__ = _mapscript.delete_labelCacheMemberObj

# Register labelCacheMemberObj in _mapscript:
_mapscript.labelCacheMemberObj_swigregister(labelCacheMemberObj)
class markerCacheMemberObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    id = property(_mapscript.markerCacheMemberObj_id_get)
    bounds = property(_mapscript.markerCacheMemberObj_bounds_get)

    def __init__(self):
        _mapscript.markerCacheMemberObj_swiginit(self, _mapscript.new_markerCacheMemberObj())
    __swig_destroy__ = _mapscript.delete_markerCacheMemberObj

# Register markerCacheMemberObj in _mapscript:
_mapscript.markerCacheMemberObj_swigregister(markerCacheMemberObj)
class labelCacheSlotObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numlabels = property(_mapscript.labelCacheSlotObj_numlabels_get)
    cachesize = property(_mapscript.labelCacheSlotObj_cachesize_get)
    nummarkers = property(_mapscript.labelCacheSlotObj_nummarkers_get)
    markercachesize = property(_mapscript.labelCacheSlotObj_markercachesize_get)
    labels = property(_mapscript.labelCacheSlotObj_labels_get)
    markers = property(_mapscript.labelCacheSlotObj_markers_get)

    def __init__(self):
        _mapscript.labelCacheSlotObj_swiginit(self, _mapscript.new_labelCacheSlotObj())
    __swig_destroy__ = _mapscript.delete_labelCacheSlotObj

# Register labelCacheSlotObj in _mapscript:
_mapscript.labelCacheSlotObj_swigregister(labelCacheSlotObj)
class labelCacheObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    num_rendered_members = property(_mapscript.labelCacheObj_num_rendered_members_get)

    def freeCache(self):
        return _mapscript.labelCacheObj_freeCache(self)

    def __init__(self):
        _mapscript.labelCacheObj_swiginit(self, _mapscript.new_labelCacheObj())
    __swig_destroy__ = _mapscript.delete_labelCacheObj

# Register labelCacheObj in _mapscript:
_mapscript.labelCacheObj_swigregister(labelCacheObj)
class resultObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    shapeindex = property(_mapscript.resultObj_shapeindex_get)
    tileindex = property(_mapscript.resultObj_tileindex_get)
    resultindex = property(_mapscript.resultObj_resultindex_get)
    classindex = property(_mapscript.resultObj_classindex_get)

    def __init__(self, shapeindex):
        _mapscript.resultObj_swiginit(self, _mapscript.new_resultObj(shapeindex))
    __swig_destroy__ = _mapscript.delete_resultObj

# Register resultObj in _mapscript:
_mapscript.resultObj_swigregister(resultObj)
class resultCacheObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numresults = property(_mapscript.resultCacheObj_numresults_get)
    hasnext = property(_mapscript.resultCacheObj_hasnext_get)
    bounds = property(_mapscript.resultCacheObj_bounds_get)

    def getResult(self, i):
        return _mapscript.resultCacheObj_getResult(self, i)

    def __init__(self):
        _mapscript.resultCacheObj_swiginit(self, _mapscript.new_resultCacheObj())
    __swig_destroy__ = _mapscript.delete_resultCacheObj

# Register resultCacheObj in _mapscript:
_mapscript.resultCacheObj_swigregister(resultCacheObj)
class symbolSetObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numsymbols = property(_mapscript.symbolSetObj_numsymbols_get)
    maxsymbols = property(_mapscript.symbolSetObj_maxsymbols_get)
    filename = property(_mapscript.symbolSetObj_filename_get, _mapscript.symbolSetObj_filename_set)
    imagecachesize = property(_mapscript.symbolSetObj_imagecachesize_get, _mapscript.symbolSetObj_imagecachesize_set)

    def __init__(self, symbolfile=None):
        _mapscript.symbolSetObj_swiginit(self, _mapscript.new_symbolSetObj(symbolfile))
    __swig_destroy__ = _mapscript.delete_symbolSetObj

    def getSymbol(self, i):
        return _mapscript.symbolSetObj_getSymbol(self, i)

    def getSymbolByName(self, symbolname):
        return _mapscript.symbolSetObj_getSymbolByName(self, symbolname)

    def index(self, symbolname):
        return _mapscript.symbolSetObj_index(self, symbolname)

    def appendSymbol(self, symbol):
        return _mapscript.symbolSetObj_appendSymbol(self, symbol)

    def removeSymbol(self, index):
        return _mapscript.symbolSetObj_removeSymbol(self, index)

    def save(self, filename):
        return _mapscript.symbolSetObj_save(self, filename)

# Register symbolSetObj in _mapscript:
_mapscript.symbolSetObj_swigregister(symbolSetObj)
class referenceMapObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    map = property(_mapscript.referenceMapObj_map_get)
    extent = property(_mapscript.referenceMapObj_extent_get, _mapscript.referenceMapObj_extent_set)
    height = property(_mapscript.referenceMapObj_height_get, _mapscript.referenceMapObj_height_set)
    width = property(_mapscript.referenceMapObj_width_get, _mapscript.referenceMapObj_width_set)
    color = property(_mapscript.referenceMapObj_color_get, _mapscript.referenceMapObj_color_set)
    outlinecolor = property(_mapscript.referenceMapObj_outlinecolor_get, _mapscript.referenceMapObj_outlinecolor_set)
    image = property(_mapscript.referenceMapObj_image_get, _mapscript.referenceMapObj_image_set)
    status = property(_mapscript.referenceMapObj_status_get, _mapscript.referenceMapObj_status_set)
    marker = property(_mapscript.referenceMapObj_marker_get, _mapscript.referenceMapObj_marker_set)
    markername = property(_mapscript.referenceMapObj_markername_get, _mapscript.referenceMapObj_markername_set)
    markersize = property(_mapscript.referenceMapObj_markersize_get, _mapscript.referenceMapObj_markersize_set)
    minboxsize = property(_mapscript.referenceMapObj_minboxsize_get, _mapscript.referenceMapObj_minboxsize_set)
    maxboxsize = property(_mapscript.referenceMapObj_maxboxsize_get, _mapscript.referenceMapObj_maxboxsize_set)

    def updateFromString(self, snippet):
        return _mapscript.referenceMapObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.referenceMapObj_convertToString(self)

    def __init__(self):
        _mapscript.referenceMapObj_swiginit(self, _mapscript.new_referenceMapObj())
    __swig_destroy__ = _mapscript.delete_referenceMapObj

# Register referenceMapObj in _mapscript:
_mapscript.referenceMapObj_swigregister(referenceMapObj)
MS_SCALEBAR_INTERVALS_MIN = _mapscript.MS_SCALEBAR_INTERVALS_MIN
MS_SCALEBAR_INTERVALS_MAX = _mapscript.MS_SCALEBAR_INTERVALS_MAX
MS_SCALEBAR_WIDTH_MIN = _mapscript.MS_SCALEBAR_WIDTH_MIN
MS_SCALEBAR_WIDTH_MAX = _mapscript.MS_SCALEBAR_WIDTH_MAX
MS_SCALEBAR_HEIGHT_MIN = _mapscript.MS_SCALEBAR_HEIGHT_MIN
MS_SCALEBAR_HEIGHT_MAX = _mapscript.MS_SCALEBAR_HEIGHT_MAX
MS_SCALEBAR_OFFSET_MIN = _mapscript.MS_SCALEBAR_OFFSET_MIN
MS_SCALEBAR_OFFSET_MAX = _mapscript.MS_SCALEBAR_OFFSET_MAX
class scalebarObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    transparent = property(_mapscript.scalebarObj_transparent_get, _mapscript.scalebarObj_transparent_set)
    imagecolor = property(_mapscript.scalebarObj_imagecolor_get, _mapscript.scalebarObj_imagecolor_set)
    height = property(_mapscript.scalebarObj_height_get, _mapscript.scalebarObj_height_set)
    width = property(_mapscript.scalebarObj_width_get, _mapscript.scalebarObj_width_set)
    style = property(_mapscript.scalebarObj_style_get, _mapscript.scalebarObj_style_set)
    intervals = property(_mapscript.scalebarObj_intervals_get, _mapscript.scalebarObj_intervals_set)
    label = property(_mapscript.scalebarObj_label_get, _mapscript.scalebarObj_label_set)
    color = property(_mapscript.scalebarObj_color_get, _mapscript.scalebarObj_color_set)
    backgroundcolor = property(_mapscript.scalebarObj_backgroundcolor_get, _mapscript.scalebarObj_backgroundcolor_set)
    outlinecolor = property(_mapscript.scalebarObj_outlinecolor_get, _mapscript.scalebarObj_outlinecolor_set)
    units = property(_mapscript.scalebarObj_units_get, _mapscript.scalebarObj_units_set)
    status = property(_mapscript.scalebarObj_status_get, _mapscript.scalebarObj_status_set)
    position = property(_mapscript.scalebarObj_position_get, _mapscript.scalebarObj_position_set)
    postlabelcache = property(_mapscript.scalebarObj_postlabelcache_get, _mapscript.scalebarObj_postlabelcache_set)
    align = property(_mapscript.scalebarObj_align_get, _mapscript.scalebarObj_align_set)
    offsetx = property(_mapscript.scalebarObj_offsetx_get, _mapscript.scalebarObj_offsetx_set)
    offsety = property(_mapscript.scalebarObj_offsety_get, _mapscript.scalebarObj_offsety_set)

    def updateFromString(self, snippet):
        return _mapscript.scalebarObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.scalebarObj_convertToString(self)

    def __init__(self):
        _mapscript.scalebarObj_swiginit(self, _mapscript.new_scalebarObj())
    __swig_destroy__ = _mapscript.delete_scalebarObj

# Register scalebarObj in _mapscript:
_mapscript.scalebarObj_swigregister(scalebarObj)
MS_LEGEND_KEYSIZE_MIN = _mapscript.MS_LEGEND_KEYSIZE_MIN
MS_LEGEND_KEYSIZE_MAX = _mapscript.MS_LEGEND_KEYSIZE_MAX
MS_LEGEND_KEYSPACING_MIN = _mapscript.MS_LEGEND_KEYSPACING_MIN
MS_LEGEND_KEYSPACING_MAX = _mapscript.MS_LEGEND_KEYSPACING_MAX
class legendObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    label = property(_mapscript.legendObj_label_get)
    map = property(_mapscript.legendObj_map_get)
    transparent = property(_mapscript.legendObj_transparent_get, _mapscript.legendObj_transparent_set)
    imagecolor = property(_mapscript.legendObj_imagecolor_get, _mapscript.legendObj_imagecolor_set)
    keysizex = property(_mapscript.legendObj_keysizex_get, _mapscript.legendObj_keysizex_set)
    keysizey = property(_mapscript.legendObj_keysizey_get, _mapscript.legendObj_keysizey_set)
    keyspacingx = property(_mapscript.legendObj_keyspacingx_get, _mapscript.legendObj_keyspacingx_set)
    keyspacingy = property(_mapscript.legendObj_keyspacingy_get, _mapscript.legendObj_keyspacingy_set)
    outlinecolor = property(_mapscript.legendObj_outlinecolor_get, _mapscript.legendObj_outlinecolor_set)
    status = property(_mapscript.legendObj_status_get, _mapscript.legendObj_status_set)
    height = property(_mapscript.legendObj_height_get, _mapscript.legendObj_height_set)
    width = property(_mapscript.legendObj_width_get, _mapscript.legendObj_width_set)
    position = property(_mapscript.legendObj_position_get, _mapscript.legendObj_position_set)
    postlabelcache = property(_mapscript.legendObj_postlabelcache_get, _mapscript.legendObj_postlabelcache_set)
    template = property(_mapscript.legendObj_template_get, _mapscript.legendObj_template_set)

    def updateFromString(self, snippet):
        return _mapscript.legendObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.legendObj_convertToString(self)

    def __init__(self):
        _mapscript.legendObj_swiginit(self, _mapscript.new_legendObj())
    __swig_destroy__ = _mapscript.delete_legendObj

# Register legendObj in _mapscript:
_mapscript.legendObj_swigregister(legendObj)
class imageObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    width = property(_mapscript.imageObj_width_get)
    height = property(_mapscript.imageObj_height_get)
    resolution = property(_mapscript.imageObj_resolution_get)
    resolutionfactor = property(_mapscript.imageObj_resolutionfactor_get)
    imagepath = property(_mapscript.imageObj_imagepath_get)
    imageurl = property(_mapscript.imageObj_imageurl_get)
    format = property(_mapscript.imageObj_format_get)

    def __init__(self, *args):
        _mapscript.imageObj_swiginit(self, _mapscript.new_imageObj(*args))
    __swig_destroy__ = _mapscript.delete_imageObj

    def save(self, filename, map=None):
        return _mapscript.imageObj_save(self, filename, map)

    def getBytes(self):
        return _mapscript.imageObj_getBytes(self)

    def getSize(self):
        return _mapscript.imageObj_getSize(self)

    def pasteImage(self, imageSrc, opacity=1.0, dstx=0, dsty=0):
        return _mapscript.imageObj_pasteImage(self, imageSrc, opacity, dstx, dsty)

    def saveWebImage(self):
        return _mapscript.imageObj_saveWebImage(self)

    def write(self, *args):
        return _mapscript.imageObj_write(self, *args)

# Register imageObj in _mapscript:
_mapscript.imageObj_swigregister(imageObj)
class scaleTokenEntryObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    minscale = property(_mapscript.scaleTokenEntryObj_minscale_get, _mapscript.scaleTokenEntryObj_minscale_set)
    maxscale = property(_mapscript.scaleTokenEntryObj_maxscale_get, _mapscript.scaleTokenEntryObj_maxscale_set)
    value = property(_mapscript.scaleTokenEntryObj_value_get, _mapscript.scaleTokenEntryObj_value_set)

    def __init__(self):
        _mapscript.scaleTokenEntryObj_swiginit(self, _mapscript.new_scaleTokenEntryObj())
    __swig_destroy__ = _mapscript.delete_scaleTokenEntryObj

# Register scaleTokenEntryObj in _mapscript:
_mapscript.scaleTokenEntryObj_swigregister(scaleTokenEntryObj)
class scaleTokenObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    name = property(_mapscript.scaleTokenObj_name_get, _mapscript.scaleTokenObj_name_set)
    n_entries = property(_mapscript.scaleTokenObj_n_entries_get, _mapscript.scaleTokenObj_n_entries_set)
    tokens = property(_mapscript.scaleTokenObj_tokens_get, _mapscript.scaleTokenObj_tokens_set)

    def __init__(self):
        _mapscript.scaleTokenObj_swiginit(self, _mapscript.new_scaleTokenObj())
    __swig_destroy__ = _mapscript.delete_scaleTokenObj

# Register scaleTokenObj in _mapscript:
_mapscript.scaleTokenObj_swigregister(scaleTokenObj)
class layerObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refcount = property(_mapscript.layerObj_refcount_get)
    numclasses = property(_mapscript.layerObj_numclasses_get)
    maxclasses = property(_mapscript.layerObj_maxclasses_get)
    index = property(_mapscript.layerObj_index_get)
    map = property(_mapscript.layerObj_map_get)
    numitems = property(_mapscript.layerObj_numitems_get)
    metadata = property(_mapscript.layerObj_metadata_get)
    validation = property(_mapscript.layerObj_validation_get)
    bindvals = property(_mapscript.layerObj_bindvals_get)
    connectionoptions = property(_mapscript.layerObj_connectionoptions_get)
    cluster = property(_mapscript.layerObj_cluster_get)
    extent = property(_mapscript.layerObj_extent_get)
    numjoins = property(_mapscript.layerObj_numjoins_get)
    utfdata = property(_mapscript.layerObj_utfdata_get)
    compositer = property(_mapscript.layerObj_compositer_get)
    classitem = property(_mapscript.layerObj_classitem_get, _mapscript.layerObj_classitem_set)
    header = property(_mapscript.layerObj_header_get, _mapscript.layerObj_header_set)
    footer = property(_mapscript.layerObj_footer_get, _mapscript.layerObj_footer_set)
    template = property(_mapscript.layerObj_template_get, _mapscript.layerObj_template_set)
    name = property(_mapscript.layerObj_name_get, _mapscript.layerObj_name_set)
    group = property(_mapscript.layerObj_group_get, _mapscript.layerObj_group_set)
    status = property(_mapscript.layerObj_status_get, _mapscript.layerObj_status_set)
    rendermode = property(_mapscript.layerObj_rendermode_get, _mapscript.layerObj_rendermode_set)
    data = property(_mapscript.layerObj_data_get, _mapscript.layerObj_data_set)
    type = property(_mapscript.layerObj_type_get, _mapscript.layerObj_type_set)
    connectiontype = property(_mapscript.layerObj_connectiontype_get, _mapscript.layerObj_connectiontype_set)
    tolerance = property(_mapscript.layerObj_tolerance_get, _mapscript.layerObj_tolerance_set)
    toleranceunits = property(_mapscript.layerObj_toleranceunits_get, _mapscript.layerObj_toleranceunits_set)
    identificationclassauto = property(_mapscript.layerObj_identificationclassauto_get, _mapscript.layerObj_identificationclassauto_set)
    identificationclassgroup = property(_mapscript.layerObj_identificationclassgroup_get, _mapscript.layerObj_identificationclassgroup_set)
    symbolscaledenom = property(_mapscript.layerObj_symbolscaledenom_get, _mapscript.layerObj_symbolscaledenom_set)
    minscaledenom = property(_mapscript.layerObj_minscaledenom_get, _mapscript.layerObj_minscaledenom_set)
    maxscaledenom = property(_mapscript.layerObj_maxscaledenom_get, _mapscript.layerObj_maxscaledenom_set)
    minfeaturesize = property(_mapscript.layerObj_minfeaturesize_get, _mapscript.layerObj_minfeaturesize_set)
    labelminscaledenom = property(_mapscript.layerObj_labelminscaledenom_get, _mapscript.layerObj_labelminscaledenom_set)
    labelmaxscaledenom = property(_mapscript.layerObj_labelmaxscaledenom_get, _mapscript.layerObj_labelmaxscaledenom_set)
    mingeowidth = property(_mapscript.layerObj_mingeowidth_get, _mapscript.layerObj_mingeowidth_set)
    maxgeowidth = property(_mapscript.layerObj_maxgeowidth_get, _mapscript.layerObj_maxgeowidth_set)
    sizeunits = property(_mapscript.layerObj_sizeunits_get, _mapscript.layerObj_sizeunits_set)
    maxfeatures = property(_mapscript.layerObj_maxfeatures_get, _mapscript.layerObj_maxfeatures_set)
    startindex = property(_mapscript.layerObj_startindex_get, _mapscript.layerObj_startindex_set)
    offsite = property(_mapscript.layerObj_offsite_get, _mapscript.layerObj_offsite_set)
    transform = property(_mapscript.layerObj_transform_get, _mapscript.layerObj_transform_set)
    labelcache = property(_mapscript.layerObj_labelcache_get, _mapscript.layerObj_labelcache_set)
    postlabelcache = property(_mapscript.layerObj_postlabelcache_get, _mapscript.layerObj_postlabelcache_set)
    labelitem = property(_mapscript.layerObj_labelitem_get, _mapscript.layerObj_labelitem_set)
    tileitem = property(_mapscript.layerObj_tileitem_get, _mapscript.layerObj_tileitem_set)
    tileindex = property(_mapscript.layerObj_tileindex_get, _mapscript.layerObj_tileindex_set)
    tilesrs = property(_mapscript.layerObj_tilesrs_get, _mapscript.layerObj_tilesrs_set)
    units = property(_mapscript.layerObj_units_get, _mapscript.layerObj_units_set)
    connection = property(_mapscript.layerObj_connection_get, _mapscript.layerObj_connection_set)
    plugin_library = property(_mapscript.layerObj_plugin_library_get, _mapscript.layerObj_plugin_library_set)
    plugin_library_original = property(_mapscript.layerObj_plugin_library_original_get, _mapscript.layerObj_plugin_library_original_set)
    bandsitem = property(_mapscript.layerObj_bandsitem_get, _mapscript.layerObj_bandsitem_set)
    filteritem = property(_mapscript.layerObj_filteritem_get, _mapscript.layerObj_filteritem_set)
    styleitem = property(_mapscript.layerObj_styleitem_get, _mapscript.layerObj_styleitem_set)
    requires = property(_mapscript.layerObj_requires_get, _mapscript.layerObj_requires_set)
    labelrequires = property(_mapscript.layerObj_labelrequires_get, _mapscript.layerObj_labelrequires_set)
    debug = property(_mapscript.layerObj_debug_get, _mapscript.layerObj_debug_set)
    classgroup = property(_mapscript.layerObj_classgroup_get, _mapscript.layerObj_classgroup_set)
    mask = property(_mapscript.layerObj_mask_get, _mapscript.layerObj_mask_set)
    encoding = property(_mapscript.layerObj_encoding_get, _mapscript.layerObj_encoding_set)
    utfitem = property(_mapscript.layerObj_utfitem_get, _mapscript.layerObj_utfitem_set)
    utfitemindex = property(_mapscript.layerObj_utfitemindex_get, _mapscript.layerObj_utfitemindex_set)
    numprocessing = property(_mapscript.layerObj_numprocessing_get)

    def __init__(self, map=None):
        _mapscript.layerObj_swiginit(self, _mapscript.new_layerObj(map))

        self.p_map = None
        if map: 
            self.p_map = map



    def setOpacity(self, opacity):
        return _mapscript.layerObj_setOpacity(self, opacity)

    def getOpacity(self):
        return _mapscript.layerObj_getOpacity(self)
    __swig_destroy__ = _mapscript.delete_layerObj

    def clone(self):
        return _mapscript.layerObj_clone(self)

    def updateFromString(self, snippet):
        return _mapscript.layerObj_updateFromString(self, snippet)

    def convertToString(self):
        return _mapscript.layerObj_convertToString(self)

    def insertClass(*args):
        """
        Insert a **copy** of the class into the layer at the requested *index*. 
        Default index of -1 means insertion at the end of the array of classes. Returns the index at which the class was inserted.
        """
        actualIndex=_mapscript.layerObj_insertClass(*args)
        args[1].p_layer=args[0]
        return actualIndex


    def removeClass(self, index):
        return _mapscript.layerObj_removeClass(self, index)

    def open(self):
        return _mapscript.layerObj_open(self)

    def whichShapes(self, rect):
        return _mapscript.layerObj_whichShapes(self, rect)

    def nextShape(self):
        return _mapscript.layerObj_nextShape(self)

    def close(self):
        return _mapscript.layerObj_close(self)

    def getShape(self, record):
        return _mapscript.layerObj_getShape(self, record)

    def getNumResults(self):
        return _mapscript.layerObj_getNumResults(self)

    def getResultsBounds(self):
        return _mapscript.layerObj_getResultsBounds(self)

    def getResult(self, i):
        return _mapscript.layerObj_getResult(self, i)

    def getClass(*args):
        """
        Fetch the requested class object at *i*. Returns NULL if the class index is out of the legal range. 
        The numclasses field contains the number of classes available, and the first class is index 0.
        """
        clazz = _mapscript.layerObj_getClass(*args)
        if clazz:
            if args and len(args)!=0:
                clazz.p_layer=args[0]
            else:
                clazz.p_layer=None
        return clazz


    def getItem(self, i):
        return _mapscript.layerObj_getItem(self, i)

    def setItems(self, items, numitems):
        return _mapscript.layerObj_setItems(self, items, numitems)

    def draw(self, map, image):
        return _mapscript.layerObj_draw(self, map, image)

    def drawQuery(self, map, image):
        return _mapscript.layerObj_drawQuery(self, map, image)

    def queryByFilter(self, map, string):
        return _mapscript.layerObj_queryByFilter(self, map, string)

    def queryByAttributes(self, map, qitem, qstring, mode):
        return _mapscript.layerObj_queryByAttributes(self, map, qitem, qstring, mode)

    def queryByPoint(self, map, point, mode, buffer):
        return _mapscript.layerObj_queryByPoint(self, map, point, mode, buffer)

    def queryByRect(self, map, rect):
        return _mapscript.layerObj_queryByRect(self, map, rect)

    def queryByFeatures(self, map, slayer):
        return _mapscript.layerObj_queryByFeatures(self, map, slayer)

    def queryByShape(self, map, shape):
        return _mapscript.layerObj_queryByShape(self, map, shape)

    def queryByIndex(self, map, tileindex, shapeindex, bAddToQuery=0):
        return _mapscript.layerObj_queryByIndex(self, map, tileindex, shapeindex, bAddToQuery)

    def getResults(self):
        return _mapscript.layerObj_getResults(self)

    def setFilter(self, filter):
        return _mapscript.layerObj_setFilter(self, filter)

    def getFilterString(self):
        return _mapscript.layerObj_getFilterString(self)

    def setWKTProjection(self, wkt):
        return _mapscript.layerObj_setWKTProjection(self, wkt)

    def getProjection(self):
        return _mapscript.layerObj_getProjection(self)

    def setProjection(self, proj4):
        return _mapscript.layerObj_setProjection(self, proj4)

    def addFeature(self, shape):
        return _mapscript.layerObj_addFeature(self, shape)

    def getNumFeatures(self):
        return _mapscript.layerObj_getNumFeatures(self)

    def getExtent(self):
        return _mapscript.layerObj_getExtent(self)

    def setExtent(self, minx=-1.0, miny=-1.0, maxx=-1.0, maxy=-1.0):
        return _mapscript.layerObj_setExtent(self, minx, miny, maxx, maxy)

    def getWMSFeatureInfoURL(self, map, click_x, click_y, feature_count, info_format):
        return _mapscript.layerObj_getWMSFeatureInfoURL(self, map, click_x, click_y, feature_count, info_format)

    def executeWFSGetFeature(self):
        return _mapscript.layerObj_executeWFSGetFeature(self)

    def applySLD(self, sld, stylelayer):
        return _mapscript.layerObj_applySLD(self, sld, stylelayer)

    def applySLDURL(self, sld, stylelayer):
        return _mapscript.layerObj_applySLDURL(self, sld, stylelayer)

    def generateSLD(self):
        return _mapscript.layerObj_generateSLD(self)

    def isVisible(self):
        return _mapscript.layerObj_isVisible(self)

    def moveClassUp(self, index):
        return _mapscript.layerObj_moveClassUp(self, index)

    def moveClassDown(self, index):
        return _mapscript.layerObj_moveClassDown(self, index)

    def setProcessingKey(self, key, value):
        return _mapscript.layerObj_setProcessingKey(self, key, value)

    def addProcessing(self, directive):
        return _mapscript.layerObj_addProcessing(self, directive)

    def getNumProcessing(self):
        return _mapscript.layerObj_getNumProcessing(self)

    def getProcessing(self, index):
        return _mapscript.layerObj_getProcessing(self, index)

    def getProcessingKey(self, key):
        return _mapscript.layerObj_getProcessingKey(self, key)

    def clearProcessing(self):
        return _mapscript.layerObj_clearProcessing(self)

    def setConnectionType(self, connectiontype, library_str):
        return _mapscript.layerObj_setConnectionType(self, connectiontype, library_str)

    def getClassIndex(self, map, shape, classgroup=None, numclasses=0):
        return _mapscript.layerObj_getClassIndex(self, map, shape, classgroup, numclasses)

    def getGeomTransform(self):
        return _mapscript.layerObj_getGeomTransform(self)

    def setGeomTransform(self, transform):
        return _mapscript.layerObj_setGeomTransform(self, transform)

    def getItemType(self, i):
        return _mapscript.layerObj_getItemType(self, i)


    def getItemDefinitions(self):
        """
        **Python MapScript only**

        Return item (field) names and their types if available.
        Field types are specified using GML metadata and can be one of the following:

        ``Integer|Long|Real|Character|Date|Boolean``

        """
        item_names = [self.getItem(idx) for idx in range(0, self.numitems)]
        item_types = [self.getItemType(idx) for idx in range(0, self.numitems)]
        return zip(item_names, item_types)



# Register layerObj in _mapscript:
_mapscript.layerObj_swigregister(layerObj)
MS_RESOLUTION_MAX = _mapscript.MS_RESOLUTION_MAX
MS_RESOLUTION_MIN = _mapscript.MS_RESOLUTION_MIN
class mapObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refcount = property(_mapscript.mapObj_refcount_get)
    numlayers = property(_mapscript.mapObj_numlayers_get)
    maxlayers = property(_mapscript.mapObj_maxlayers_get)
    configoptions = property(_mapscript.mapObj_configoptions_get)
    symbolset = property(_mapscript.mapObj_symbolset_get)
    fontset = property(_mapscript.mapObj_fontset_get)
    labelcache = property(_mapscript.mapObj_labelcache_get)
    numoutputformats = property(_mapscript.mapObj_numoutputformats_get)
    outputformat = property(_mapscript.mapObj_outputformat_get)
    imagetype = property(_mapscript.mapObj_imagetype_get)
    reference = property(_mapscript.mapObj_reference_get)
    scalebar = property(_mapscript.mapObj_scalebar_get)
    legend = property(_mapscript.mapObj_legend_get)
    querymap = property(_mapscript.mapObj_querymap_get)
    web = property(_mapscript.mapObj_web_get)
    config = property(_mapscript.mapObj_config_get)
    datapattern = property(_mapscript.mapObj_datapattern_get, _mapscript.mapObj_datapattern_set)
    templatepattern = property(_mapscript.mapObj_templatepattern_get, _mapscript.mapObj_templatepattern_set)
    name = property(_mapscript.mapObj_name_get, _mapscript.mapObj_name_set)
    status = property(_mapscript.mapObj_status_get, _mapscript.mapObj_status_set)
    height = property(_mapscript.mapObj_height_get, _mapscript.mapObj_height_set)
    width = property(_mapscript.mapObj_width_get, _mapscript.mapObj_width_set)
    maxsize = property(_mapscript.mapObj_maxsize_get, _mapscript.mapObj_maxsize_set)
    extent = property(_mapscript.mapObj_extent_get, _mapscript.mapObj_extent_set)
    cellsize = property(_mapscript.mapObj_cellsize_get, _mapscript.mapObj_cellsize_set)
    units = property(_mapscript.mapObj_units_get, _mapscript.mapObj_units_set)
    scaledenom = property(_mapscript.mapObj_scaledenom_get, _mapscript.mapObj_scaledenom_set)
    resolution = property(_mapscript.mapObj_resolution_get, _mapscript.mapObj_resolution_set)
    defresolution = property(_mapscript.mapObj_defresolution_get, _mapscript.mapObj_defresolution_set)
    shapepath = property(_mapscript.mapObj_shapepath_get, _mapscript.mapObj_shapepath_set)
    mappath = property(_mapscript.mapObj_mappath_get, _mapscript.mapObj_mappath_set)
    sldurl = property(_mapscript.mapObj_sldurl_get, _mapscript.mapObj_sldurl_set)
    imagecolor = property(_mapscript.mapObj_imagecolor_get, _mapscript.mapObj_imagecolor_set)
    layerorder = property(_mapscript.mapObj_layerorder_get, _mapscript.mapObj_layerorder_set)
    debug = property(_mapscript.mapObj_debug_get, _mapscript.mapObj_debug_set)

    def __init__(self, *args):
        _mapscript.mapObj_swiginit(self, _mapscript.new_mapObj(*args))
    __swig_destroy__ = _mapscript.delete_mapObj

    def clone(self):
        return _mapscript.mapObj_clone(self)

    def insertLayer(*args):
        """
        Insert a copy of *layer* into the map at *index*.
        The default value of *index* is -1, which means the last possible index. 
        Returns the index of the new layer, or -1 in the case of a failure.
        """
        actualIndex=_mapscript.mapObj_insertLayer(*args)
        args[1].p_map=args[0]
        return actualIndex


    def removeLayer(self, index):
        return _mapscript.mapObj_removeLayer(self, index)

    def setExtent(self, minx, miny, maxx, maxy):
        return _mapscript.mapObj_setExtent(self, minx, miny, maxx, maxy)

    def offsetExtent(self, x, y):
        return _mapscript.mapObj_offsetExtent(self, x, y)

    def scaleExtent(self, zoomfactor, minscaledenom, maxscaledenom):
        return _mapscript.mapObj_scaleExtent(self, zoomfactor, minscaledenom, maxscaledenom)

    def setCenter(self, center):
        return _mapscript.mapObj_setCenter(self, center)

    def setSize(self, width, height):
        return _mapscript.mapObj_setSize(self, width, height)

    def pixelToGeoref(self, pixPosX, pixPosY, geoPos):
        return _mapscript.mapObj_pixelToGeoref(self, pixPosX, pixPosY, geoPos)

    def getRotation(self):
        return _mapscript.mapObj_getRotation(self)

    def setRotation(self, rotation_angle):
        return _mapscript.mapObj_setRotation(self, rotation_angle)

    def getLayer(*args):
        """
        Returns a reference to the layer at index *i*.
        """
        layer = _mapscript.mapObj_getLayer(*args)
        if layer:
            if args and len(args)!=0:
                layer.p_map=args[0]
            else:
                layer.p_map=None
        return layer


    def getLayerByName(*args):
        """
        Returns a reference to the named layer.
        """
        layer = _mapscript.mapObj_getLayerByName(*args)
        if layer:
            if args and len(args)!=0:
                layer.p_map=args[0]
            else:
                layer.p_map=None
        return layer


    def getSymbolByName(self, name):
        return _mapscript.mapObj_getSymbolByName(self, name)

    def prepareQuery(self):
        return _mapscript.mapObj_prepareQuery(self)

    def prepareImage(self):
        return _mapscript.mapObj_prepareImage(self)

    def setImageType(self, imagetype):
        return _mapscript.mapObj_setImageType(self, imagetype)

    def selectOutputFormat(self, imagetype):
        return _mapscript.mapObj_selectOutputFormat(self, imagetype)

    def getOutputFormat(self, i):
        return _mapscript.mapObj_getOutputFormat(self, i)

    def setOutputFormat(self, format):
        return _mapscript.mapObj_setOutputFormat(self, format)

    def draw(self):
        return _mapscript.mapObj_draw(self)

    def drawQuery(self):
        return _mapscript.mapObj_drawQuery(self)

    def drawLegend(self, scale_independent=0):
        return _mapscript.mapObj_drawLegend(self, scale_independent)

    def drawScalebar(self):
        return _mapscript.mapObj_drawScalebar(self)

    def drawReferenceMap(self):
        return _mapscript.mapObj_drawReferenceMap(self)

    def embedScalebar(self, image):
        return _mapscript.mapObj_embedScalebar(self, image)

    def embedLegend(self, image):
        return _mapscript.mapObj_embedLegend(self, image)

    def drawLabelCache(self, image):
        return _mapscript.mapObj_drawLabelCache(self, image)

    def queryByFilter(self, string):
        return _mapscript.mapObj_queryByFilter(self, string)

    def queryByPoint(self, point, mode, buffer):
        return _mapscript.mapObj_queryByPoint(self, point, mode, buffer)

    def queryByRect(self, rect):
        return _mapscript.mapObj_queryByRect(self, rect)

    def queryByFeatures(self, slayer):
        return _mapscript.mapObj_queryByFeatures(self, slayer)

    def queryByShape(self, shape):
        return _mapscript.mapObj_queryByShape(self, shape)

    def setWKTProjection(self, wkt):
        return _mapscript.mapObj_setWKTProjection(self, wkt)

    def getProjection(self):
        return _mapscript.mapObj_getProjection(self)

    def setProjection(self, proj4):
        return _mapscript.mapObj_setProjection(self, proj4)

    def save(self, filename):
        return _mapscript.mapObj_save(self, filename)

    def saveQuery(self, filename, results=0):
        return _mapscript.mapObj_saveQuery(self, filename, results)

    def loadQuery(self, filename):
        return _mapscript.mapObj_loadQuery(self, filename)

    def freeQuery(self, qlayer=-1):
        return _mapscript.mapObj_freeQuery(self, qlayer)

    def saveQueryAsGML(self, *args):
        return _mapscript.mapObj_saveQueryAsGML(self, *args)

    def setSymbolSet(self, szFileName):
        return _mapscript.mapObj_setSymbolSet(self, szFileName)

    def getNumSymbols(self):
        return _mapscript.mapObj_getNumSymbols(self)

    def setFontSet(self, filename):
        return _mapscript.mapObj_setFontSet(self, filename)

    def saveMapContext(self, szFileName):
        return _mapscript.mapObj_saveMapContext(self, szFileName)

    def loadMapContext(self, szFileName, useUniqueNames=0):
        return _mapscript.mapObj_loadMapContext(self, szFileName, useUniqueNames)

    def moveLayerUp(self, layerindex):
        return _mapscript.mapObj_moveLayerUp(self, layerindex)

    def moveLayerDown(self, layerindex):
        return _mapscript.mapObj_moveLayerDown(self, layerindex)

    def getLayersDrawingOrder(self):
        return _mapscript.mapObj_getLayersDrawingOrder(self)

    def setLayersDrawingOrder(self, panIndexes):
        return _mapscript.mapObj_setLayersDrawingOrder(self, panIndexes)

    def setConfigOption(self, key, value):
        return _mapscript.mapObj_setConfigOption(self, key, value)

    def getConfigOption(self, key):
        return _mapscript.mapObj_getConfigOption(self, key)

    def applyConfigOptions(self):
        return _mapscript.mapObj_applyConfigOptions(self)

    def applySLD(self, sld):
        return _mapscript.mapObj_applySLD(self, sld)

    def applySLDURL(self, sld):
        return _mapscript.mapObj_applySLDURL(self, sld)

    def generateSLD(self, sldVersion=None):
        return _mapscript.mapObj_generateSLD(self, sldVersion)

    def processTemplate(self, bGenerateImages, names, values, numentries):
        return _mapscript.mapObj_processTemplate(self, bGenerateImages, names, values, numentries)

    def processLegendTemplate(self, names, values, numentries):
        return _mapscript.mapObj_processLegendTemplate(self, names, values, numentries)

    def processQueryTemplate(self, names, values, numentries):
        return _mapscript.mapObj_processQueryTemplate(self, names, values, numentries)

    def getOutputFormatByName(self, name):
        return _mapscript.mapObj_getOutputFormatByName(self, name)

    def appendOutputFormat(self, format):
        return _mapscript.mapObj_appendOutputFormat(self, format)

    def removeOutputFormat(self, name):
        return _mapscript.mapObj_removeOutputFormat(self, name)

    def loadOWSParameters(self, *args):
        return _mapscript.mapObj_loadOWSParameters(self, *args)

    def OWSDispatch(self, req):
        return _mapscript.mapObj_OWSDispatch(self, req)

    def convertToString(self):
        return _mapscript.mapObj_convertToString(self)

    def applyDefaultSubstitutions(self):
        return _mapscript.mapObj_applyDefaultSubstitutions(self)

    def applySubstitutions(self, names):
        return _mapscript.mapObj_applySubstitutions(self, names)

    def zoomPoint(self, zoomfactor, poPixPos, width, height, poGeorefExt, poMaxGeorefExt):
        return _mapscript.mapObj_zoomPoint(self, zoomfactor, poPixPos, width, height, poGeorefExt, poMaxGeorefExt)

    def zoomRectangle(self, poPixRect, width, height, poGeorefExt, poMaxGeorefExt):
        return _mapscript.mapObj_zoomRectangle(self, poPixRect, width, height, poGeorefExt, poMaxGeorefExt)

    def zoomScale(self, scale, poPixPos, width, height, poGeorefExt, poMaxGeorefExt):
        return _mapscript.mapObj_zoomScale(self, scale, poPixPos, width, height, poGeorefExt, poMaxGeorefExt)

    def getLayerOrder(self):
        return _mapscript.mapObj_getLayerOrder(self)

    def setLayerOrder(self, order):
        return _mapscript.mapObj_setLayerOrder(self, order)

    def getSize(self):
        return _mapscript.mapObj_getSize(self)


    def get_height(self):
        """
        **Python MapScript only**
        Return the map height from the map size
        """
        return self.getSize()[1] # <-- second member is the height

    def get_width(self):
        """
        **Python MapScript only**
        Return the map width from the map size
        """
        return self.getSize()[0] # <-- first member is the width

    def set_height(self, value):
        """
        **Python MapScript only**
        Set the map height value of the map size
        """
        return self.setSize(self.getSize()[0], value)

    def set_width(self, value):
        """
        **Python MapScript only**
        Set the map width value of the map size
        """
        return self.setSize(value, self.getSize()[1])

    width = property(get_width, set_width, doc="See :ref:`SIZE <mapfile-map-size>`")
    height = property(get_height, set_height, doc = "See :ref:`SIZE <mapfile-map-size>`")



# Register mapObj in _mapscript:
_mapscript.mapObj_swigregister(mapObj)

def msSaveImage(map, img, filename):
    return _mapscript.msSaveImage(map, img, filename)

def msFreeImage(img):
    return _mapscript.msFreeImage(img)

def msSetup():
    return _mapscript.msSetup()

def msCleanup():
    return _mapscript.msCleanup()

def msLoadMapFromString(buffer, new_mappath, config):
    return _mapscript.msLoadMapFromString(buffer, new_mappath, config)
MS_VERSION_MAJOR = _mapscript.MS_VERSION_MAJOR
MS_VERSION_MINOR = _mapscript.MS_VERSION_MINOR
MS_VERSION_REV = _mapscript.MS_VERSION_REV
MS_VERSION = _mapscript.MS_VERSION
MS_VERSION_NUM = _mapscript.MS_VERSION_NUM
class rectObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    minx = property(_mapscript.rectObj_minx_get, _mapscript.rectObj_minx_set)
    miny = property(_mapscript.rectObj_miny_get, _mapscript.rectObj_miny_set)
    maxx = property(_mapscript.rectObj_maxx_get, _mapscript.rectObj_maxx_set)
    maxy = property(_mapscript.rectObj_maxy_get, _mapscript.rectObj_maxy_set)

    def __init__(self, minx=-1.0, miny=-1.0, maxx=-1.0, maxy=-1.0, imageunits=0):
        _mapscript.rectObj_swiginit(self, _mapscript.new_rectObj(minx, miny, maxx, maxy, imageunits))
    __swig_destroy__ = _mapscript.delete_rectObj

    def project(self, *args):
        return _mapscript.rectObj_project(self, *args)

    def fit(self, width, height):
        return _mapscript.rectObj_fit(self, width, height)

    def draw(self, map, layer, image, classindex, text):
        return _mapscript.rectObj_draw(self, map, layer, image, classindex, text)

    def getCenter(self):
        return _mapscript.rectObj_getCenter(self)

    def toPolygon(self):
        return _mapscript.rectObj_toPolygon(self)

    def toString(self):
        return _mapscript.rectObj_toString(self)


    def __str__(self):
        return self.toString()

    def __contains__(self, item):
        item_type = item.__class__.__name__
        if item_type == "pointObj":
            if item.x >= self.minx and item.x <= self.maxx \
            and item.y >= self.miny and item.y <= self.maxy:
                return True
            else:
                return False
        else:
            raise TypeError('__contains__ does not yet handle %s' % (item_type))



# Register rectObj in _mapscript:
_mapscript.rectObj_swigregister(rectObj)
class pointObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    x = property(_mapscript.pointObj_x_get, _mapscript.pointObj_x_set)
    y = property(_mapscript.pointObj_y_get, _mapscript.pointObj_y_set)
    z = property(_mapscript.pointObj_z_get, _mapscript.pointObj_z_set)
    m = property(_mapscript.pointObj_m_get, _mapscript.pointObj_m_set)

    def __init__(self, x=0.0, y=0.0, z=0.0, m=-2e38):
        _mapscript.pointObj_swiginit(self, _mapscript.new_pointObj(x, y, z, m))
    __swig_destroy__ = _mapscript.delete_pointObj

    def project(self, *args):
        return _mapscript.pointObj_project(self, *args)

    def draw(self, map, layer, image, classindex, text):
        return _mapscript.pointObj_draw(self, map, layer, image, classindex, text)

    def distanceToPoint(self, point):
        return _mapscript.pointObj_distanceToPoint(self, point)

    def distanceToSegment(self, a, b):
        return _mapscript.pointObj_distanceToSegment(self, a, b)

    def distanceToShape(self, shape):
        return _mapscript.pointObj_distanceToShape(self, shape)

    def setXY(self, x, y, m=-2e38):
        return _mapscript.pointObj_setXY(self, x, y, m)

    def setXYZ(self, x, y, z, m=-2e38):
        return _mapscript.pointObj_setXYZ(self, x, y, z, m)

    def setXYZM(self, x, y, z, m):
        return _mapscript.pointObj_setXYZM(self, x, y, z, m)

    def toString(self):
        return _mapscript.pointObj_toString(self)

    def toShape(self):
        return _mapscript.pointObj_toShape(self)


    def __str__(self):
        return self.toString()

    @property
    def __geo_interface__(self):

        if hasattr(self, "z"):
            coords = (self.x, self.y, self.z)
        else:
            coords = (self.x, self.y)

        return {"type": "Point", "coordinates": coords}



# Register pointObj in _mapscript:
_mapscript.pointObj_swigregister(pointObj)
class lineObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numpoints = property(_mapscript.lineObj_numpoints_get)

    def __init__(self):
        _mapscript.lineObj_swiginit(self, _mapscript.new_lineObj())
    __swig_destroy__ = _mapscript.delete_lineObj

    def project(self, *args):
        return _mapscript.lineObj_project(self, *args)

    def get(self, i):
        return _mapscript.lineObj_get(self, i)

    def add(self, p):
        return _mapscript.lineObj_add(self, p)

    def set(self, i, p):
        return _mapscript.lineObj_set(self, i, p)


    @property
    def __geo_interface__(self):

        coords = []

        for idx in range(0, self.numpoints):
            pt = self.get(idx)
            geom = pt.__geo_interface__
            coords.append(geom["coordinates"])

        return {"type": "LineString", "coordinates": coords}



# Register lineObj in _mapscript:
_mapscript.lineObj_swigregister(lineObj)
class shapeObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numlines = property(_mapscript.shapeObj_numlines_get)
    numvalues = property(_mapscript.shapeObj_numvalues_get)
    bounds = property(_mapscript.shapeObj_bounds_get, _mapscript.shapeObj_bounds_set)
    type = property(_mapscript.shapeObj_type_get, _mapscript.shapeObj_type_set)
    index = property(_mapscript.shapeObj_index_get, _mapscript.shapeObj_index_set)
    tileindex = property(_mapscript.shapeObj_tileindex_get, _mapscript.shapeObj_tileindex_set)
    classindex = property(_mapscript.shapeObj_classindex_get, _mapscript.shapeObj_classindex_set)
    text = property(_mapscript.shapeObj_text_get, _mapscript.shapeObj_text_set)
    scratch = property(_mapscript.shapeObj_scratch_get, _mapscript.shapeObj_scratch_set)
    resultindex = property(_mapscript.shapeObj_resultindex_get, _mapscript.shapeObj_resultindex_set)

    def __init__(self, type=MS_SHAPE_NULL):
        _mapscript.shapeObj_swiginit(self, _mapscript.new_shapeObj(type))
    __swig_destroy__ = _mapscript.delete_shapeObj

    @staticmethod
    def fromWKT(wkt):
        return _mapscript.shapeObj_fromWKT(wkt)

    def project(self, *args):
        return _mapscript.shapeObj_project(self, *args)

    def get(self, i):
        return _mapscript.shapeObj_get(self, i)

    def add(self, line):
        return _mapscript.shapeObj_add(self, line)

    def draw(self, map, layer, image):
        return _mapscript.shapeObj_draw(self, map, layer, image)

    def setBounds(self):
        return _mapscript.shapeObj_setBounds(self)

    def clone(self):
        return _mapscript.shapeObj_clone(self)

    def copy(self, dest):
        return _mapscript.shapeObj_copy(self, dest)

    def toWKT(self):
        return _mapscript.shapeObj_toWKT(self)

    def buffer(self, width):
        return _mapscript.shapeObj_buffer(self, width)

    def simplify(self, tolerance):
        return _mapscript.shapeObj_simplify(self, tolerance)

    def topologyPreservingSimplify(self, tolerance):
        return _mapscript.shapeObj_topologyPreservingSimplify(self, tolerance)

    def convexHull(self):
        return _mapscript.shapeObj_convexHull(self)

    def boundary(self):
        return _mapscript.shapeObj_boundary(self)

    def getCentroid(self):
        return _mapscript.shapeObj_getCentroid(self)

    def Union(self, shape):
        return _mapscript.shapeObj_Union(self, shape)

    def intersection(self, shape):
        return _mapscript.shapeObj_intersection(self, shape)

    def difference(self, shape):
        return _mapscript.shapeObj_difference(self, shape)

    def symDifference(self, shape):
        return _mapscript.shapeObj_symDifference(self, shape)

    def overlaps(self, shape):
        return _mapscript.shapeObj_overlaps(self, shape)

    def within(self, shape):
        return _mapscript.shapeObj_within(self, shape)

    def crosses(self, shape):
        return _mapscript.shapeObj_crosses(self, shape)

    def intersects(self, shape):
        return _mapscript.shapeObj_intersects(self, shape)

    def touches(self, shape):
        return _mapscript.shapeObj_touches(self, shape)

    def equals(self, shape):
        return _mapscript.shapeObj_equals(self, shape)

    def disjoint(self, shape):
        return _mapscript.shapeObj_disjoint(self, shape)

    def getArea(self):
        return _mapscript.shapeObj_getArea(self)

    def getLength(self):
        return _mapscript.shapeObj_getLength(self)

    def getValue(self, i):
        return _mapscript.shapeObj_getValue(self, i)

    def contains(self, *args):
        return _mapscript.shapeObj_contains(self, *args)

    def distanceToPoint(self, point):
        return _mapscript.shapeObj_distanceToPoint(self, point)

    def distanceToShape(self, shape):
        return _mapscript.shapeObj_distanceToShape(self, shape)

    def getLabelPoint(self):
        return _mapscript.shapeObj_getLabelPoint(self)

    def setValue(self, i, value):
        return _mapscript.shapeObj_setValue(self, i, value)

    def initValues(self, numvalues):
        return _mapscript.shapeObj_initValues(self, numvalues)


    def _convert_item_values(self, property_values, property_types):
        """
        **Python MapScript only**

        Convert an item value, which is always stored as a string, into a
        Python type, based on an attributes GML metadata type. These can be one
        of the following:

        ``Integer|Long|Real|Character|Date|Boolean``
        """

        typed_values = []

        for value, type_ in zip(property_values, property_types):
            try:
                if type_.lower() == "integer":
                    value = int(value)
                elif type_.lower() == "long":
                    value = long(value)
                elif type_.lower() == "real":
                    value = float(value)
                else:
                    pass
            except ValueError:
                pass

            typed_values.append(value)

        return typed_values

    @property
    def __geo_interface__(self):

        bounds = self.bounds
        ms_geom_type = self.type

    # see https://tools.ietf.org/html/rfc7946 for GeoJSON types

        if ms_geom_type == MS_SHAPE_POINT or ms_geom_type == MS_SHP_POINTZ or ms_geom_type == MS_SHP_POINTM:
            geom_type = "Point"
        elif ms_geom_type == MS_SHP_MULTIPOINTZ or ms_geom_type == MS_SHP_MULTIPOINTM:
            geom_type = "MultiPoint"
        elif ms_geom_type == MS_SHAPE_LINE or ms_geom_type == MS_SHP_ARCZ or ms_geom_type == MS_SHP_ARCM:
            if self.numlines == 1:
                geom_type = "LineString"
            else:
                geom_type = "MultiLineString"
        elif ms_geom_type == MS_SHAPE_POLYGON or ms_geom_type == MS_SHP_POLYGONZ or ms_geom_type == MS_SHP_POLYGONM:
            if self.numlines == 1:
                geom_type = "Polygon"
            else:
                geom_type = "MultiPolygon"
        elif ms_geom_type == MS_SHAPE_NULL:
            return None
        else:
            raise TypeError("Shape type {} not supported".format(geom_type))

        properties = {}
        coords = []

    # property names are stored at the layer level
    # https://github.com/mapserver/mapserver/issues/130

        property_values = [self.getValue(idx) for idx in range(0, self.numvalues)]

        if hasattr(self, "_item_definitions"):
            property_names, property_types = zip(*self._item_definitions)
            property_values = self._convert_item_values(property_values, property_types)
        else:
            property_names = [str(idx) for idx in range(0, self.numvalues)]

        properties = dict(zip(property_names, property_values))

        for idx in range(0, self.numlines):
            line = self.get(idx)
            geom = line.__geo_interface__
            coords.append(geom["coordinates"])

        return {
                "type": "Feature",
                "bbox": (bounds.minx, bounds.miny, bounds.maxx, bounds.maxy),
                "properties": properties,
                "geometry": {
                    "type": geom_type,
                    "coordinates": coords
                    }
                }

    @property
    def itemdefinitions(self):
        return self._item_definitions

    @itemdefinitions.setter
    def itemdefinitions(self, item_definitions):
        self._item_definitions = item_definitions



# Register shapeObj in _mapscript:
_mapscript.shapeObj_swigregister(shapeObj)
MS_NOERR = _mapscript.MS_NOERR
MS_IOERR = _mapscript.MS_IOERR
MS_MEMERR = _mapscript.MS_MEMERR
MS_TYPEERR = _mapscript.MS_TYPEERR
MS_SYMERR = _mapscript.MS_SYMERR
MS_REGEXERR = _mapscript.MS_REGEXERR
MS_TTFERR = _mapscript.MS_TTFERR
MS_DBFERR = _mapscript.MS_DBFERR
MS_IDENTERR = _mapscript.MS_IDENTERR
MS_EOFERR = _mapscript.MS_EOFERR
MS_PROJERR = _mapscript.MS_PROJERR
MS_MISCERR = _mapscript.MS_MISCERR
MS_CGIERR = _mapscript.MS_CGIERR
MS_WEBERR = _mapscript.MS_WEBERR
MS_IMGERR = _mapscript.MS_IMGERR
MS_HASHERR = _mapscript.MS_HASHERR
MS_JOINERR = _mapscript.MS_JOINERR
MS_NOTFOUND = _mapscript.MS_NOTFOUND
MS_SHPERR = _mapscript.MS_SHPERR
MS_PARSEERR = _mapscript.MS_PARSEERR
MS_UNUSEDERR = _mapscript.MS_UNUSEDERR
MS_OGRERR = _mapscript.MS_OGRERR
MS_QUERYERR = _mapscript.MS_QUERYERR
MS_WMSERR = _mapscript.MS_WMSERR
MS_WMSCONNERR = _mapscript.MS_WMSCONNERR
MS_ORACLESPATIALERR = _mapscript.MS_ORACLESPATIALERR
MS_WFSERR = _mapscript.MS_WFSERR
MS_WFSCONNERR = _mapscript.MS_WFSCONNERR
MS_MAPCONTEXTERR = _mapscript.MS_MAPCONTEXTERR
MS_HTTPERR = _mapscript.MS_HTTPERR
MS_CHILDERR = _mapscript.MS_CHILDERR
MS_WCSERR = _mapscript.MS_WCSERR
MS_GEOSERR = _mapscript.MS_GEOSERR
MS_RECTERR = _mapscript.MS_RECTERR
MS_TIMEERR = _mapscript.MS_TIMEERR
MS_GMLERR = _mapscript.MS_GMLERR
MS_SOSERR = _mapscript.MS_SOSERR
MS_NULLPARENTERR = _mapscript.MS_NULLPARENTERR
MS_AGGERR = _mapscript.MS_AGGERR
MS_OWSERR = _mapscript.MS_OWSERR
MS_OGLERR = _mapscript.MS_OGLERR
MS_RENDERERERR = _mapscript.MS_RENDERERERR
MS_V8ERR = _mapscript.MS_V8ERR
MS_OGCAPIERR = _mapscript.MS_OGCAPIERR
MS_FGBERR = _mapscript.MS_FGBERR
MS_NUMERRORCODES = _mapscript.MS_NUMERRORCODES
MESSAGELENGTH = _mapscript.MESSAGELENGTH
ROUTINELENGTH = _mapscript.ROUTINELENGTH
HTTPSTATUSLENGTH = _mapscript.HTTPSTATUSLENGTH
MS_ERROR_LANGUAGE = _mapscript.MS_ERROR_LANGUAGE
MS_HTTP_400_BAD_REQUEST = _mapscript.MS_HTTP_400_BAD_REQUEST
MS_HTTP_500_INTERNAL_SERVER_ERROR = _mapscript.MS_HTTP_500_INTERNAL_SERVER_ERROR
class errorObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_mapscript.errorObj_code_get, _mapscript.errorObj_code_set)
    routine = property(_mapscript.errorObj_routine_get, _mapscript.errorObj_routine_set)
    message = property(_mapscript.errorObj_message_get, _mapscript.errorObj_message_set)
    http_status = property(_mapscript.errorObj_http_status_get, _mapscript.errorObj_http_status_set)
    isreported = property(_mapscript.errorObj_isreported_get, _mapscript.errorObj_isreported_set)
    errorcount = property(_mapscript.errorObj_errorcount_get, _mapscript.errorObj_errorcount_set)

    def __init__(self):
        _mapscript.errorObj_swiginit(self, _mapscript.new_errorObj())
    __swig_destroy__ = _mapscript.delete_errorObj

    def next(self):
        return _mapscript.errorObj_next(self)

# Register errorObj in _mapscript:
_mapscript.errorObj_swigregister(errorObj)

def msGetErrorObj():
    return _mapscript.msGetErrorObj()

def msResetErrorList():
    return _mapscript.msResetErrorList()

def msGetVersion():
    return _mapscript.msGetVersion()

def msGetVersionInt():
    return _mapscript.msGetVersionInt()

def msGetErrorString(delimiter):
    return _mapscript.msGetErrorString(delimiter)
MS_DEBUGLEVEL_ERRORSONLY = _mapscript.MS_DEBUGLEVEL_ERRORSONLY
MS_DEBUGLEVEL_DEBUG = _mapscript.MS_DEBUGLEVEL_DEBUG
MS_DEBUGLEVEL_TUNING = _mapscript.MS_DEBUGLEVEL_TUNING
MS_DEBUGLEVEL_V = _mapscript.MS_DEBUGLEVEL_V
MS_DEBUGLEVEL_VV = _mapscript.MS_DEBUGLEVEL_VV
MS_DEBUGLEVEL_VVV = _mapscript.MS_DEBUGLEVEL_VVV
MS_DEBUGLEVEL_DEVDEBUG = _mapscript.MS_DEBUGLEVEL_DEVDEBUG
SHX_BUFFER_PAGE = _mapscript.SHX_BUFFER_PAGE
MS_SHAPEFILE_POINT = _mapscript.MS_SHAPEFILE_POINT
MS_SHAPEFILE_ARC = _mapscript.MS_SHAPEFILE_ARC
MS_SHAPEFILE_POLYGON = _mapscript.MS_SHAPEFILE_POLYGON
MS_SHAPEFILE_MULTIPOINT = _mapscript.MS_SHAPEFILE_MULTIPOINT
MS_SHP_POINTZ = _mapscript.MS_SHP_POINTZ
MS_SHP_ARCZ = _mapscript.MS_SHP_ARCZ
MS_SHP_POLYGONZ = _mapscript.MS_SHP_POLYGONZ
MS_SHP_MULTIPOINTZ = _mapscript.MS_SHP_MULTIPOINTZ
MS_SHP_POINTM = _mapscript.MS_SHP_POINTM
MS_SHP_ARCM = _mapscript.MS_SHP_ARCM
MS_SHP_POLYGONM = _mapscript.MS_SHP_POLYGONM
MS_SHP_MULTIPOINTM = _mapscript.MS_SHP_MULTIPOINTM
class DBFInfo(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nRecords = property(_mapscript.DBFInfo_nRecords_get)
    nFields = property(_mapscript.DBFInfo_nFields_get)

    def getFieldName(self, iField):
        return _mapscript.DBFInfo_getFieldName(self, iField)

    def getFieldWidth(self, iField):
        return _mapscript.DBFInfo_getFieldWidth(self, iField)

    def getFieldDecimals(self, iField):
        return _mapscript.DBFInfo_getFieldDecimals(self, iField)

    def getFieldType(self, iField):
        return _mapscript.DBFInfo_getFieldType(self, iField)

    def __init__(self):
        _mapscript.DBFInfo_swiginit(self, _mapscript.new_DBFInfo())
    __swig_destroy__ = _mapscript.delete_DBFInfo

# Register DBFInfo in _mapscript:
_mapscript.DBFInfo_swigregister(DBFInfo)
FTString = _mapscript.FTString
FTInteger = _mapscript.FTInteger
FTDouble = _mapscript.FTDouble
FTInvalid = _mapscript.FTInvalid
class shapefileObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    type = property(_mapscript.shapefileObj_type_get)
    numshapes = property(_mapscript.shapefileObj_numshapes_get)
    bounds = property(_mapscript.shapefileObj_bounds_get)

    def __init__(self, filename, type=-1):
        _mapscript.shapefileObj_swiginit(self, _mapscript.new_shapefileObj(filename, type))
    __swig_destroy__ = _mapscript.delete_shapefileObj

    def get(self, i, shape):
        return _mapscript.shapefileObj_get(self, i, shape)

    def getShape(self, i):
        return _mapscript.shapefileObj_getShape(self, i)

    def getPoint(self, i, point):
        return _mapscript.shapefileObj_getPoint(self, i, point)

    def getTransformed(self, map, i, shape):
        return _mapscript.shapefileObj_getTransformed(self, map, i, shape)

    def getExtent(self, i, rect):
        return _mapscript.shapefileObj_getExtent(self, i, rect)

    def add(self, shape):
        return _mapscript.shapefileObj_add(self, shape)

    def addPoint(self, point):
        return _mapscript.shapefileObj_addPoint(self, point)

    def getDBF(self):
        return _mapscript.shapefileObj_getDBF(self)

# Register shapefileObj in _mapscript:
_mapscript.shapefileObj_swigregister(shapefileObj)
wkp_none = _mapscript.wkp_none
wkp_lonlat = _mapscript.wkp_lonlat
wkp_gmerc = _mapscript.wkp_gmerc
class projectionObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numargs = property(_mapscript.projectionObj_numargs_get)
    generation_number = property(_mapscript.projectionObj_generation_number_get)
    wellknownprojection = property(_mapscript.projectionObj_wellknownprojection_get, _mapscript.projectionObj_wellknownprojection_set)

    def __init__(self, proj4):
        _mapscript.projectionObj_swiginit(self, _mapscript.new_projectionObj(proj4))
    __swig_destroy__ = _mapscript.delete_projectionObj

    def setWKTProjection(self, wkt):
        return _mapscript.projectionObj_setWKTProjection(self, wkt)

    def getUnits(self):
        return _mapscript.projectionObj_getUnits(self)

# Register projectionObj in _mapscript:
_mapscript.projectionObj_swigregister(projectionObj)
class reprojectionObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    generation_number_in = property(_mapscript.reprojectionObj_generation_number_in_get, _mapscript.reprojectionObj_generation_number_in_set)
    generation_number_out = property(_mapscript.reprojectionObj_generation_number_out_get, _mapscript.reprojectionObj_generation_number_out_set)

    def __init__(self, _in, out):
        _mapscript.reprojectionObj_swiginit(self, _mapscript.new_reprojectionObj(_in, out))
    __swig_destroy__ = _mapscript.delete_reprojectionObj

# Register reprojectionObj in _mapscript:
_mapscript.reprojectionObj_swigregister(reprojectionObj)
MS_SYMBOL_SIMPLE = _mapscript.MS_SYMBOL_SIMPLE
MS_SYMBOL_VECTOR = _mapscript.MS_SYMBOL_VECTOR
MS_SYMBOL_ELLIPSE = _mapscript.MS_SYMBOL_ELLIPSE
MS_SYMBOL_PIXMAP = _mapscript.MS_SYMBOL_PIXMAP
MS_SYMBOL_TRUETYPE = _mapscript.MS_SYMBOL_TRUETYPE
MS_SYMBOL_HATCH = _mapscript.MS_SYMBOL_HATCH
MS_SYMBOL_SVG = _mapscript.MS_SYMBOL_SVG
MS_SYMBOL_ALLOCSIZE = _mapscript.MS_SYMBOL_ALLOCSIZE
MS_MAXVECTORPOINTS = _mapscript.MS_MAXVECTORPOINTS
MS_MAXPATTERNLENGTH = _mapscript.MS_MAXPATTERNLENGTH
MS_IMAGECACHESIZE = _mapscript.MS_IMAGECACHESIZE
class colorObj(object):
    r"""An object representing a color."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    red = property(_mapscript.colorObj_red_get, _mapscript.colorObj_red_set, doc=r"""Red component of color in range [0-255]""")
    green = property(_mapscript.colorObj_green_get, _mapscript.colorObj_green_set, doc=r"""Green component of color in range [0-255]""")
    blue = property(_mapscript.colorObj_blue_get, _mapscript.colorObj_blue_set, doc=r"""Blue component of color in range [0-255]""")
    alpha = property(_mapscript.colorObj_alpha_get, _mapscript.colorObj_alpha_set, doc=r"""Alpha (opacity) component of color in range [0-255]""")

    def __init__(self, red=0, green=0, blue=0, alpha=255):
        r"""An object representing a color."""
        _mapscript.colorObj_swiginit(self, _mapscript.new_colorObj(red, green, blue, alpha))
    __swig_destroy__ = _mapscript.delete_colorObj

    def setRGB(self, red, green, blue, alpha=255):
        return _mapscript.colorObj_setRGB(self, red, green, blue, alpha)

    def setHex(self, psHexColor):
        return _mapscript.colorObj_setHex(self, psHexColor)

    def toHex(self):
        return _mapscript.colorObj_toHex(self)

# Register colorObj in _mapscript:
_mapscript.colorObj_swigregister(colorObj)
class symbolObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refcount = property(_mapscript.symbolObj_refcount_get)
    numpoints = property(_mapscript.symbolObj_numpoints_get)
    imagepath = property(_mapscript.symbolObj_imagepath_get)
    name = property(_mapscript.symbolObj_name_get, _mapscript.symbolObj_name_set)
    type = property(_mapscript.symbolObj_type_get, _mapscript.symbolObj_type_set)
    inmapfile = property(_mapscript.symbolObj_inmapfile_get, _mapscript.symbolObj_inmapfile_set)
    sizex = property(_mapscript.symbolObj_sizex_get, _mapscript.symbolObj_sizex_set)
    sizey = property(_mapscript.symbolObj_sizey_get, _mapscript.symbolObj_sizey_set)
    minx = property(_mapscript.symbolObj_minx_get, _mapscript.symbolObj_minx_set)
    miny = property(_mapscript.symbolObj_miny_get, _mapscript.symbolObj_miny_set)
    maxx = property(_mapscript.symbolObj_maxx_get, _mapscript.symbolObj_maxx_set)
    maxy = property(_mapscript.symbolObj_maxy_get, _mapscript.symbolObj_maxy_set)
    filled = property(_mapscript.symbolObj_filled_get, _mapscript.symbolObj_filled_set)
    anchorpoint_x = property(_mapscript.symbolObj_anchorpoint_x_get, _mapscript.symbolObj_anchorpoint_x_set)
    anchorpoint_y = property(_mapscript.symbolObj_anchorpoint_y_get, _mapscript.symbolObj_anchorpoint_y_set)
    transparent = property(_mapscript.symbolObj_transparent_get, _mapscript.symbolObj_transparent_set)
    transparentcolor = property(_mapscript.symbolObj_transparentcolor_get, _mapscript.symbolObj_transparentcolor_set)
    character = property(_mapscript.symbolObj_character_get, _mapscript.symbolObj_character_set)
    font = property(_mapscript.symbolObj_font_get, _mapscript.symbolObj_font_set)

    def __init__(self, symbolname, imagefile=None):
        _mapscript.symbolObj_swiginit(self, _mapscript.new_symbolObj(symbolname, imagefile))
    __swig_destroy__ = _mapscript.delete_symbolObj

    def setImagepath(self, imagefile):
        return _mapscript.symbolObj_setImagepath(self, imagefile)

    def setPoints(self, line):
        return _mapscript.symbolObj_setPoints(self, line)

    def getPoints(self):
        return _mapscript.symbolObj_getPoints(self)

    def getImage(self, input_format):
        return _mapscript.symbolObj_getImage(self, input_format)

    def setImage(self, image):
        return _mapscript.symbolObj_setImage(self, image)

# Register symbolObj in _mapscript:
_mapscript.symbolObj_swigregister(symbolObj)
MS_HASHSIZE = _mapscript.MS_HASHSIZE
class hashTableObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    numitems = property(_mapscript.hashTableObj_numitems_get)

    def __init__(self):
        _mapscript.hashTableObj_swiginit(self, _mapscript.new_hashTableObj())
    __swig_destroy__ = _mapscript.delete_hashTableObj

    def set(self, key, value):
        return _mapscript.hashTableObj_set(self, key, value)

    def get(self, key, default_value=None):
        return _mapscript.hashTableObj_get(self, key, default_value)

    def remove(self, key):
        return _mapscript.hashTableObj_remove(self, key)

    def clear(self):
        return _mapscript.hashTableObj_clear(self)

    def nextKey(self, prevkey=None):
        return _mapscript.hashTableObj_nextKey(self, prevkey)


    def __getitem__(self, key):
        return self.get(key)

    def __setitem__(self, key, value):
        return self.set(key, value)

    def __delitem__(self, key) :
        return self.remove(key)

    def __contains__(self, key):
        return key.lower() in [k.lower() for k in self.keys()]

    def __len__(self):
        return self.numitems

    def keys(self):
        """
        **Python-only**. In Python MapScript the ``hashTableObj`` can be used and accessed
        as a dictionary. The ``keys`` method returns a view of all the keys in the ``hashTableObj``.
        """

        keys = []
        k = None

        while True :
            k = self.nextKey(k)
            if k :
                keys.append(k)
            else :
                break

        return keys



# Register hashTableObj in _mapscript:
_mapscript.hashTableObj_swigregister(hashTableObj)
MS_CONFIG_SECTION = _mapscript.MS_CONFIG_SECTION
MS_CONFIG_SECTION_ENV = _mapscript.MS_CONFIG_SECTION_ENV
MS_CONFIG_SECTION_MAPS = _mapscript.MS_CONFIG_SECTION_MAPS
MS_CONFIG_SECTION_PLUGINS = _mapscript.MS_CONFIG_SECTION_PLUGINS
class configObj(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    env = property(_mapscript.configObj_env_get, _mapscript.configObj_env_set)
    maps = property(_mapscript.configObj_maps_get, _mapscript.configObj_maps_set)
    plugins = property(_mapscript.configObj_plugins_get, _mapscript.configObj_plugins_set)

    def __init__(self, filename=None):
        _mapscript.configObj_swiginit(self, _mapscript.new_configObj(filename))
    __swig_destroy__ = _mapscript.delete_configObj

# Register configObj in _mapscript:
_mapscript.configObj_swigregister(configObj)

def msLoadConfig(ms_config_file):
    return _mapscript.msLoadConfig(ms_config_file)

def msFreeConfig(config):
    return _mapscript.msFreeConfig(config)

def msConfigGetEnv(config, key):
    return _mapscript.msConfigGetEnv(config, key)

def msConfigGetMap(config, key, pszReturnPath):
    return _mapscript.msConfigGetMap(config, key, pszReturnPath)

def msConfigGetPlugin(config, key):
    return _mapscript.msConfigGetPlugin(config, key)
MS_DEFAULT_CGI_PARAMS = _mapscript.MS_DEFAULT_CGI_PARAMS
MS_GET_REQUEST = _mapscript.MS_GET_REQUEST
MS_POST_REQUEST = _mapscript.MS_POST_REQUEST
class OWSRequest(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NumParams = property(_mapscript.OWSRequest_NumParams_get)
    type = property(_mapscript.OWSRequest_type_get, _mapscript.OWSRequest_type_set)
    contenttype = property(_mapscript.OWSRequest_contenttype_get, _mapscript.OWSRequest_contenttype_set)
    postrequest = property(_mapscript.OWSRequest_postrequest_get, _mapscript.OWSRequest_postrequest_set)
    httpcookiedata = property(_mapscript.OWSRequest_httpcookiedata_get, _mapscript.OWSRequest_httpcookiedata_set)

    def __init__(self):
        _mapscript.OWSRequest_swiginit(self, _mapscript.new_OWSRequest())
    __swig_destroy__ = _mapscript.delete_OWSRequest

    def loadParams(self):
        return _mapscript.OWSRequest_loadParams(self)

    def loadParamsFromURL(self, url):
        return _mapscript.OWSRequest_loadParamsFromURL(self, url)

    def loadParamsFromPost(self, postData, url):
        return _mapscript.OWSRequest_loadParamsFromPost(self, postData, url)

    def setParameter(self, name, value):
        return _mapscript.OWSRequest_setParameter(self, name, value)

    def addParameter(self, name, value):
        return _mapscript.OWSRequest_addParameter(self, name, value)

    def getName(self, index):
        return _mapscript.OWSRequest_getName(self, index)

    def getValue(self, index):
        return _mapscript.OWSRequest_getValue(self, index)

    def getValueByName(self, name):
        return _mapscript.OWSRequest_getValueByName(self, name)

# Register OWSRequest in _mapscript:
_mapscript.OWSRequest_swigregister(OWSRequest)

def msConnPoolCloseUnreferenced():
    return _mapscript.msConnPoolCloseUnreferenced()

def msIO_resetHandlers():
    return _mapscript.msIO_resetHandlers()

def msIO_installStdoutToBuffer():
    return _mapscript.msIO_installStdoutToBuffer()

def msIO_installStdinFromBuffer():
    return _mapscript.msIO_installStdinFromBuffer()

def msIO_stripStdoutBufferContentType():
    return _mapscript.msIO_stripStdoutBufferContentType()

def msIO_stripStdoutBufferContentHeaders():
    return _mapscript.msIO_stripStdoutBufferContentHeaders()

def msIO_getStdoutBufferString():
    return _mapscript.msIO_getStdoutBufferString()

def msIO_getStdoutBufferBytes():
    return _mapscript.msIO_getStdoutBufferBytes()

def msIO_getAndStripStdoutBufferMimeHeaders():
    return _mapscript.msIO_getAndStripStdoutBufferMimeHeaders()

def fromstring(data, mappath=None, configpath=None):
    """Creates map objects from mapfile strings.

    Parameters
    ==========
    data : string
        Mapfile in a string.
    mappath : string
        Optional root map path, enabling relative paths in mapfile.

    Example
    =======
    >>> mo = fromstring("MAP\nNAME 'test'\nEND")
    >>> mo.name
    'test'
    """
    import re
    if re.search(r"^\s*MAP", data, re.I):
# create a config object if a path is supplied
        if configpath:
             config = configObj(configpath)
        else:
             config = None
        return msLoadMapFromString(data, mappath, config)
    elif re.search(r"^\s*LAYER", data, re.I):
        ob = layerObj()
        ob.updateFromString(data)
        return ob
    elif re.search(r"^\s*CLASS", data, re.I):
        ob = classObj()
        ob.updateFromString(data)
        return ob
    elif re.search(r"^\s*STYLE", data, re.I):
        ob = styleObj()
        ob.updateFromString(data)
        return ob
    else:
        raise ValueError("No map, layer, class, or style found. Can not load from provided string")


