<?php

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */

// Try to load our extension if it's not already loaded.
if (!extension_loaded('mapscript')) {
  if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
    if (!dl('php_mapscript.dll')) return;
  } else {
    // PHP_SHLIB_SUFFIX gives 'dylib' on MacOS X but modules are 'so'.
    if (PHP_SHLIB_SUFFIX === 'dylib') {
      if (!dl('mapscript.so')) return;
    } else {
      if (!dl('mapscript.'.PHP_SHLIB_SUFFIX)) return;
    }
  }
}



abstract class mapscript {
	const MAX_ERROR_LEN = MAX_ERROR_LEN;

	const MS_TRUE = MS_TRUE;

	const MS_FALSE = MS_FALSE;

	const MS_UNKNOWN = MS_UNKNOWN;

	const MS_ON = MS_ON;

	const MS_OFF = MS_OFF;

	const MS_DEFAULT = MS_DEFAULT;

	const MS_EMBED = MS_EMBED;

	const MS_DELETE = MS_DELETE;

	const MS_YES = MS_YES;

	const MS_NO = MS_NO;

	const MS_LAYER_ALLOCSIZE = MS_LAYER_ALLOCSIZE;

	const MS_CLASS_ALLOCSIZE = MS_CLASS_ALLOCSIZE;

	const MS_STYLE_ALLOCSIZE = MS_STYLE_ALLOCSIZE;

	const MS_LABEL_ALLOCSIZE = MS_LABEL_ALLOCSIZE;

	const MS_MAX_LABEL_PRIORITY = MS_MAX_LABEL_PRIORITY;

	const MS_MAX_LABEL_FONTS = MS_MAX_LABEL_FONTS;

	const MS_DEFAULT_LABEL_PRIORITY = MS_DEFAULT_LABEL_PRIORITY;

	const MS_LABEL_FORCE_GROUP = MS_LABEL_FORCE_GROUP;

	const MS_RENDER_WITH_SWF = MS_RENDER_WITH_SWF;

	const MS_RENDER_WITH_RAWDATA = MS_RENDER_WITH_RAWDATA;

	const MS_RENDER_WITH_IMAGEMAP = MS_RENDER_WITH_IMAGEMAP;

	const MS_RENDER_WITH_TEMPLATE = MS_RENDER_WITH_TEMPLATE;

	const MS_RENDER_WITH_OGR = MS_RENDER_WITH_OGR;

	const MS_RENDER_WITH_PLUGIN = MS_RENDER_WITH_PLUGIN;

	const MS_RENDER_WITH_CAIRO_RASTER = MS_RENDER_WITH_CAIRO_RASTER;

	const MS_RENDER_WITH_CAIRO_PDF = MS_RENDER_WITH_CAIRO_PDF;

	const MS_RENDER_WITH_CAIRO_SVG = MS_RENDER_WITH_CAIRO_SVG;

	const MS_RENDER_WITH_OGL = MS_RENDER_WITH_OGL;

	const MS_RENDER_WITH_AGG = MS_RENDER_WITH_AGG;

	const MS_RENDER_WITH_KML = MS_RENDER_WITH_KML;

	const MS_RENDER_WITH_UTFGRID = MS_RENDER_WITH_UTFGRID;

	const MS_RENDER_WITH_MVT = MS_RENDER_WITH_MVT;

	const MS_FILE_MAP = 0;

	const MS_FILE_SYMBOL = MS_FILE_SYMBOL;

	const MS_INCHES = 0;

	const MS_FEET = MS_FEET;

	const MS_MILES = MS_MILES;

	const MS_METERS = MS_METERS;

	const MS_KILOMETERS = MS_KILOMETERS;

	const MS_DD = MS_DD;

	const MS_PIXELS = MS_PIXELS;

	const MS_PERCENTAGES = MS_PERCENTAGES;

	const MS_NAUTICALMILES = MS_NAUTICALMILES;

	const MS_SHAPE_POINT = 0;

	const MS_SHAPE_LINE = MS_SHAPE_LINE;

	const MS_SHAPE_POLYGON = MS_SHAPE_POLYGON;

	const MS_SHAPE_NULL = MS_SHAPE_NULL;

	const MS_LAYER_POINT = 0;

	const MS_LAYER_LINE = MS_LAYER_LINE;

	const MS_LAYER_POLYGON = MS_LAYER_POLYGON;

	const MS_LAYER_RASTER = MS_LAYER_RASTER;

	const MS_LAYER_ANNOTATION = MS_LAYER_ANNOTATION;

	const MS_LAYER_QUERY = MS_LAYER_QUERY;

	const MS_LAYER_CIRCLE = MS_LAYER_CIRCLE;

	const MS_LAYER_TILEINDEX = MS_LAYER_TILEINDEX;

	const MS_LAYER_CHART = MS_LAYER_CHART;

	const MS_TRUETYPE = 0;

	const MS_BITMAP = MS_BITMAP;

	const MS_FIRST_MATCHING_CLASS = 0;

	const MS_ALL_MATCHING_CLASSES = MS_ALL_MATCHING_CLASSES;

	const MS_POSITIONS_LENGTH = MS_POSITIONS_LENGTH;

	const MS_UL = 101;

	const MS_LR = MS_LR;

	const MS_UR = MS_UR;

	const MS_LL = MS_LL;

	const MS_CR = MS_CR;

	const MS_CL = MS_CL;

	const MS_UC = MS_UC;

	const MS_LC = MS_LC;

	const MS_CC = MS_CC;

	const MS_AUTO = MS_AUTO;

	const MS_XY = MS_XY;

	const MS_NONE = MS_NONE;

	const MS_AUTO2 = MS_AUTO2;

	const MS_FOLLOW = MS_FOLLOW;

	const MS_TINY = MS_TINY;

	const MS_SMALL = MS_SMALL;

	const MS_MEDIUM = MS_MEDIUM;

	const MS_LARGE = MS_LARGE;

	const MS_GIANT = MS_GIANT;

	const MS_NORMAL = 0;

	const MS_HILITE = MS_HILITE;

	const MS_SELECTED = MS_SELECTED;

	const MS_INLINE = 0;

	const MS_SHAPEFILE = MS_SHAPEFILE;

	const MS_TILED_SHAPEFILE = MS_TILED_SHAPEFILE;

	const MS_UNUSED_2 = MS_UNUSED_2;

	const MS_OGR = MS_OGR;

	const MS_UNUSED_1 = MS_UNUSED_1;

	const MS_POSTGIS = MS_POSTGIS;

	const MS_WMS = MS_WMS;

	const MS_ORACLESPATIAL = MS_ORACLESPATIAL;

	const MS_WFS = MS_WFS;

	const MS_GRATICULE = MS_GRATICULE;

	const MS_MYSQL = MS_MYSQL;

	const MS_RASTER = MS_RASTER;

	const MS_PLUGIN = MS_PLUGIN;

	const MS_UNION = MS_UNION;

	const MS_UVRASTER = MS_UVRASTER;

	const MS_CONTOUR = MS_CONTOUR;

	const MS_KERNELDENSITY = MS_KERNELDENSITY;

	const MS_DB_XBASE = 0;

	const MS_DB_CSV = MS_DB_CSV;

	const MS_DB_MYSQL = MS_DB_MYSQL;

	const MS_DB_ORACLE = MS_DB_ORACLE;

	const MS_DB_POSTGRES = MS_DB_POSTGRES;

	const MS_JOIN_ONE_TO_ONE = 0;

	const MS_JOIN_ONE_TO_MANY = MS_JOIN_ONE_TO_MANY;

	const MS_SINGLE = MS_SINGLE;

	const MS_MULTIPLE = MS_MULTIPLE;

	const MS_QUERY_SINGLE = 0;

	const MS_QUERY_MULTIPLE = MS_QUERY_MULTIPLE;

	const MS_QUERY_IS_NULL = 0;

	const MS_QUERY_BY_POINT = MS_QUERY_BY_POINT;

	const MS_QUERY_BY_RECT = MS_QUERY_BY_RECT;

	const MS_QUERY_BY_SHAPE = MS_QUERY_BY_SHAPE;

	const MS_QUERY_BY_ATTRIBUTE = MS_QUERY_BY_ATTRIBUTE;

	const MS_QUERY_BY_INDEX = MS_QUERY_BY_INDEX;

	const MS_QUERY_BY_FILTER = MS_QUERY_BY_FILTER;

	const MS_ALIGN_DEFAULT = 0;

	const MS_ALIGN_LEFT = MS_ALIGN_LEFT;

	const MS_ALIGN_CENTER = MS_ALIGN_CENTER;

	const MS_ALIGN_RIGHT = MS_ALIGN_RIGHT;

	const MS_CJC_NONE = 0;

	const MS_CJC_BEVEL = MS_CJC_BEVEL;

	const MS_CJC_BUTT = MS_CJC_BUTT;

	const MS_CJC_MITER = MS_CJC_MITER;

	const MS_CJC_ROUND = MS_CJC_ROUND;

	const MS_CJC_SQUARE = MS_CJC_SQUARE;

	const MS_CJC_TRIANGLE = MS_CJC_TRIANGLE;

	const MS_CJC_DEFAULT_JOIN_MAXSIZE = MS_CJC_DEFAULT_JOIN_MAXSIZE;

	const MS_SUCCESS = 0;

	const MS_FAILURE = MS_FAILURE;

	const MS_DONE = MS_DONE;

	const MS_IMAGEMODE_PC256 = 0;

	const MS_IMAGEMODE_RGB = MS_IMAGEMODE_RGB;

	const MS_IMAGEMODE_RGBA = MS_IMAGEMODE_RGBA;

	const MS_IMAGEMODE_INT16 = MS_IMAGEMODE_INT16;

	const MS_IMAGEMODE_FLOAT32 = MS_IMAGEMODE_FLOAT32;

	const MS_IMAGEMODE_BYTE = MS_IMAGEMODE_BYTE;

	const MS_IMAGEMODE_FEATURE = MS_IMAGEMODE_FEATURE;

	const MS_IMAGEMODE_NULL = MS_IMAGEMODE_NULL;

	const MS_GEOS_EQUALS = 0;

	const MS_GEOS_DISJOINT = MS_GEOS_DISJOINT;

	const MS_GEOS_TOUCHES = MS_GEOS_TOUCHES;

	const MS_GEOS_OVERLAPS = MS_GEOS_OVERLAPS;

	const MS_GEOS_CROSSES = MS_GEOS_CROSSES;

	const MS_GEOS_INTERSECTS = MS_GEOS_INTERSECTS;

	const MS_GEOS_WITHIN = MS_GEOS_WITHIN;

	const MS_GEOS_CONTAINS = MS_GEOS_CONTAINS;

	const MS_GEOS_BEYOND = MS_GEOS_BEYOND;

	const MS_GEOS_DWITHIN = MS_GEOS_DWITHIN;

	const MS_TRANSFORM_NONE = 0;

	const MS_TRANSFORM_ROUND = MS_TRANSFORM_ROUND;

	const MS_TRANSFORM_SNAPTOGRID = MS_TRANSFORM_SNAPTOGRID;

	const MS_TRANSFORM_FULLRESOLUTION = MS_TRANSFORM_FULLRESOLUTION;

	const MS_TRANSFORM_SIMPLIFY = MS_TRANSFORM_SIMPLIFY;

	const MS_COMPOP_CLEAR = 0;

	const MS_COMPOP_SRC = MS_COMPOP_SRC;

	const MS_COMPOP_DST = MS_COMPOP_DST;

	const MS_COMPOP_SRC_OVER = MS_COMPOP_SRC_OVER;

	const MS_COMPOP_DST_OVER = MS_COMPOP_DST_OVER;

	const MS_COMPOP_SRC_IN = MS_COMPOP_SRC_IN;

	const MS_COMPOP_DST_IN = MS_COMPOP_DST_IN;

	const MS_COMPOP_SRC_OUT = MS_COMPOP_SRC_OUT;

	const MS_COMPOP_DST_OUT = MS_COMPOP_DST_OUT;

	const MS_COMPOP_SRC_ATOP = MS_COMPOP_SRC_ATOP;

	const MS_COMPOP_DST_ATOP = MS_COMPOP_DST_ATOP;

	const MS_COMPOP_XOR = MS_COMPOP_XOR;

	const MS_COMPOP_PLUS = MS_COMPOP_PLUS;

	const MS_COMPOP_MINUS = MS_COMPOP_MINUS;

	const MS_COMPOP_MULTIPLY = MS_COMPOP_MULTIPLY;

	const MS_COMPOP_SCREEN = MS_COMPOP_SCREEN;

	const MS_COMPOP_OVERLAY = MS_COMPOP_OVERLAY;

	const MS_COMPOP_DARKEN = MS_COMPOP_DARKEN;

	const MS_COMPOP_LIGHTEN = MS_COMPOP_LIGHTEN;

	const MS_COMPOP_COLOR_DODGE = MS_COMPOP_COLOR_DODGE;

	const MS_COMPOP_COLOR_BURN = MS_COMPOP_COLOR_BURN;

	const MS_COMPOP_HARD_LIGHT = MS_COMPOP_HARD_LIGHT;

	const MS_COMPOP_SOFT_LIGHT = MS_COMPOP_SOFT_LIGHT;

	const MS_COMPOP_DIFFERENCE = MS_COMPOP_DIFFERENCE;

	const MS_COMPOP_EXCLUSION = MS_COMPOP_EXCLUSION;

	const MS_COMPOP_CONTRAST = MS_COMPOP_CONTRAST;

	const MS_COMPOP_INVERT = MS_COMPOP_INVERT;

	const MS_COMPOP_INVERT_RGB = MS_COMPOP_INVERT_RGB;

	const MS_STYLE_BINDING_LENGTH = MS_STYLE_BINDING_LENGTH;

	const MS_STYLE_BINDING_SIZE = 0;

	const MS_STYLE_BINDING_WIDTH = MS_STYLE_BINDING_WIDTH;

	const MS_STYLE_BINDING_ANGLE = MS_STYLE_BINDING_ANGLE;

	const MS_STYLE_BINDING_COLOR = MS_STYLE_BINDING_COLOR;

	const MS_STYLE_BINDING_OUTLINECOLOR = MS_STYLE_BINDING_OUTLINECOLOR;

	const MS_STYLE_BINDING_SYMBOL = MS_STYLE_BINDING_SYMBOL;

	const MS_STYLE_BINDING_OUTLINEWIDTH = MS_STYLE_BINDING_OUTLINEWIDTH;

	const MS_STYLE_BINDING_OPACITY = MS_STYLE_BINDING_OPACITY;

	const MS_STYLE_BINDING_OFFSET_X = MS_STYLE_BINDING_OFFSET_X;

	const MS_STYLE_BINDING_OFFSET_Y = MS_STYLE_BINDING_OFFSET_Y;

	const MS_STYLE_BINDING_POLAROFFSET_PIXEL = MS_STYLE_BINDING_POLAROFFSET_PIXEL;

	const MS_STYLE_BINDING_POLAROFFSET_ANGLE = MS_STYLE_BINDING_POLAROFFSET_ANGLE;

	const MS_LABEL_BINDING_LENGTH = MS_LABEL_BINDING_LENGTH;

	const MS_LABEL_BINDING_SIZE = 0;

	const MS_LABEL_BINDING_ANGLE = MS_LABEL_BINDING_ANGLE;

	const MS_LABEL_BINDING_COLOR = MS_LABEL_BINDING_COLOR;

	const MS_LABEL_BINDING_OUTLINECOLOR = MS_LABEL_BINDING_OUTLINECOLOR;

	const MS_LABEL_BINDING_FONT = MS_LABEL_BINDING_FONT;

	const MS_LABEL_BINDING_PRIORITY = MS_LABEL_BINDING_PRIORITY;

	const MS_LABEL_BINDING_POSITION = MS_LABEL_BINDING_POSITION;

	const MS_LABEL_BINDING_SHADOWSIZEX = MS_LABEL_BINDING_SHADOWSIZEX;

	const MS_LABEL_BINDING_SHADOWSIZEY = MS_LABEL_BINDING_SHADOWSIZEY;

	const MS_LABEL_BINDING_OFFSET_X = MS_LABEL_BINDING_OFFSET_X;

	const MS_LABEL_BINDING_OFFSET_Y = MS_LABEL_BINDING_OFFSET_Y;

	const MS_LABEL_BINDING_ALIGN = MS_LABEL_BINDING_ALIGN;

	const MS_TOKEN_LOGICAL_AND = 300;

	const MS_TOKEN_LOGICAL_OR = MS_TOKEN_LOGICAL_OR;

	const MS_TOKEN_LOGICAL_NOT = MS_TOKEN_LOGICAL_NOT;

	const MS_TOKEN_LITERAL_NUMBER = 310;

	const MS_TOKEN_LITERAL_STRING = MS_TOKEN_LITERAL_STRING;

	const MS_TOKEN_LITERAL_TIME = MS_TOKEN_LITERAL_TIME;

	const MS_TOKEN_LITERAL_SHAPE = MS_TOKEN_LITERAL_SHAPE;

	const MS_TOKEN_LITERAL_BOOLEAN = MS_TOKEN_LITERAL_BOOLEAN;

	const MS_TOKEN_COMPARISON_EQ = 320;

	const MS_TOKEN_COMPARISON_NE = MS_TOKEN_COMPARISON_NE;

	const MS_TOKEN_COMPARISON_GT = MS_TOKEN_COMPARISON_GT;

	const MS_TOKEN_COMPARISON_LT = MS_TOKEN_COMPARISON_LT;

	const MS_TOKEN_COMPARISON_LE = MS_TOKEN_COMPARISON_LE;

	const MS_TOKEN_COMPARISON_GE = MS_TOKEN_COMPARISON_GE;

	const MS_TOKEN_COMPARISON_IEQ = MS_TOKEN_COMPARISON_IEQ;

	const MS_TOKEN_COMPARISON_RE = MS_TOKEN_COMPARISON_RE;

	const MS_TOKEN_COMPARISON_IRE = MS_TOKEN_COMPARISON_IRE;

	const MS_TOKEN_COMPARISON_IN = MS_TOKEN_COMPARISON_IN;

	const MS_TOKEN_COMPARISON_LIKE = MS_TOKEN_COMPARISON_LIKE;

	const MS_TOKEN_COMPARISON_INTERSECTS = MS_TOKEN_COMPARISON_INTERSECTS;

	const MS_TOKEN_COMPARISON_DISJOINT = MS_TOKEN_COMPARISON_DISJOINT;

	const MS_TOKEN_COMPARISON_TOUCHES = MS_TOKEN_COMPARISON_TOUCHES;

	const MS_TOKEN_COMPARISON_OVERLAPS = MS_TOKEN_COMPARISON_OVERLAPS;

	const MS_TOKEN_COMPARISON_CROSSES = MS_TOKEN_COMPARISON_CROSSES;

	const MS_TOKEN_COMPARISON_WITHIN = MS_TOKEN_COMPARISON_WITHIN;

	const MS_TOKEN_COMPARISON_CONTAINS = MS_TOKEN_COMPARISON_CONTAINS;

	const MS_TOKEN_COMPARISON_EQUALS = MS_TOKEN_COMPARISON_EQUALS;

	const MS_TOKEN_COMPARISON_BEYOND = MS_TOKEN_COMPARISON_BEYOND;

	const MS_TOKEN_COMPARISON_DWITHIN = MS_TOKEN_COMPARISON_DWITHIN;

	const MS_TOKEN_FUNCTION_LENGTH = 350;

	const MS_TOKEN_FUNCTION_TOSTRING = MS_TOKEN_FUNCTION_TOSTRING;

	const MS_TOKEN_FUNCTION_COMMIFY = MS_TOKEN_FUNCTION_COMMIFY;

	const MS_TOKEN_FUNCTION_AREA = MS_TOKEN_FUNCTION_AREA;

	const MS_TOKEN_FUNCTION_ROUND = MS_TOKEN_FUNCTION_ROUND;

	const MS_TOKEN_FUNCTION_FROMTEXT = MS_TOKEN_FUNCTION_FROMTEXT;

	const MS_TOKEN_FUNCTION_BUFFER = MS_TOKEN_FUNCTION_BUFFER;

	const MS_TOKEN_FUNCTION_DIFFERENCE = MS_TOKEN_FUNCTION_DIFFERENCE;

	const MS_TOKEN_FUNCTION_SIMPLIFY = MS_TOKEN_FUNCTION_SIMPLIFY;

	const MS_TOKEN_FUNCTION_SIMPLIFYPT = MS_TOKEN_FUNCTION_SIMPLIFYPT;

	const MS_TOKEN_FUNCTION_GENERALIZE = MS_TOKEN_FUNCTION_GENERALIZE;

	const MS_TOKEN_FUNCTION_SMOOTHSIA = MS_TOKEN_FUNCTION_SMOOTHSIA;

	const MS_TOKEN_FUNCTION_JAVASCRIPT = MS_TOKEN_FUNCTION_JAVASCRIPT;

	const MS_TOKEN_FUNCTION_UPPER = MS_TOKEN_FUNCTION_UPPER;

	const MS_TOKEN_FUNCTION_LOWER = MS_TOKEN_FUNCTION_LOWER;

	const MS_TOKEN_FUNCTION_INITCAP = MS_TOKEN_FUNCTION_INITCAP;

	const MS_TOKEN_FUNCTION_FIRSTCAP = MS_TOKEN_FUNCTION_FIRSTCAP;

	const MS_TOKEN_BINDING_DOUBLE = 370;

	const MS_TOKEN_BINDING_INTEGER = MS_TOKEN_BINDING_INTEGER;

	const MS_TOKEN_BINDING_STRING = MS_TOKEN_BINDING_STRING;

	const MS_TOKEN_BINDING_TIME = MS_TOKEN_BINDING_TIME;

	const MS_TOKEN_BINDING_SHAPE = MS_TOKEN_BINDING_SHAPE;

	const MS_TOKEN_BINDING_MAP_CELLSIZE = MS_TOKEN_BINDING_MAP_CELLSIZE;

	const MS_TOKEN_BINDING_DATA_CELLSIZE = MS_TOKEN_BINDING_DATA_CELLSIZE;

	const MS_PARSE_TYPE_BOOLEAN = 0;

	const MS_PARSE_TYPE_STRING = MS_PARSE_TYPE_STRING;

	const MS_PARSE_TYPE_SHAPE = MS_PARSE_TYPE_SHAPE;

	const MS_NOOVERRIDE = MS_NOOVERRIDE;

	const MS_STYLE_SINGLE_SIDED_OFFSET = MS_STYLE_SINGLE_SIDED_OFFSET;

	const MS_STYLE_DOUBLE_SIDED_OFFSET = MS_STYLE_DOUBLE_SIDED_OFFSET;

	const MS_LABEL_PERPENDICULAR_OFFSET = MS_LABEL_PERPENDICULAR_OFFSET;

	const MS_LABEL_PERPENDICULAR_TOP_OFFSET = MS_LABEL_PERPENDICULAR_TOP_OFFSET;

	static function msSaveImage($map,$img,$filename) {
		return msSaveImage($map,$img,$filename);
	}

	static function msFreeImage($img) {
		msFreeImage($img);
	}

	static function msSetup() {
		return msSetup();
	}

	static function msCleanup() {
		msCleanup();
	}

	static function msLoadMapFromString($buffer,$new_mappath) {
		$r=msLoadMapFromString($buffer,$new_mappath);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new mapObj($r);
		}
		return $r;
	}

	const MS_VERSION_MAJOR = MS_VERSION_MAJOR;

	const MS_VERSION_MINOR = MS_VERSION_MINOR;

	const MS_VERSION_REV = MS_VERSION_REV;

	const MS_VERSION = MS_VERSION;

	const MS_VERSION_NUM = MS_VERSION_NUM;

	const SHX_BUFFER_PAGE = SHX_BUFFER_PAGE;

	const MS_SHAPEFILE_POINT = MS_SHAPEFILE_POINT;

	const MS_SHAPEFILE_ARC = MS_SHAPEFILE_ARC;

	const MS_SHAPEFILE_POLYGON = MS_SHAPEFILE_POLYGON;

	const MS_SHAPEFILE_MULTIPOINT = MS_SHAPEFILE_MULTIPOINT;

	const MS_SHP_POINTZ = MS_SHP_POINTZ;

	const MS_SHP_ARCZ = MS_SHP_ARCZ;

	const MS_SHP_POLYGONZ = MS_SHP_POLYGONZ;

	const MS_SHP_MULTIPOINTZ = MS_SHP_MULTIPOINTZ;

	const MS_SHP_POINTM = MS_SHP_POINTM;

	const MS_SHP_ARCM = MS_SHP_ARCM;

	const MS_SHP_POLYGONM = MS_SHP_POLYGONM;

	const MS_SHP_MULTIPOINTM = MS_SHP_MULTIPOINTM;

	const FTString = 0;

	const FTInteger = FTInteger;

	const FTDouble = FTDouble;

	const FTInvalid = FTInvalid;

	const wkp_none = wkp_none;

	const wkp_lonlat = wkp_lonlat;

	const wkp_gmerc = wkp_gmerc;

	const MS_SYMBOL_SIMPLE = 1000;

	const MS_SYMBOL_VECTOR = MS_SYMBOL_VECTOR;

	const MS_SYMBOL_ELLIPSE = MS_SYMBOL_ELLIPSE;

	const MS_SYMBOL_PIXMAP = MS_SYMBOL_PIXMAP;

	const MS_SYMBOL_TRUETYPE = MS_SYMBOL_TRUETYPE;

	const MS_SYMBOL_HATCH = MS_SYMBOL_HATCH;

	const MS_SYMBOL_SVG = MS_SYMBOL_SVG;

	const MS_SYMBOL_ALLOCSIZE = MS_SYMBOL_ALLOCSIZE;

	const MS_MAXVECTORPOINTS = MS_MAXVECTORPOINTS;

	const MS_MAXPATTERNLENGTH = MS_MAXPATTERNLENGTH;

	const MS_IMAGECACHESIZE = MS_IMAGECACHESIZE;

	const MS_NOERR = MS_NOERR;

	const MS_IOERR = MS_IOERR;

	const MS_MEMERR = MS_MEMERR;

	const MS_TYPEERR = MS_TYPEERR;

	const MS_SYMERR = MS_SYMERR;

	const MS_REGEXERR = MS_REGEXERR;

	const MS_TTFERR = MS_TTFERR;

	const MS_DBFERR = MS_DBFERR;

	const MS_IDENTERR = MS_IDENTERR;

	const MS_EOFERR = MS_EOFERR;

	const MS_PROJERR = MS_PROJERR;

	const MS_MISCERR = MS_MISCERR;

	const MS_CGIERR = MS_CGIERR;

	const MS_WEBERR = MS_WEBERR;

	const MS_IMGERR = MS_IMGERR;

	const MS_HASHERR = MS_HASHERR;

	const MS_JOINERR = MS_JOINERR;

	const MS_NOTFOUND = MS_NOTFOUND;

	const MS_SHPERR = MS_SHPERR;

	const MS_PARSEERR = MS_PARSEERR;

	const MS_UNUSEDERR = MS_UNUSEDERR;

	const MS_OGRERR = MS_OGRERR;

	const MS_QUERYERR = MS_QUERYERR;

	const MS_WMSERR = MS_WMSERR;

	const MS_WMSCONNERR = MS_WMSCONNERR;

	const MS_ORACLESPATIALERR = MS_ORACLESPATIALERR;

	const MS_WFSERR = MS_WFSERR;

	const MS_WFSCONNERR = MS_WFSCONNERR;

	const MS_MAPCONTEXTERR = MS_MAPCONTEXTERR;

	const MS_HTTPERR = MS_HTTPERR;

	const MS_CHILDERR = MS_CHILDERR;

	const MS_WCSERR = MS_WCSERR;

	const MS_GEOSERR = MS_GEOSERR;

	const MS_RECTERR = MS_RECTERR;

	const MS_TIMEERR = MS_TIMEERR;

	const MS_GMLERR = MS_GMLERR;

	const MS_SOSERR = MS_SOSERR;

	const MS_NULLPARENTERR = MS_NULLPARENTERR;

	const MS_AGGERR = MS_AGGERR;

	const MS_OWSERR = MS_OWSERR;

	const MS_OGLERR = MS_OGLERR;

	const MS_RENDERERERR = MS_RENDERERERR;

	const MS_V8ERR = MS_V8ERR;

	const MS_NUMERRORCODES = MS_NUMERRORCODES;

	const MESSAGELENGTH = MESSAGELENGTH;

	const ROUTINELENGTH = ROUTINELENGTH;

	const MS_ERROR_LANGUAGE = MS_ERROR_LANGUAGE;

	static function msGetErrorObj() {
		$r=msGetErrorObj();
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new errorObj($r);
		}
		return $r;
	}

	static function msResetErrorList() {
		msResetErrorList();
	}

	static function msGetVersion() {
		return msGetVersion();
	}

	static function msGetVersionInt() {
		return msGetVersionInt();
	}

	static function msGetErrorString($delimiter) {
		return msGetErrorString($delimiter);
	}

	const MS_DEBUGLEVEL_ERRORSONLY = 0;

	const MS_DEBUGLEVEL_DEBUG = 1;

	const MS_DEBUGLEVEL_TUNING = 2;

	const MS_DEBUGLEVEL_V = 3;

	const MS_DEBUGLEVEL_VV = 4;

	const MS_DEBUGLEVEL_VVV = 5;

	const MS_DEBUGLEVEL_DEVDEBUG = 20;

	const MS_HASHSIZE = MS_HASHSIZE;

	const MS_DEFAULT_CGI_PARAMS = MS_DEFAULT_CGI_PARAMS;

	const MS_GET_REQUEST = 0;

	const MS_POST_REQUEST = MS_POST_REQUEST;

	static function msConnPoolCloseUnreferenced() {
		msConnPoolCloseUnreferenced();
	}

	static function msIO_resetHandlers() {
		msIO_resetHandlers();
	}

	static function msIO_installStdoutToBuffer() {
		msIO_installStdoutToBuffer();
	}

	static function msIO_installStdinFromBuffer() {
		msIO_installStdinFromBuffer();
	}

	static function msIO_stripStdoutBufferContentType() {
		return msIO_stripStdoutBufferContentType();
	}

	static function msIO_stripStdoutBufferContentHeaders() {
		msIO_stripStdoutBufferContentHeaders();
	}

	static function msIO_getStdoutBufferString() {
		return msIO_getStdoutBufferString();
	}

	static function msIO_getStdoutBufferBytes() {
		return msIO_getStdoutBufferBytes();
	}

	static function msIO_getAndStripStdoutBufferMimeHeaders() {
		$r=msIO_getAndStripStdoutBufferMimeHeaders();
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new hashTableObj($r);
		}
		return $r;
	}
}

/* PHP Proxy Classes */
class intarray {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($nelements) {
		if (is_resource($nelements) && get_resource_type($nelements) === '_p_intarray') {
			$this->_cPtr=$nelements;
			return;
		}
		$this->_cPtr=new_intarray($nelements);
	}

	function getitem($index) {
		return intarray_getitem($this->_cPtr,$index);
	}

	function setitem($index,$value) {
		intarray_setitem($this->_cPtr,$index,$value);
	}

	function cast() {
		return intarray_cast($this->_cPtr);
	}

	static function frompointer($t) {
		$r=intarray_frompointer($t);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new intarray($r);
		}
		return $r;
	}
}

class CompositingFilter {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'filter') return CompositingFilter_filter_set($this->_cPtr,$value);
		if ($var === 'next') return CompositingFilter_next_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'next') return new CompositingFilter(CompositingFilter_next_get($this->_cPtr));
		if ($var === 'filter') return CompositingFilter_filter_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('CompositingFilter_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p__CompositingFilter') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_CompositingFilter();
	}
}

class LayerCompositer {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'LayerCompositer_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'filter') return new CompositingFilter(LayerCompositer_filter_get($this->_cPtr));
		if ($var === 'next') return new LayerCompositer(LayerCompositer_next_get($this->_cPtr));
		if ($var === 'comp_op') return LayerCompositer_comp_op_get($this->_cPtr);
		if ($var === 'opacity') return LayerCompositer_opacity_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('LayerCompositer_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p__LayerCompositer') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_LayerCompositer();
	}
}

class fontSetObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'fonts') return new hashTableObj(fontSetObj_fonts_get($this->_cPtr));
		if ($var === 'numfonts') return fontSetObj_numfonts_get($this->_cPtr);
		if ($var === 'filename') return fontSetObj_filename_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('fontSetObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_fontSetObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_fontSetObj();
	}
}

class clusterObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'clusterObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'clusterObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('clusterObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function updateFromString($snippet) {
		return clusterObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return clusterObj_convertToString($this->_cPtr);
	}

	function setGroup($group) {
		return clusterObj_setGroup($this->_cPtr,$group);
	}

	function getGroupString() {
		return clusterObj_getGroupString($this->_cPtr);
	}

	function setFilter($filter) {
		return clusterObj_setFilter($this->_cPtr,$filter);
	}

	function getFilterString() {
		return clusterObj_getFilterString($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_clusterObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_clusterObj();
	}
}

class outputFormatObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'outputFormatObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'outputFormatObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('outputFormatObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($driver,$name=null) {
		if (is_resource($driver) && get_resource_type($driver) === '_p_outputFormatObj') {
			$this->_cPtr=$driver;
			return;
		}
		switch (func_num_args()) {
		case 1: $this->_cPtr=new_outputFormatObj($driver); break;
		default: $this->_cPtr=new_outputFormatObj($driver,$name);
		}
	}

	function setExtension($extension) {
		outputFormatObj_setExtension($this->_cPtr,$extension);
	}

	function setMimetype($mimetype) {
		outputFormatObj_setMimetype($this->_cPtr,$mimetype);
	}

	function setOption($key,$value) {
		outputFormatObj_setOption($this->_cPtr,$key,$value);
	}

	function validate() {
		return outputFormatObj_validate($this->_cPtr);
	}

	function getOption($key,$value="") {
		return outputFormatObj_getOption($this->_cPtr,$key,$value);
	}

	function getOptionAt($i) {
		return outputFormatObj_getOptionAt($this->_cPtr,$i);
	}

	function attachDevice($device) {
		outputFormatObj_attachDevice($this->_cPtr,$device);
	}
}

class queryMapObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'queryMapObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'color') return new colorObj(queryMapObj_color_get($this->_cPtr));
		$func = 'queryMapObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('queryMapObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function updateFromString($snippet) {
		return queryMapObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return queryMapObj_convertToString($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_queryMapObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_queryMapObj();
	}
}

class webObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'webObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'validation') return new hashTableObj(webObj_validation_get($this->_cPtr));
		if ($var === 'extent') return new rectObj(webObj_extent_get($this->_cPtr));
		if ($var === 'metadata') return new hashTableObj(webObj_metadata_get($this->_cPtr));
		if ($var === 'map') return new mapObj(webObj_map_get($this->_cPtr));
		$func = 'webObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('webObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_webObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_webObj();
	}

	function updateFromString($snippet) {
		return webObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return webObj_convertToString($this->_cPtr);
	}
}

class styleObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'styleObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'maxcolor') return new colorObj(styleObj_maxcolor_get($this->_cPtr));
		if ($var === 'outlinecolor') return new colorObj(styleObj_outlinecolor_get($this->_cPtr));
		if ($var === 'color') return new colorObj(styleObj_color_get($this->_cPtr));
		if ($var === 'backgroundcolor') return new colorObj(styleObj_backgroundcolor_get($this->_cPtr));
		if ($var === 'mincolor') return new colorObj(styleObj_mincolor_get($this->_cPtr));
		$func = 'styleObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('styleObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($parent_class=null) {
		if (is_resource($parent_class) && get_resource_type($parent_class) === '_p_styleObj') {
			$this->_cPtr=$parent_class;
			return;
		}
		$this->_cPtr=new_styleObj($parent_class);
	}

	function updateFromString($snippet) {
		return styleObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return styleObj_convertToString($this->_cPtr);
	}

	function cloneStyle() {
		$r=styleObj_cloneStyle($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new styleObj($r);
		}
		return $r;
	}

	function setSymbolByName($map,$symbolname) {
		return styleObj_setSymbolByName($this->_cPtr,$map,$symbolname);
	}

	function removeBinding($binding) {
		return styleObj_removeBinding($this->_cPtr,$binding);
	}

	function setBinding($binding,$item) {
		return styleObj_setBinding($this->_cPtr,$binding,$item);
	}

	function getBinding($binding) {
		return styleObj_getBinding($this->_cPtr,$binding);
	}

	function getGeomTransform() {
		return styleObj_getGeomTransform($this->_cPtr);
	}

	function setGeomTransform($transform) {
		styleObj_setGeomTransform($this->_cPtr,$transform);
	}
}

class labelLeaderObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'maxdistance') return labelLeaderObj_maxdistance_set($this->_cPtr,$value);
		if ($var === 'gridstep') return labelLeaderObj_gridstep_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'labelLeaderObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('labelLeaderObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_labelLeaderObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_labelLeaderObj();
	}
}

class labelObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'labelObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'leader') return new labelLeaderObj(labelObj_leader_get($this->_cPtr));
		if ($var === 'outlinecolor') return new colorObj(labelObj_outlinecolor_get($this->_cPtr));
		if ($var === 'color') return new colorObj(labelObj_color_get($this->_cPtr));
		if ($var === 'shadowcolor') return new colorObj(labelObj_shadowcolor_get($this->_cPtr));
		$func = 'labelObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('labelObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_labelObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_labelObj();
	}

	function updateFromString($snippet) {
		return labelObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return labelObj_convertToString($this->_cPtr);
	}

	function removeBinding($binding) {
		return labelObj_removeBinding($this->_cPtr,$binding);
	}

	function getBinding($binding) {
		return labelObj_getBinding($this->_cPtr,$binding);
	}

	function setBinding($binding,$item) {
		return labelObj_setBinding($this->_cPtr,$binding,$item);
	}

	function setExpression($expression) {
		return labelObj_setExpression($this->_cPtr,$expression);
	}

	function getExpressionString() {
		return labelObj_getExpressionString($this->_cPtr);
	}

	function setText($text) {
		return labelObj_setText($this->_cPtr,$text);
	}

	function getTextString() {
		return labelObj_getTextString($this->_cPtr);
	}

	function getStyle($i) {
		$r=labelObj_getStyle($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new styleObj($r);
		}
		return $r;
	}

	function insertStyle($style,$index=-1) {
		return labelObj_insertStyle($this->_cPtr,$style,$index);
	}

	function removeStyle($index) {
		$r=labelObj_removeStyle($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new styleObj($r);
		}
		return $r;
	}

	function moveStyleUp($index) {
		return labelObj_moveStyleUp($this->_cPtr,$index);
	}

	function moveStyleDown($index) {
		return labelObj_moveStyleDown($this->_cPtr,$index);
	}
}

class classObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'classObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'validation') return new hashTableObj(classObj_validation_get($this->_cPtr));
		if ($var === 'layer') return new layerObj(classObj_layer_get($this->_cPtr));
		if ($var === 'metadata') return new hashTableObj(classObj_metadata_get($this->_cPtr));
		if ($var === 'leader') return new labelLeaderObj(classObj_leader_get($this->_cPtr));
		$func = 'classObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('classObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($layer=null) {
		if (is_resource($layer) && get_resource_type($layer) === '_p_classObj') {
			$this->_cPtr=$layer;
			return;
		}
		$this->_cPtr=new_classObj($layer);
	}

	function updateFromString($snippet) {
		return classObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return classObj_convertToString($this->_cPtr);
	}

	function cloneClass() {
		$r=classObj_cloneClass($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new classObj($r);
		}
		return $r;
	}

	function setExpression($expression) {
		return classObj_setExpression($this->_cPtr,$expression);
	}

	function getExpressionString() {
		return classObj_getExpressionString($this->_cPtr);
	}

	function setText($text) {
		return classObj_setText($this->_cPtr,$text);
	}

	function getTextString() {
		return classObj_getTextString($this->_cPtr);
	}

	function getMetaData($name) {
		return classObj_getMetaData($this->_cPtr,$name);
	}

	function setMetaData($name,$value) {
		return classObj_setMetaData($this->_cPtr,$name,$value);
	}

	function getFirstMetaDataKey() {
		return classObj_getFirstMetaDataKey($this->_cPtr);
	}

	function getNextMetaDataKey($lastkey) {
		return classObj_getNextMetaDataKey($this->_cPtr,$lastkey);
	}

	function drawLegendIcon($map,$layer,$width,$height,$dstImage,$dstX,$dstY) {
		return classObj_drawLegendIcon($this->_cPtr,$map,$layer,$width,$height,$dstImage,$dstX,$dstY);
	}

	function createLegendIcon($map,$layer,$width,$height) {
		$r=classObj_createLegendIcon($this->_cPtr,$map,$layer,$width,$height);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function getLabel($i) {
		$r=classObj_getLabel($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new labelObj($r);
		}
		return $r;
	}

	function addLabel($label) {
		return classObj_addLabel($this->_cPtr,$label);
	}

	function removeLabel($index) {
		$r=classObj_removeLabel($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new labelObj($r);
		}
		return $r;
	}

	function getStyle($i) {
		$r=classObj_getStyle($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new styleObj($r);
		}
		return $r;
	}

	function insertStyle($style,$index=-1) {
		return classObj_insertStyle($this->_cPtr,$style,$index);
	}

	function removeStyle($index) {
		$r=classObj_removeStyle($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new styleObj($r);
		}
		return $r;
	}

	function moveStyleUp($index) {
		return classObj_moveStyleUp($this->_cPtr,$index);
	}

	function moveStyleDown($index) {
		return classObj_moveStyleDown($this->_cPtr,$index);
	}
}

class labelCacheMemberObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'point') return new pointObj(labelCacheMemberObj_point_get($this->_cPtr));
		if ($var === 'leaderbbox') return new rectObj(labelCacheMemberObj_leaderbbox_get($this->_cPtr));
		if ($var === 'leaderline') return new lineObj(labelCacheMemberObj_leaderline_get($this->_cPtr));
		if ($var === 'bbox') return new rectObj(labelCacheMemberObj_bbox_get($this->_cPtr));
		$func = 'labelCacheMemberObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('labelCacheMemberObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_labelCacheMemberObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_labelCacheMemberObj();
	}
}

class markerCacheMemberObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'bounds') return new rectObj(markerCacheMemberObj_bounds_get($this->_cPtr));
		if ($var === 'id') return markerCacheMemberObj_id_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('markerCacheMemberObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_markerCacheMemberObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_markerCacheMemberObj();
	}
}

class labelCacheSlotObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'labels') return new labelCacheMemberObj(labelCacheSlotObj_labels_get($this->_cPtr));
		if ($var === 'markers') return new markerCacheMemberObj(labelCacheSlotObj_markers_get($this->_cPtr));
		$func = 'labelCacheSlotObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('labelCacheSlotObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_labelCacheSlotObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_labelCacheSlotObj();
	}
}

class labelCacheObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'slots') return new labelCacheSlotObj(labelCacheObj_slots_get($this->_cPtr));
		$func = 'labelCacheObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('labelCacheObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function freeCache() {
		labelCacheObj_freeCache($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_labelCacheObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_labelCacheObj();
	}
}

class resultObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'resultObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('resultObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($shapeindex) {
		if (is_resource($shapeindex) && get_resource_type($shapeindex) === '_p_resultObj') {
			$this->_cPtr=$shapeindex;
			return;
		}
		$this->_cPtr=new_resultObj($shapeindex);
	}
}

class resultCacheObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'usegetshape') return resultCacheObj_usegetshape_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'bounds') return new rectObj(resultCacheObj_bounds_get($this->_cPtr));
		if ($var === 'usegetshape') return resultCacheObj_usegetshape_get($this->_cPtr);
		if ($var === 'numresults') return resultCacheObj_numresults_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('resultCacheObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function getResult($i) {
		$r=resultCacheObj_getResult($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new resultObj($r);
		}
		return $r;
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_resultCacheObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_resultCacheObj();
	}
}

class symbolSetObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'filename') return symbolSetObj_filename_set($this->_cPtr,$value);
		if ($var === 'imagecachesize') return symbolSetObj_imagecachesize_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'symbolSetObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('symbolSetObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($symbolfile=null) {
		if (is_resource($symbolfile) && get_resource_type($symbolfile) === '_p_symbolSetObj') {
			$this->_cPtr=$symbolfile;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_symbolSetObj(); break;
		default: $this->_cPtr=new_symbolSetObj($symbolfile);
		}
	}

	function getSymbol($i) {
		$r=symbolSetObj_getSymbol($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new symbolObj($r);
		}
		return $r;
	}

	function getSymbolByName($symbolname) {
		$r=symbolSetObj_getSymbolByName($this->_cPtr,$symbolname);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new symbolObj($r);
		}
		return $r;
	}

	function index($symbolname) {
		return symbolSetObj_index($this->_cPtr,$symbolname);
	}

	function appendSymbol($symbol) {
		return symbolSetObj_appendSymbol($this->_cPtr,$symbol);
	}

	function removeSymbol($index) {
		$r=symbolSetObj_removeSymbol($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new symbolObj($r);
		}
		return $r;
	}

	function save($filename) {
		return symbolSetObj_save($this->_cPtr,$filename);
	}
}

class referenceMapObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'referenceMapObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'extent') return new rectObj(referenceMapObj_extent_get($this->_cPtr));
		if ($var === 'color') return new colorObj(referenceMapObj_color_get($this->_cPtr));
		if ($var === 'outlinecolor') return new colorObj(referenceMapObj_outlinecolor_get($this->_cPtr));
		if ($var === 'map') return new mapObj(referenceMapObj_map_get($this->_cPtr));
		$func = 'referenceMapObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('referenceMapObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function updateFromString($snippet) {
		return referenceMapObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return referenceMapObj_convertToString($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_referenceMapObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_referenceMapObj();
	}
}

class scalebarObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'scalebarObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'color') return new colorObj(scalebarObj_color_get($this->_cPtr));
		if ($var === 'backgroundcolor') return new colorObj(scalebarObj_backgroundcolor_get($this->_cPtr));
		if ($var === 'outlinecolor') return new colorObj(scalebarObj_outlinecolor_get($this->_cPtr));
		if ($var === 'label') return new labelObj(scalebarObj_label_get($this->_cPtr));
		if ($var === 'imagecolor') return new colorObj(scalebarObj_imagecolor_get($this->_cPtr));
		$func = 'scalebarObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('scalebarObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function updateFromString($snippet) {
		return scalebarObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return scalebarObj_convertToString($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_scalebarObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_scalebarObj();
	}
}

class legendObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'legendObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'outlinecolor') return new colorObj(legendObj_outlinecolor_get($this->_cPtr));
		if ($var === 'label') return new labelObj(legendObj_label_get($this->_cPtr));
		if ($var === 'imagecolor') return new colorObj(legendObj_imagecolor_get($this->_cPtr));
		if ($var === 'map') return new mapObj(legendObj_map_get($this->_cPtr));
		$func = 'legendObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('legendObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function updateFromString($snippet) {
		return legendObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return legendObj_convertToString($this->_cPtr);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_legendObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_legendObj();
	}
}

class imageObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'format') return new outputFormatObj(imageObj_format_get($this->_cPtr));
		$func = 'imageObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('imageObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($width,$height=null,$input_format=null,$file=null,$resolution=null,$defresolution=null) {
		if (is_resource($width) && get_resource_type($width) === '_p_imageObj') {
			$this->_cPtr=$width;
			return;
		}
		switch (func_num_args()) {
		case 2: case 3: $this->_cPtr=new_imageObj($width,$height,$input_format); break;
		case 4: $this->_cPtr=new_imageObj($width,$height,$input_format,$file); break;
		case 5: $this->_cPtr=new_imageObj($width,$height,$input_format,$file,$resolution); break;
		default: $this->_cPtr=new_imageObj($width,$height,$input_format,$file,$resolution,$defresolution);
		}
	}

	function save($filename,$map=null) {
		imageObj_save($this->_cPtr,$filename,$map);
	}

	function write($file=null) {
		return imageObj_write($this->_cPtr,$file);
	}

	function getBytes() {
		return imageObj_getBytes($this->_cPtr);
	}

	function getSize() {
		return imageObj_getSize($this->_cPtr);
	}
}

class scaleTokenEntryObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'scaleTokenEntryObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'scaleTokenEntryObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('scaleTokenEntryObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_scaleTokenEntryObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_scaleTokenEntryObj();
	}
}

class scaleTokenObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'scaleTokenObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'tokens') return new scaleTokenEntryObj(scaleTokenObj_tokens_get($this->_cPtr));
		if ($var === 'name') return scaleTokenObj_name_get($this->_cPtr);
		if ($var === 'n_entries') return scaleTokenObj_n_entries_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('scaleTokenObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_scaleTokenObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_scaleTokenObj();
	}
}

class layerObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'layerObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'compositer') return new LayerCompositer(layerObj_compositer_get($this->_cPtr));
		if ($var === 'cluster') return new clusterObj(layerObj_cluster_get($this->_cPtr));
		if ($var === 'bindvals') return new hashTableObj(layerObj_bindvals_get($this->_cPtr));
		if ($var === 'map') return new mapObj(layerObj_map_get($this->_cPtr));
		if ($var === 'connectionoptions') return new hashTableObj(layerObj_connectionoptions_get($this->_cPtr));
		if ($var === 'extent') return new rectObj(layerObj_extent_get($this->_cPtr));
		if ($var === 'offsite') return new colorObj(layerObj_offsite_get($this->_cPtr));
		if ($var === 'validation') return new hashTableObj(layerObj_validation_get($this->_cPtr));
		if ($var === 'metadata') return new hashTableObj(layerObj_metadata_get($this->_cPtr));
		$func = 'layerObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('layerObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($map=null) {
		if (is_resource($map) && get_resource_type($map) === '_p_layerObj') {
			$this->_cPtr=$map;
			return;
		}
		$this->_cPtr=new_layerObj($map);
	}

	function setOpacity($opacity) {
		layerObj_setOpacity($this->_cPtr,$opacity);
	}

	function getOpacity() {
		return layerObj_getOpacity($this->_cPtr);
	}

	function cloneLayer() {
		$r=layerObj_cloneLayer($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new layerObj($r);
		}
		return $r;
	}

	function updateFromString($snippet) {
		return layerObj_updateFromString($this->_cPtr,$snippet);
	}

	function convertToString() {
		return layerObj_convertToString($this->_cPtr);
	}

	function insertClass($classobj,$index=-1) {
		return layerObj_insertClass($this->_cPtr,$classobj,$index);
	}

	function removeClass($index) {
		$r=layerObj_removeClass($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new classObj($r);
		}
		return $r;
	}

	function open() {
		return layerObj_open($this->_cPtr);
	}

	function whichShapes($rect) {
		return layerObj_whichShapes($this->_cPtr,$rect);
	}

	function nextShape() {
		$r=layerObj_nextShape($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function close() {
		layerObj_close($this->_cPtr);
	}

	function getShape($record) {
		$r=layerObj_getShape($this->_cPtr,$record);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function getNumResults() {
		return layerObj_getNumResults($this->_cPtr);
	}

	function getResultsBounds() {
		$r=layerObj_getResultsBounds($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new rectObj($r);
		}
		return $r;
	}

	function getResult($i) {
		$r=layerObj_getResult($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new resultObj($r);
		}
		return $r;
	}

	function getClass($i) {
		$r=layerObj_getClass($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new classObj($r);
		}
		return $r;
	}

	function getItem($i) {
		return layerObj_getItem($this->_cPtr,$i);
	}

	function setItems($items,$numitems) {
		return layerObj_setItems($this->_cPtr,$items,$numitems);
	}

	function draw($map,$image) {
		return layerObj_draw($this->_cPtr,$map,$image);
	}

	function drawQuery($map,$image) {
		return layerObj_drawQuery($this->_cPtr,$map,$image);
	}

	function queryByFilter($map,$string) {
		return layerObj_queryByFilter($this->_cPtr,$map,$string);
	}

	function queryByAttributes($map,$qitem,$qstring,$mode) {
		return layerObj_queryByAttributes($this->_cPtr,$map,$qitem,$qstring,$mode);
	}

	function queryByPoint($map,$point,$mode,$buffer) {
		return layerObj_queryByPoint($this->_cPtr,$map,$point,$mode,$buffer);
	}

	function queryByRect($map,$rect) {
		return layerObj_queryByRect($this->_cPtr,$map,$rect);
	}

	function queryByFeatures($map,$slayer) {
		return layerObj_queryByFeatures($this->_cPtr,$map,$slayer);
	}

	function queryByShape($map,$shape) {
		return layerObj_queryByShape($this->_cPtr,$map,$shape);
	}

	function queryByIndex($map,$tileindex,$shapeindex,$bAddToQuery=0) {
		return layerObj_queryByIndex($this->_cPtr,$map,$tileindex,$shapeindex,$bAddToQuery);
	}

	function getResults() {
		$r=layerObj_getResults($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new resultCacheObj($r);
		}
		return $r;
	}

	function setFilter($filter) {
		return layerObj_setFilter($this->_cPtr,$filter);
	}

	function getFilterString() {
		return layerObj_getFilterString($this->_cPtr);
	}

	function setWKTProjection($wkt) {
		return layerObj_setWKTProjection($this->_cPtr,$wkt);
	}

	function getProjection() {
		return layerObj_getProjection($this->_cPtr);
	}

	function setProjection($proj4) {
		return layerObj_setProjection($this->_cPtr,$proj4);
	}

	function addFeature($shape) {
		return layerObj_addFeature($this->_cPtr,$shape);
	}

	function getNumFeatures() {
		return layerObj_getNumFeatures($this->_cPtr);
	}

	function getExtent() {
		$r=layerObj_getExtent($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new rectObj($r);
		}
		return $r;
	}

	function setExtent($minx=-1.0,$miny=-1.0,$maxx=-1.0,$maxy=-1.0) {
		return layerObj_setExtent($this->_cPtr,$minx,$miny,$maxx,$maxy);
	}

	function getMetaData($name) {
		return layerObj_getMetaData($this->_cPtr,$name);
	}

	function setMetaData($name,$value) {
		return layerObj_setMetaData($this->_cPtr,$name,$value);
	}

	function removeMetaData($name) {
		return layerObj_removeMetaData($this->_cPtr,$name);
	}

	function getFirstMetaDataKey() {
		return layerObj_getFirstMetaDataKey($this->_cPtr);
	}

	function getNextMetaDataKey($lastkey) {
		return layerObj_getNextMetaDataKey($this->_cPtr,$lastkey);
	}

	function getWMSFeatureInfoURL($map,$click_x,$click_y,$feature_count,$info_format) {
		return layerObj_getWMSFeatureInfoURL($this->_cPtr,$map,$click_x,$click_y,$feature_count,$info_format);
	}

	function executeWFSGetFeature($layer) {
		return layerObj_executeWFSGetFeature($this->_cPtr,$layer);
	}

	function applySLD($sld,$stylelayer) {
		return layerObj_applySLD($this->_cPtr,$sld,$stylelayer);
	}

	function applySLDURL($sld,$stylelayer) {
		return layerObj_applySLDURL($this->_cPtr,$sld,$stylelayer);
	}

	function generateSLD() {
		return layerObj_generateSLD($this->_cPtr);
	}

	function isVisible() {
		return layerObj_isVisible($this->_cPtr);
	}

	function moveClassUp($index) {
		return layerObj_moveClassUp($this->_cPtr,$index);
	}

	function moveClassDown($index) {
		return layerObj_moveClassDown($this->_cPtr,$index);
	}

	function setProcessingKey($key,$value) {
		layerObj_setProcessingKey($this->_cPtr,$key,$value);
	}

	function setProcessing($directive) {
		layerObj_setProcessing($this->_cPtr,$directive);
	}

	function addProcessing($directive) {
		layerObj_addProcessing($this->_cPtr,$directive);
	}

	function getProcessing($index) {
		return layerObj_getProcessing($this->_cPtr,$index);
	}

	function getProcessingKey($key) {
		return layerObj_getProcessingKey($this->_cPtr,$key);
	}

	function clearProcessing() {
		return layerObj_clearProcessing($this->_cPtr);
	}

	function setConnectionType($connectiontype,$library_str) {
		return layerObj_setConnectionType($this->_cPtr,$connectiontype,$library_str);
	}

	function getClassIndex($map,$shape,$classgroup=null,$numclasses=0) {
		return layerObj_getClassIndex($this->_cPtr,$map,$shape,$classgroup,$numclasses);
	}

	function getGeomTransform() {
		return layerObj_getGeomTransform($this->_cPtr);
	}

	function setGeomTransform($transform) {
		layerObj_setGeomTransform($this->_cPtr,$transform);
	}

	function getItemType($i) {
		return layerObj_getItemType($this->_cPtr,$i);
	}
}

class mapObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'mapObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'imagecolor') return new colorObj(mapObj_imagecolor_get($this->_cPtr));
		if ($var === 'outputformat') return new outputFormatObj(mapObj_outputformat_get($this->_cPtr));
		if ($var === 'reference') return new referenceMapObj(mapObj_reference_get($this->_cPtr));
		if ($var === 'querymap') return new queryMapObj(mapObj_querymap_get($this->_cPtr));
		if ($var === 'web') return new webObj(mapObj_web_get($this->_cPtr));
		if ($var === 'symbolset') return new symbolSetObj(mapObj_symbolset_get($this->_cPtr));
		if ($var === 'configoptions') return new hashTableObj(mapObj_configoptions_get($this->_cPtr));
		if ($var === 'labelcache') return new labelCacheObj(mapObj_labelcache_get($this->_cPtr));
		if ($var === 'extent') return new rectObj(mapObj_extent_get($this->_cPtr));
		if ($var === 'fontset') return new fontSetObj(mapObj_fontset_get($this->_cPtr));
		if ($var === 'scalebar') return new scalebarObj(mapObj_scalebar_get($this->_cPtr));
		if ($var === 'legend') return new legendObj(mapObj_legend_get($this->_cPtr));
		$func = 'mapObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('mapObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($filename="") {
		if (is_resource($filename) && get_resource_type($filename) === '_p_mapObj') {
			$this->_cPtr=$filename;
			return;
		}
		$this->_cPtr=new_mapObj($filename);
	}

	function cloneMap() {
		$r=mapObj_cloneMap($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new mapObj($r);
		}
		return $r;
	}

	function insertLayer($layer,$index=-1) {
		return mapObj_insertLayer($this->_cPtr,$layer,$index);
	}

	function removeLayer($index) {
		$r=mapObj_removeLayer($this->_cPtr,$index);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new layerObj($r);
		}
		return $r;
	}

	function setExtent($minx,$miny,$maxx,$maxy) {
		return mapObj_setExtent($this->_cPtr,$minx,$miny,$maxx,$maxy);
	}

	function offsetExtent($x,$y) {
		return mapObj_offsetExtent($this->_cPtr,$x,$y);
	}

	function scaleExtent($zoomfactor,$minscaledenom,$maxscaledenom) {
		return mapObj_scaleExtent($this->_cPtr,$zoomfactor,$minscaledenom,$maxscaledenom);
	}

	function setCenter($center) {
		return mapObj_setCenter($this->_cPtr,$center);
	}

	function setSize($width,$height) {
		return mapObj_setSize($this->_cPtr,$width,$height);
	}

	function pixelToGeoref($pixPosX,$pixPosY,$geoPos) {
		mapObj_pixelToGeoref($this->_cPtr,$pixPosX,$pixPosY,$geoPos);
	}

	function getRotation() {
		return mapObj_getRotation($this->_cPtr);
	}

	function setRotation($rotation_angle) {
		return mapObj_setRotation($this->_cPtr,$rotation_angle);
	}

	function getLayer($i) {
		$r=mapObj_getLayer($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new layerObj($r);
		}
		return $r;
	}

	function getLayerByName($name) {
		$r=mapObj_getLayerByName($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new layerObj($r);
		}
		return $r;
	}

	function getSymbolByName($name) {
		return mapObj_getSymbolByName($this->_cPtr,$name);
	}

	function prepareQuery() {
		mapObj_prepareQuery($this->_cPtr);
	}

	function prepareImage() {
		$r=mapObj_prepareImage($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function setImageType($imagetype) {
		mapObj_setImageType($this->_cPtr,$imagetype);
	}

	function selectOutputFormat($imagetype) {
		mapObj_selectOutputFormat($this->_cPtr,$imagetype);
	}

	function getOutputFormat($i) {
		$r=mapObj_getOutputFormat($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new outputFormatObj($r);
		}
		return $r;
	}

	function setOutputFormat($format) {
		mapObj_setOutputFormat($this->_cPtr,$format);
	}

	function draw() {
		$r=mapObj_draw($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function drawQuery() {
		$r=mapObj_drawQuery($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function drawLegend() {
		$r=mapObj_drawLegend($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function drawScalebar() {
		$r=mapObj_drawScalebar($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function drawReferenceMap() {
		$r=mapObj_drawReferenceMap($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function embedScalebar($image) {
		return mapObj_embedScalebar($this->_cPtr,$image);
	}

	function embedLegend($image) {
		return mapObj_embedLegend($this->_cPtr,$image);
	}

	function drawLabelCache($image) {
		return mapObj_drawLabelCache($this->_cPtr,$image);
	}

	function queryByFilter($string) {
		return mapObj_queryByFilter($this->_cPtr,$string);
	}

	function queryByPoint($point,$mode,$buffer) {
		return mapObj_queryByPoint($this->_cPtr,$point,$mode,$buffer);
	}

	function queryByRect($rect) {
		return mapObj_queryByRect($this->_cPtr,$rect);
	}

	function queryByFeatures($slayer) {
		return mapObj_queryByFeatures($this->_cPtr,$slayer);
	}

	function queryByShape($shape) {
		return mapObj_queryByShape($this->_cPtr,$shape);
	}

	function setWKTProjection($wkt) {
		return mapObj_setWKTProjection($this->_cPtr,$wkt);
	}

	function getProjection() {
		return mapObj_getProjection($this->_cPtr);
	}

	function setProjection($proj4) {
		return mapObj_setProjection($this->_cPtr,$proj4);
	}

	function save($filename) {
		return mapObj_save($this->_cPtr,$filename);
	}

	function saveQuery($filename,$results=0) {
		return mapObj_saveQuery($this->_cPtr,$filename,$results);
	}

	function loadQuery($filename) {
		return mapObj_loadQuery($this->_cPtr,$filename);
	}

	function freeQuery($qlayer=-1) {
		mapObj_freeQuery($this->_cPtr,$qlayer);
	}

	function saveQueryAsGML($filename,$ns="GOMF") {
		return mapObj_saveQueryAsGML($this->_cPtr,$filename,$ns);
	}

	function getMetaData($name) {
		return mapObj_getMetaData($this->_cPtr,$name);
	}

	function setMetaData($name,$value) {
		return mapObj_setMetaData($this->_cPtr,$name,$value);
	}

	function removeMetaData($name) {
		return mapObj_removeMetaData($this->_cPtr,$name);
	}

	function getFirstMetaDataKey() {
		return mapObj_getFirstMetaDataKey($this->_cPtr);
	}

	function getNextMetaDataKey($lastkey) {
		return mapObj_getNextMetaDataKey($this->_cPtr,$lastkey);
	}

	function setSymbolSet($szFileName) {
		return mapObj_setSymbolSet($this->_cPtr,$szFileName);
	}

	function getNumSymbols() {
		return mapObj_getNumSymbols($this->_cPtr);
	}

	function setFontSet($filename) {
		return mapObj_setFontSet($this->_cPtr,$filename);
	}

	function saveMapContext($szFileName) {
		return mapObj_saveMapContext($this->_cPtr,$szFileName);
	}

	function loadMapContext($szFileName,$useUniqueNames=0) {
		return mapObj_loadMapContext($this->_cPtr,$szFileName,$useUniqueNames);
	}

	function moveLayerUp($layerindex) {
		return mapObj_moveLayerUp($this->_cPtr,$layerindex);
	}

	function moveLayerDown($layerindex) {
		return mapObj_moveLayerDown($this->_cPtr,$layerindex);
	}

	function getLayersDrawingOrder() {
		$r=mapObj_getLayersDrawingOrder($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new intarray($r);
		}
		return $r;
	}

	function setLayersDrawingOrder($panIndexes) {
		return mapObj_setLayersDrawingOrder($this->_cPtr,$panIndexes);
	}

	function setConfigOption($key,$value) {
		mapObj_setConfigOption($this->_cPtr,$key,$value);
	}

	function getConfigOption($key) {
		return mapObj_getConfigOption($this->_cPtr,$key);
	}

	function applyConfigOptions() {
		mapObj_applyConfigOptions($this->_cPtr);
	}

	function applySLD($sld) {
		return mapObj_applySLD($this->_cPtr,$sld);
	}

	function applySLDURL($sld) {
		return mapObj_applySLDURL($this->_cPtr,$sld);
	}

	function generateSLD($sldVersion=null) {
		switch (func_num_args()) {
		case 0: $r=mapObj_generateSLD($this->_cPtr); break;
		default: $r=mapObj_generateSLD($this->_cPtr,$sldVersion);
		}
		return $r;
	}

	function processTemplate($bGenerateImages,$names,$values,$numentries) {
		return mapObj_processTemplate($this->_cPtr,$bGenerateImages,$names,$values,$numentries);
	}

	function processLegendTemplate($names,$values,$numentries) {
		return mapObj_processLegendTemplate($this->_cPtr,$names,$values,$numentries);
	}

	function processQueryTemplate($names,$values,$numentries) {
		return mapObj_processQueryTemplate($this->_cPtr,$names,$values,$numentries);
	}

	function getOutputFormatByName($name) {
		$r=mapObj_getOutputFormatByName($this->_cPtr,$name);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new outputFormatObj($r);
		}
		return $r;
	}

	function appendOutputFormat($format) {
		return mapObj_appendOutputFormat($this->_cPtr,$format);
	}

	function removeOutputFormat($name) {
		return mapObj_removeOutputFormat($this->_cPtr,$name);
	}

	function loadOWSParameters($request,$wmtver_string="1.1.1") {
		return mapObj_loadOWSParameters($this->_cPtr,$request,$wmtver_string);
	}

	function OWSDispatch($req) {
		return mapObj_OWSDispatch($this->_cPtr,$req);
	}

	function convertToString() {
		return mapObj_convertToString($this->_cPtr);
	}

	function applyDefaultSubstitutions() {
		mapObj_applyDefaultSubstitutions($this->_cPtr);
	}

	function applySubstitutions($names,$values,$npairs) {
		mapObj_applySubstitutions($this->_cPtr,$names,$values,$npairs);
	}

	function zoomPoint($zoomfactor,$poPixPos,$width,$height,$poGeorefExt,$poMaxGeorefExt) {
		return mapObj_zoomPoint($this->_cPtr,$zoomfactor,$poPixPos,$width,$height,$poGeorefExt,$poMaxGeorefExt);
	}

	function zoomRectangle($poPixRect,$width,$height,$poGeorefExt,$poMaxGeorefExt) {
		return mapObj_zoomRectangle($this->_cPtr,$poPixRect,$width,$height,$poGeorefExt,$poMaxGeorefExt);
	}

	function zoomScale($scale,$poPixPos,$width,$height,$poGeorefExt,$poMaxGeorefExt) {
		return mapObj_zoomScale($this->_cPtr,$scale,$poPixPos,$width,$height,$poGeorefExt,$poMaxGeorefExt);
	}
}

class rectObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'rectObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'rectObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('rectObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($minx=-1.0,$miny=-1.0,$maxx=-1.0,$maxy=-1.0,$imageunits=0) {
		if (is_resource($minx) && get_resource_type($minx) === '_p_rectObj') {
			$this->_cPtr=$minx;
			return;
		}
		$this->_cPtr=new_rectObj($minx,$miny,$maxx,$maxy,$imageunits);
	}

	function project($projin,$projout) {
		return rectObj_project($this->_cPtr,$projin,$projout);
	}

	function fit($width,$height) {
		return rectObj_fit($this->_cPtr,$width,$height);
	}

	function draw($map,$layer,$image,$classindex,$text) {
		return rectObj_draw($this->_cPtr,$map,$layer,$image,$classindex,$text);
	}

	function getCenter() {
		$r=rectObj_getCenter($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new pointObj($r);
		}
		return $r;
	}

	function toPolygon() {
		$r=rectObj_toPolygon($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function toString() {
		return rectObj_toString($this->_cPtr);
	}
}

class pointObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'x') return pointObj_x_set($this->_cPtr,$value);
		if ($var === 'y') return pointObj_y_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'x') return pointObj_x_get($this->_cPtr);
		if ($var === 'y') return pointObj_y_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('pointObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($x=0.0,$y=0.0,$z=0.0,$m=null) {
		if (is_resource($x) && get_resource_type($x) === '_p_pointObj') {
			$this->_cPtr=$x;
			return;
		}
		switch (func_num_args()) {
		case 0: case 1: case 2: case 3: $this->_cPtr=new_pointObj($x,$y,$z); break;
		default: $this->_cPtr=new_pointObj($x,$y,$z,$m);
		}
	}

	function project($projin,$projout) {
		return pointObj_project($this->_cPtr,$projin,$projout);
	}

	function draw($map,$layer,$image,$classindex,$text) {
		return pointObj_draw($this->_cPtr,$map,$layer,$image,$classindex,$text);
	}

	function distanceToPoint($point) {
		return pointObj_distanceToPoint($this->_cPtr,$point);
	}

	function distanceToSegment($a,$b) {
		return pointObj_distanceToSegment($this->_cPtr,$a,$b);
	}

	function distanceToShape($shape) {
		return pointObj_distanceToShape($this->_cPtr,$shape);
	}

	function setXY($x,$y,$m=null) {
		switch (func_num_args()) {
		case 2: $r=pointObj_setXY($this->_cPtr,$x,$y); break;
		default: $r=pointObj_setXY($this->_cPtr,$x,$y,$m);
		}
		return $r;
	}

	function setXYZ($x,$y,$z,$m=null) {
		switch (func_num_args()) {
		case 3: $r=pointObj_setXYZ($this->_cPtr,$x,$y,$z); break;
		default: $r=pointObj_setXYZ($this->_cPtr,$x,$y,$z,$m);
		}
		return $r;
	}

	function setXYZM($x,$y,$z,$m) {
		return pointObj_setXYZM($this->_cPtr,$x,$y,$z,$m);
	}

	function toString() {
		return pointObj_toString($this->_cPtr);
	}

	function toShape() {
		$r=pointObj_toShape($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}
}

class lineObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'numpoints') return lineObj_numpoints_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('lineObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_lineObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_lineObj();
	}

	function project($projin,$projout) {
		return lineObj_project($this->_cPtr,$projin,$projout);
	}

	function get($i) {
		$r=lineObj_get($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new pointObj($r);
		}
		return $r;
	}

	function add($p) {
		return lineObj_add($this->_cPtr,$p);
	}

	function set($i,$p) {
		return lineObj_set($this->_cPtr,$i,$p);
	}
}

class shapeObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'shapeObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'bounds') return new rectObj(shapeObj_bounds_get($this->_cPtr));
		$func = 'shapeObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('shapeObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($type=null) {
		if (is_resource($type) && get_resource_type($type) === '_p_shapeObj') {
			$this->_cPtr=$type;
			return;
		}
		switch (func_num_args()) {
		case 0: $this->_cPtr=new_shapeObj(); break;
		default: $this->_cPtr=new_shapeObj($type);
		}
	}

	static function fromWKT($wkt) {
		$r=shapeObj_fromWKT($wkt);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function project($projin,$projout) {
		return shapeObj_project($this->_cPtr,$projin,$projout);
	}

	function get($i) {
		$r=shapeObj_get($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new lineObj($r);
		}
		return $r;
	}

	function add($line) {
		return shapeObj_add($this->_cPtr,$line);
	}

	function draw($map,$layer,$image) {
		return shapeObj_draw($this->_cPtr,$map,$layer,$image);
	}

	function setBounds() {
		shapeObj_setBounds($this->_cPtr);
	}

	function cloneShape() {
		$r=shapeObj_cloneShape($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function copy($dest) {
		return shapeObj_copy($this->_cPtr,$dest);
	}

	function toWKT() {
		return shapeObj_toWKT($this->_cPtr);
	}

	function buffer($width) {
		$r=shapeObj_buffer($this->_cPtr,$width);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function simplify($tolerance) {
		$r=shapeObj_simplify($this->_cPtr,$tolerance);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function topologyPreservingSimplify($tolerance) {
		$r=shapeObj_topologyPreservingSimplify($this->_cPtr,$tolerance);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function convexHull() {
		$r=shapeObj_convexHull($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function boundary() {
		$r=shapeObj_boundary($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function getCentroid() {
		$r=shapeObj_getCentroid($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new pointObj($r);
		}
		return $r;
	}

	function Union($shape) {
		$r=shapeObj_Union($this->_cPtr,$shape);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function intersection($shape) {
		$r=shapeObj_intersection($this->_cPtr,$shape);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function difference($shape) {
		$r=shapeObj_difference($this->_cPtr,$shape);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function symDifference($shape) {
		$r=shapeObj_symDifference($this->_cPtr,$shape);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function overlaps($shape) {
		return shapeObj_overlaps($this->_cPtr,$shape);
	}

	function within($shape) {
		return shapeObj_within($this->_cPtr,$shape);
	}

	function crosses($shape) {
		return shapeObj_crosses($this->_cPtr,$shape);
	}

	function intersects($shape) {
		return shapeObj_intersects($this->_cPtr,$shape);
	}

	function touches($shape) {
		return shapeObj_touches($this->_cPtr,$shape);
	}

	function equals($shape) {
		return shapeObj_equals($this->_cPtr,$shape);
	}

	function disjoint($shape) {
		return shapeObj_disjoint($this->_cPtr,$shape);
	}

	function getArea() {
		return shapeObj_getArea($this->_cPtr);
	}

	function getLength() {
		return shapeObj_getLength($this->_cPtr);
	}

	function getValue($i) {
		return shapeObj_getValue($this->_cPtr,$i);
	}

	function contains($shape_or_point) {
		return shapeObj_contains($this->_cPtr,$shape_or_point);
	}

	function distanceToPoint($point) {
		return shapeObj_distanceToPoint($this->_cPtr,$point);
	}

	function distanceToShape($shape) {
		return shapeObj_distanceToShape($this->_cPtr,$shape);
	}

	function getLabelPoint() {
		$r=shapeObj_getLabelPoint($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new pointObj($r);
		}
		return $r;
	}

	function setValue($i,$value) {
		return shapeObj_setValue($this->_cPtr,$i,$value);
	}

	function initValues($numvalues) {
		shapeObj_initValues($this->_cPtr,$numvalues);
	}
}

class DBFInfo {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'DBFInfo_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('DBFInfo_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function getFieldName($iField) {
		return DBFInfo_getFieldName($this->_cPtr,$iField);
	}

	function getFieldWidth($iField) {
		return DBFInfo_getFieldWidth($this->_cPtr,$iField);
	}

	function getFieldDecimals($iField) {
		return DBFInfo_getFieldDecimals($this->_cPtr,$iField);
	}

	function getFieldType($iField) {
		return DBFInfo_getFieldType($this->_cPtr,$iField);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_DBFInfo') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_DBFInfo();
	}
}

class shapefileObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'bounds') return new rectObj(shapefileObj_bounds_get($this->_cPtr));
		$func = 'shapefileObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('shapefileObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($filename,$type=-1) {
		if (is_resource($filename) && get_resource_type($filename) === '_p_shapefileObj') {
			$this->_cPtr=$filename;
			return;
		}
		$this->_cPtr=new_shapefileObj($filename,$type);
	}

	function get($i,$shape) {
		return shapefileObj_get($this->_cPtr,$i,$shape);
	}

	function getShape($i) {
		$r=shapefileObj_getShape($this->_cPtr,$i);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new shapeObj($r);
		}
		return $r;
	}

	function getPoint($i,$point) {
		return shapefileObj_getPoint($this->_cPtr,$i,$point);
	}

	function getTransformed($map,$i,$shape) {
		return shapefileObj_getTransformed($this->_cPtr,$map,$i,$shape);
	}

	function getExtent($i,$rect) {
		shapefileObj_getExtent($this->_cPtr,$i,$rect);
	}

	function add($shape) {
		return shapefileObj_add($this->_cPtr,$shape);
	}

	function addPoint($point) {
		return shapefileObj_addPoint($this->_cPtr,$point);
	}

	function getDBF() {
		$r=shapefileObj_getDBF($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new DBFInfo($r);
		}
		return $r;
	}
}

class projectionObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'wellknownprojection') return projectionObj_wellknownprojection_set($this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'projectionObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('projectionObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($proj4) {
		if (is_resource($proj4) && get_resource_type($proj4) === '_p_projectionObj') {
			$this->_cPtr=$proj4;
			return;
		}
		$this->_cPtr=new_projectionObj($proj4);
	}

	function setWKTProjection($wkt) {
		return projectionObj_setWKTProjection($this->_cPtr,$wkt);
	}

	function getUnits() {
		return projectionObj_getUnits($this->_cPtr);
	}
}

class colorObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'colorObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'colorObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('colorObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($red=0,$green=0,$blue=0,$alpha=255) {
		if (is_resource($red) && get_resource_type($red) === '_p_colorObj') {
			$this->_cPtr=$red;
			return;
		}
		$this->_cPtr=new_colorObj($red,$green,$blue,$alpha);
	}

	function setRGB($red,$green,$blue,$alpha=255) {
		return colorObj_setRGB($this->_cPtr,$red,$green,$blue,$alpha);
	}

	function setHex($psHexColor) {
		return colorObj_setHex($this->_cPtr,$psHexColor);
	}

	function toHex() {
		return colorObj_toHex($this->_cPtr);
	}
}

class symbolObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'symbolObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'symbolObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('symbolObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($symbolname,$imagefile=null) {
		if (is_resource($symbolname) && get_resource_type($symbolname) === '_p_symbolObj') {
			$this->_cPtr=$symbolname;
			return;
		}
		switch (func_num_args()) {
		case 1: $this->_cPtr=new_symbolObj($symbolname); break;
		default: $this->_cPtr=new_symbolObj($symbolname,$imagefile);
		}
	}

	function setImagepath($imagefile) {
		return symbolObj_setImagepath($this->_cPtr,$imagefile);
	}

	function setPoints($line) {
		return symbolObj_setPoints($this->_cPtr,$line);
	}

	function getPoints() {
		$r=symbolObj_getPoints($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new lineObj($r);
		}
		return $r;
	}

	function getImage($input_format) {
		$r=symbolObj_getImage($this->_cPtr,$input_format);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new imageObj($r);
		}
		return $r;
	}

	function setImage($image) {
		return symbolObj_setImage($this->_cPtr,$image);
	}
}

class errorObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'errorObj_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'errorObj_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('errorObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_errorObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_errorObj();
	}

	function next() {
		$r=errorObj_next($this->_cPtr);
		if (is_resource($r)) {
			$c=substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));
			if (class_exists($c)) return new $c($r);
			return new errorObj($r);
		}
		return $r;
	}
}

class hashTableObj {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		if ($var === 'numitems') return hashTableObj_numitems_get($this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('hashTableObj_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_hashTableObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_hashTableObj();
	}

	function set($key,$value) {
		return hashTableObj_set($this->_cPtr,$key,$value);
	}

	function get($key,$default_value=null) {
		switch (func_num_args()) {
		case 1: $r=hashTableObj_get($this->_cPtr,$key); break;
		default: $r=hashTableObj_get($this->_cPtr,$key,$default_value);
		}
		return $r;
	}

	function remove($key) {
		return hashTableObj_remove($this->_cPtr,$key);
	}

	function clear() {
		hashTableObj_clear($this->_cPtr);
	}

	function nextKey($prevkey=null) {
		switch (func_num_args()) {
		case 0: $r=hashTableObj_nextKey($this->_cPtr); break;
		default: $r=hashTableObj_nextKey($this->_cPtr,$prevkey);
		}
		return $r;
	}
}

class OWSRequest {
	public $_cPtr=null;
	protected $_pData=array();

	function __set($var,$value) {
		$func = 'OWSRequest_'.$var.'_set';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr,$value);
		if ($var === 'thisown') return swig_mapscript_alter_newobject($this->_cPtr,$value);
		$this->_pData[$var] = $value;
	}

	function __get($var) {
		$func = 'OWSRequest_'.$var.'_get';
		if (function_exists($func)) return call_user_func($func,$this->_cPtr);
		if ($var === 'thisown') return swig_mapscript_get_newobject($this->_cPtr);
		return $this->_pData[$var];
	}

	function __isset($var) {
		if (function_exists('OWSRequest_'.$var.'_get')) return true;
		if ($var === 'thisown') return true;
		return array_key_exists($var, $this->_pData);
	}

	function __construct($res=null) {
		if (is_resource($res) && get_resource_type($res) === '_p_cgiRequestObj') {
			$this->_cPtr=$res;
			return;
		}
		$this->_cPtr=new_OWSRequest();
	}

	function loadParams() {
		return OWSRequest_loadParams($this->_cPtr);
	}

	function loadParamsFromURL($url) {
		return OWSRequest_loadParamsFromURL($this->_cPtr,$url);
	}

	function setParameter($name,$value) {
		OWSRequest_setParameter($this->_cPtr,$name,$value);
	}

	function addParameter($name,$value) {
		OWSRequest_addParameter($this->_cPtr,$name,$value);
	}

	function getName($index) {
		return OWSRequest_getName($this->_cPtr,$index);
	}

	function getValue($index) {
		return OWSRequest_getValue($this->_cPtr,$index);
	}

	function getValueByName($name) {
		return OWSRequest_getValueByName($this->_cPtr,$name);
	}
}


