# This file was automatically generated by SWIG (https://www.swig.org).# Version 4.2.1## Do not make changes to this file unless you know what you are doing - modify# the SWIG interface file instead.fromsysimportversion_infoas_swig_python_version_info# Import the low-level C/C++ moduleif__package__or"."in__name__:from.import_mapscriptelse:import_mapscripttry:importbuiltinsas__builtin__exceptImportError:import__builtin__def_swig_repr(self):try:strthis="proxy of "+self.this.__repr__()except__builtin__.Exception:strthis=""return"<%s.%s; %s >"%(self.__class__.__module__,self.__class__.__name__,strthis,)def_swig_setattr_nondynamic_instance_variable(set):defset_instance_attr(self,name,value):ifname=="this":set(self,name,value)elifname=="thisown":self.this.own(value)elifhasattr(self,name)andisinstance(getattr(type(self),name),property):set(self,name,value)else:raiseAttributeError("You cannot add instance attributes to %s"%self)returnset_instance_attrdef_swig_setattr_nondynamic_class_variable(set):defset_class_attr(cls,name,value):ifhasattr(cls,name)andnotisinstance(getattr(cls,name),property):set(cls,name,value)else:raiseAttributeError("You cannot add class attributes to %s"%cls)returnset_class_attrdef_swig_add_metaclass(metaclass):"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""defwrapper(cls):returnmetaclass(cls.__name__,cls.__bases__,cls.__dict__.copy())returnwrapperclass_SwigNonDynamicMeta(type):"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""__setattr__=_swig_setattr_nondynamic_class_variable(type.__setattr__)classintarray(object):thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprdef__init__(self,nelements:"size_t"):_mapscript.intarray_swiginit(self,_mapscript.new_intarray(nelements))__swig_destroy__=_mapscript.delete_intarraydef__getitem__(self,index:"size_t")->"int":return_mapscript.intarray___getitem__(self,index)def__setitem__(self,index:"size_t",value:"int")->"void":return_mapscript.intarray___setitem__(self,index,value)defcast(self)->"int *":return_mapscript.intarray_cast(self)@staticmethoddeffrompointer(t:"int *")->"intarray *":return_mapscript.intarray_frompointer(t)# Register intarray in _mapscript:_mapscript.intarray_swigregister(intarray)MapServerError=_mapscript.MapServerErrorMapServerChildError=_mapscript.MapServerChildErrorMS_TRUE=_mapscript.MS_TRUEMS_FALSE=_mapscript.MS_FALSEMS_UNKNOWN=_mapscript.MS_UNKNOWNMS_ON=_mapscript.MS_ONMS_OFF=_mapscript.MS_OFFMS_DEFAULT=_mapscript.MS_DEFAULTMS_EMBED=_mapscript.MS_EMBEDMS_DELETE=_mapscript.MS_DELETEMS_YES=_mapscript.MS_YESMS_NO=_mapscript.MS_NOMS_LAYER_ALLOCSIZE=_mapscript.MS_LAYER_ALLOCSIZEMS_CLASS_ALLOCSIZE=_mapscript.MS_CLASS_ALLOCSIZEMS_STYLE_ALLOCSIZE=_mapscript.MS_STYLE_ALLOCSIZEMS_LABEL_ALLOCSIZE=_mapscript.MS_LABEL_ALLOCSIZEMS_MAX_LABEL_PRIORITY=_mapscript.MS_MAX_LABEL_PRIORITYMS_MAX_LABEL_FONTS=_mapscript.MS_MAX_LABEL_FONTSMS_DEFAULT_LABEL_PRIORITY=_mapscript.MS_DEFAULT_LABEL_PRIORITYMS_LABEL_FORCE_GROUP=_mapscript.MS_LABEL_FORCE_GROUPMS_RENDER_WITH_SWF=_mapscript.MS_RENDER_WITH_SWFMS_RENDER_WITH_RAWDATA=_mapscript.MS_RENDER_WITH_RAWDATAMS_RENDER_WITH_IMAGEMAP=_mapscript.MS_RENDER_WITH_IMAGEMAPMS_RENDER_WITH_TEMPLATE=_mapscript.MS_RENDER_WITH_TEMPLATEMS_RENDER_WITH_OGR=_mapscript.MS_RENDER_WITH_OGRMS_RENDER_WITH_PLUGIN=_mapscript.MS_RENDER_WITH_PLUGINMS_RENDER_WITH_CAIRO_RASTER=_mapscript.MS_RENDER_WITH_CAIRO_RASTERMS_RENDER_WITH_CAIRO_PDF=_mapscript.MS_RENDER_WITH_CAIRO_PDFMS_RENDER_WITH_CAIRO_SVG=_mapscript.MS_RENDER_WITH_CAIRO_SVGMS_RENDER_WITH_OGL=_mapscript.MS_RENDER_WITH_OGLMS_RENDER_WITH_AGG=_mapscript.MS_RENDER_WITH_AGGMS_RENDER_WITH_KML=_mapscript.MS_RENDER_WITH_KMLMS_RENDER_WITH_UTFGRID=_mapscript.MS_RENDER_WITH_UTFGRIDMS_RENDER_WITH_MVT=_mapscript.MS_RENDER_WITH_MVTMS_NUM_CHECK_NONE=_mapscript.MS_NUM_CHECK_NONEMS_NUM_CHECK_RANGE=_mapscript.MS_NUM_CHECK_RANGEMS_NUM_CHECK_GT=_mapscript.MS_NUM_CHECK_GTMS_NUM_CHECK_GTE=_mapscript.MS_NUM_CHECK_GTEMS_FILE_MAP=_mapscript.MS_FILE_MAPMS_FILE_SYMBOL=_mapscript.MS_FILE_SYMBOLMS_INCHES=_mapscript.MS_INCHESMS_FEET=_mapscript.MS_FEETMS_MILES=_mapscript.MS_MILESMS_METERS=_mapscript.MS_METERSMS_KILOMETERS=_mapscript.MS_KILOMETERSMS_DD=_mapscript.MS_DDMS_PIXELS=_mapscript.MS_PIXELSMS_PERCENTAGES=_mapscript.MS_PERCENTAGESMS_NAUTICALMILES=_mapscript.MS_NAUTICALMILESMS_INHERIT=_mapscript.MS_INHERITMS_SHAPE_POINT=_mapscript.MS_SHAPE_POINTMS_SHAPE_LINE=_mapscript.MS_SHAPE_LINEMS_SHAPE_POLYGON=_mapscript.MS_SHAPE_POLYGONMS_SHAPE_NULL=_mapscript.MS_SHAPE_NULLMS_LAYER_POINT=_mapscript.MS_LAYER_POINTMS_LAYER_LINE=_mapscript.MS_LAYER_LINEMS_LAYER_POLYGON=_mapscript.MS_LAYER_POLYGONMS_LAYER_RASTER=_mapscript.MS_LAYER_RASTERMS_LAYER_ANNOTATION=_mapscript.MS_LAYER_ANNOTATIONMS_LAYER_QUERY=_mapscript.MS_LAYER_QUERYMS_LAYER_CIRCLE=_mapscript.MS_LAYER_CIRCLEMS_LAYER_TILEINDEX=_mapscript.MS_LAYER_TILEINDEXMS_LAYER_CHART=_mapscript.MS_LAYER_CHARTMS_TRUETYPE=_mapscript.MS_TRUETYPEMS_BITMAP=_mapscript.MS_BITMAPMS_FIRST_MATCHING_CLASS=_mapscript.MS_FIRST_MATCHING_CLASSMS_ALL_MATCHING_CLASSES=_mapscript.MS_ALL_MATCHING_CLASSESMS_POSITIONS_LENGTH=_mapscript.MS_POSITIONS_LENGTHMS_UL=_mapscript.MS_ULMS_LR=_mapscript.MS_LRMS_UR=_mapscript.MS_URMS_LL=_mapscript.MS_LLMS_CR=_mapscript.MS_CRMS_CL=_mapscript.MS_CLMS_UC=_mapscript.MS_UCMS_LC=_mapscript.MS_LCMS_CC=_mapscript.MS_CCMS_AUTO=_mapscript.MS_AUTOMS_XY=_mapscript.MS_XYMS_NONE=_mapscript.MS_NONEMS_AUTO2=_mapscript.MS_AUTO2MS_FOLLOW=_mapscript.MS_FOLLOWMS_TINY=_mapscript.MS_TINYMS_SMALL=_mapscript.MS_SMALLMS_MEDIUM=_mapscript.MS_MEDIUMMS_LARGE=_mapscript.MS_LARGEMS_GIANT=_mapscript.MS_GIANTMS_NORMAL=_mapscript.MS_NORMALMS_HILITE=_mapscript.MS_HILITEMS_SELECTED=_mapscript.MS_SELECTEDMS_INLINE=_mapscript.MS_INLINEMS_SHAPEFILE=_mapscript.MS_SHAPEFILEMS_TILED_SHAPEFILE=_mapscript.MS_TILED_SHAPEFILEMS_UNUSED_2=_mapscript.MS_UNUSED_2MS_OGR=_mapscript.MS_OGRMS_UNUSED_1=_mapscript.MS_UNUSED_1MS_POSTGIS=_mapscript.MS_POSTGISMS_WMS=_mapscript.MS_WMSMS_ORACLESPATIAL=_mapscript.MS_ORACLESPATIALMS_WFS=_mapscript.MS_WFSMS_GRATICULE=_mapscript.MS_GRATICULEMS_MYSQL=_mapscript.MS_MYSQLMS_RASTER=_mapscript.MS_RASTERMS_PLUGIN=_mapscript.MS_PLUGINMS_UNION=_mapscript.MS_UNIONMS_UVRASTER=_mapscript.MS_UVRASTERMS_CONTOUR=_mapscript.MS_CONTOURMS_KERNELDENSITY=_mapscript.MS_KERNELDENSITYMS_IDW=_mapscript.MS_IDWMS_FLATGEOBUF=_mapscript.MS_FLATGEOBUFMS_DB_XBASE=_mapscript.MS_DB_XBASEMS_DB_CSV=_mapscript.MS_DB_CSVMS_DB_MYSQL=_mapscript.MS_DB_MYSQLMS_DB_ORACLE=_mapscript.MS_DB_ORACLEMS_DB_POSTGRES=_mapscript.MS_DB_POSTGRESMS_JOIN_ONE_TO_ONE=_mapscript.MS_JOIN_ONE_TO_ONEMS_JOIN_ONE_TO_MANY=_mapscript.MS_JOIN_ONE_TO_MANYMS_SINGLE=_mapscript.MS_SINGLEMS_MULTIPLE=_mapscript.MS_MULTIPLEMS_QUERY_SINGLE=_mapscript.MS_QUERY_SINGLEMS_QUERY_MULTIPLE=_mapscript.MS_QUERY_MULTIPLEMS_QUERY_IS_NULL=_mapscript.MS_QUERY_IS_NULLMS_QUERY_BY_POINT=_mapscript.MS_QUERY_BY_POINTMS_QUERY_BY_RECT=_mapscript.MS_QUERY_BY_RECTMS_QUERY_BY_SHAPE=_mapscript.MS_QUERY_BY_SHAPEMS_QUERY_BY_ATTRIBUTE=_mapscript.MS_QUERY_BY_ATTRIBUTEMS_QUERY_BY_INDEX=_mapscript.MS_QUERY_BY_INDEXMS_QUERY_BY_FILTER=_mapscript.MS_QUERY_BY_FILTERMS_ALIGN_DEFAULT=_mapscript.MS_ALIGN_DEFAULTMS_ALIGN_LEFT=_mapscript.MS_ALIGN_LEFTMS_ALIGN_CENTER=_mapscript.MS_ALIGN_CENTERMS_ALIGN_RIGHT=_mapscript.MS_ALIGN_RIGHTMS_CJC_NONE=_mapscript.MS_CJC_NONEMS_CJC_BEVEL=_mapscript.MS_CJC_BEVELMS_CJC_BUTT=_mapscript.MS_CJC_BUTTMS_CJC_MITER=_mapscript.MS_CJC_MITERMS_CJC_ROUND=_mapscript.MS_CJC_ROUNDMS_CJC_SQUARE=_mapscript.MS_CJC_SQUAREMS_CJC_TRIANGLE=_mapscript.MS_CJC_TRIANGLEMS_CJC_DEFAULT_JOIN_MAXSIZE=_mapscript.MS_CJC_DEFAULT_JOIN_MAXSIZEMS_SUCCESS=_mapscript.MS_SUCCESSMS_FAILURE=_mapscript.MS_FAILUREMS_DONE=_mapscript.MS_DONEMS_IMAGEMODE_PC256=_mapscript.MS_IMAGEMODE_PC256MS_IMAGEMODE_RGB=_mapscript.MS_IMAGEMODE_RGBMS_IMAGEMODE_RGBA=_mapscript.MS_IMAGEMODE_RGBAMS_IMAGEMODE_INT16=_mapscript.MS_IMAGEMODE_INT16MS_IMAGEMODE_FLOAT32=_mapscript.MS_IMAGEMODE_FLOAT32MS_IMAGEMODE_BYTE=_mapscript.MS_IMAGEMODE_BYTEMS_IMAGEMODE_FEATURE=_mapscript.MS_IMAGEMODE_FEATUREMS_IMAGEMODE_NULL=_mapscript.MS_IMAGEMODE_NULLMS_GEOS_EQUALS=_mapscript.MS_GEOS_EQUALSMS_GEOS_DISJOINT=_mapscript.MS_GEOS_DISJOINTMS_GEOS_TOUCHES=_mapscript.MS_GEOS_TOUCHESMS_GEOS_OVERLAPS=_mapscript.MS_GEOS_OVERLAPSMS_GEOS_CROSSES=_mapscript.MS_GEOS_CROSSESMS_GEOS_INTERSECTS=_mapscript.MS_GEOS_INTERSECTSMS_GEOS_WITHIN=_mapscript.MS_GEOS_WITHINMS_GEOS_CONTAINS=_mapscript.MS_GEOS_CONTAINSMS_GEOS_BEYOND=_mapscript.MS_GEOS_BEYONDMS_GEOS_DWITHIN=_mapscript.MS_GEOS_DWITHINMS_TRANSFORM_NONE=_mapscript.MS_TRANSFORM_NONEMS_TRANSFORM_ROUND=_mapscript.MS_TRANSFORM_ROUNDMS_TRANSFORM_SNAPTOGRID=_mapscript.MS_TRANSFORM_SNAPTOGRIDMS_TRANSFORM_FULLRESOLUTION=_mapscript.MS_TRANSFORM_FULLRESOLUTIONMS_TRANSFORM_SIMPLIFY=_mapscript.MS_TRANSFORM_SIMPLIFYMS_COMPOP_CLEAR=_mapscript.MS_COMPOP_CLEARMS_COMPOP_SRC=_mapscript.MS_COMPOP_SRCMS_COMPOP_DST=_mapscript.MS_COMPOP_DSTMS_COMPOP_SRC_OVER=_mapscript.MS_COMPOP_SRC_OVERMS_COMPOP_DST_OVER=_mapscript.MS_COMPOP_DST_OVERMS_COMPOP_SRC_IN=_mapscript.MS_COMPOP_SRC_INMS_COMPOP_DST_IN=_mapscript.MS_COMPOP_DST_INMS_COMPOP_SRC_OUT=_mapscript.MS_COMPOP_SRC_OUTMS_COMPOP_DST_OUT=_mapscript.MS_COMPOP_DST_OUTMS_COMPOP_SRC_ATOP=_mapscript.MS_COMPOP_SRC_ATOPMS_COMPOP_DST_ATOP=_mapscript.MS_COMPOP_DST_ATOPMS_COMPOP_XOR=_mapscript.MS_COMPOP_XORMS_COMPOP_PLUS=_mapscript.MS_COMPOP_PLUSMS_COMPOP_MINUS=_mapscript.MS_COMPOP_MINUSMS_COMPOP_MULTIPLY=_mapscript.MS_COMPOP_MULTIPLYMS_COMPOP_SCREEN=_mapscript.MS_COMPOP_SCREENMS_COMPOP_OVERLAY=_mapscript.MS_COMPOP_OVERLAYMS_COMPOP_DARKEN=_mapscript.MS_COMPOP_DARKENMS_COMPOP_LIGHTEN=_mapscript.MS_COMPOP_LIGHTENMS_COMPOP_COLOR_DODGE=_mapscript.MS_COMPOP_COLOR_DODGEMS_COMPOP_COLOR_BURN=_mapscript.MS_COMPOP_COLOR_BURNMS_COMPOP_HARD_LIGHT=_mapscript.MS_COMPOP_HARD_LIGHTMS_COMPOP_SOFT_LIGHT=_mapscript.MS_COMPOP_SOFT_LIGHTMS_COMPOP_DIFFERENCE=_mapscript.MS_COMPOP_DIFFERENCEMS_COMPOP_EXCLUSION=_mapscript.MS_COMPOP_EXCLUSIONMS_COMPOP_CONTRAST=_mapscript.MS_COMPOP_CONTRASTMS_COMPOP_INVERT=_mapscript.MS_COMPOP_INVERTMS_COMPOP_INVERT_RGB=_mapscript.MS_COMPOP_INVERT_RGBclassCompositingFilter(object):thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprfilter:"char *"=property(_mapscript.CompositingFilter_filter_get,_mapscript.CompositingFilter_filter_set)next:"struct _CompositingFilter *"=property(_mapscript.CompositingFilter_next_get,_mapscript.CompositingFilter_next_set)def__init__(self):_mapscript.CompositingFilter_swiginit(self,_mapscript.new_CompositingFilter())__swig_destroy__=_mapscript.delete_CompositingFilter# Register CompositingFilter in _mapscript:_mapscript.CompositingFilter_swigregister(CompositingFilter)classLayerCompositer(object):thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprcomp_op:"CompositingOperation"=property(_mapscript.LayerCompositer_comp_op_get,_mapscript.LayerCompositer_comp_op_set)opacity:"int"=property(_mapscript.LayerCompositer_opacity_get,_mapscript.LayerCompositer_opacity_set)filter:"CompositingFilter *"=property(_mapscript.LayerCompositer_filter_get,_mapscript.LayerCompositer_filter_set)next:"struct _LayerCompositer *"=property(_mapscript.LayerCompositer_next_get,_mapscript.LayerCompositer_next_set)def__init__(self):_mapscript.LayerCompositer_swiginit(self,_mapscript.new_LayerCompositer())__swig_destroy__=_mapscript.delete_LayerCompositer# Register LayerCompositer in _mapscript:_mapscript.LayerCompositer_swigregister(LayerCompositer)MS_STYLE_BINDING_LENGTH=_mapscript.MS_STYLE_BINDING_LENGTHMS_STYLE_BINDING_SIZE=_mapscript.MS_STYLE_BINDING_SIZEMS_STYLE_BINDING_WIDTH=_mapscript.MS_STYLE_BINDING_WIDTHMS_STYLE_BINDING_ANGLE=_mapscript.MS_STYLE_BINDING_ANGLEMS_STYLE_BINDING_COLOR=_mapscript.MS_STYLE_BINDING_COLORMS_STYLE_BINDING_OUTLINECOLOR=_mapscript.MS_STYLE_BINDING_OUTLINECOLORMS_STYLE_BINDING_SYMBOL=_mapscript.MS_STYLE_BINDING_SYMBOLMS_STYLE_BINDING_OUTLINEWIDTH=_mapscript.MS_STYLE_BINDING_OUTLINEWIDTHMS_STYLE_BINDING_OPACITY=_mapscript.MS_STYLE_BINDING_OPACITYMS_STYLE_BINDING_OFFSET_X=_mapscript.MS_STYLE_BINDING_OFFSET_XMS_STYLE_BINDING_OFFSET_Y=_mapscript.MS_STYLE_BINDING_OFFSET_YMS_STYLE_BINDING_POLAROFFSET_PIXEL=_mapscript.MS_STYLE_BINDING_POLAROFFSET_PIXELMS_STYLE_BINDING_POLAROFFSET_ANGLE=_mapscript.MS_STYLE_BINDING_POLAROFFSET_ANGLEMS_LABEL_BINDING_LENGTH=_mapscript.MS_LABEL_BINDING_LENGTHMS_LABEL_BINDING_SIZE=_mapscript.MS_LABEL_BINDING_SIZEMS_LABEL_BINDING_ANGLE=_mapscript.MS_LABEL_BINDING_ANGLEMS_LABEL_BINDING_COLOR=_mapscript.MS_LABEL_BINDING_COLORMS_LABEL_BINDING_OUTLINECOLOR=_mapscript.MS_LABEL_BINDING_OUTLINECOLORMS_LABEL_BINDING_FONT=_mapscript.MS_LABEL_BINDING_FONTMS_LABEL_BINDING_PRIORITY=_mapscript.MS_LABEL_BINDING_PRIORITYMS_LABEL_BINDING_POSITION=_mapscript.MS_LABEL_BINDING_POSITIONMS_LABEL_BINDING_SHADOWSIZEX=_mapscript.MS_LABEL_BINDING_SHADOWSIZEXMS_LABEL_BINDING_SHADOWSIZEY=_mapscript.MS_LABEL_BINDING_SHADOWSIZEYMS_LABEL_BINDING_OFFSET_X=_mapscript.MS_LABEL_BINDING_OFFSET_XMS_LABEL_BINDING_OFFSET_Y=_mapscript.MS_LABEL_BINDING_OFFSET_YMS_LABEL_BINDING_ALIGN=_mapscript.MS_LABEL_BINDING_ALIGNclassfontSetObj(object):r"""The :ref:`FONTSET <fontset>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprfilename:"char *"=property(_mapscript.fontSetObj_filename_get,doc=r""" The filename of the fonset""")numfonts:"int"=property(_mapscript.fontSetObj_numfonts_get,doc=r""" The number of fonts in the fontset""")fonts:"hashTableObj"=property(_mapscript.fontSetObj_fonts_get,doc=r""" Key, value pairs of font name and font file""")
__swig_destroy__=_mapscript.delete_fontSetObj# Register fontSetObj in _mapscript:_mapscript.fontSetObj_swigregister(fontSetObj)MS_TOKEN_LOGICAL_AND=_mapscript.MS_TOKEN_LOGICAL_ANDMS_TOKEN_LOGICAL_OR=_mapscript.MS_TOKEN_LOGICAL_ORMS_TOKEN_LOGICAL_NOT=_mapscript.MS_TOKEN_LOGICAL_NOTMS_TOKEN_LITERAL_NUMBER=_mapscript.MS_TOKEN_LITERAL_NUMBERMS_TOKEN_LITERAL_STRING=_mapscript.MS_TOKEN_LITERAL_STRINGMS_TOKEN_LITERAL_TIME=_mapscript.MS_TOKEN_LITERAL_TIMEMS_TOKEN_LITERAL_SHAPE=_mapscript.MS_TOKEN_LITERAL_SHAPEMS_TOKEN_LITERAL_BOOLEAN=_mapscript.MS_TOKEN_LITERAL_BOOLEANMS_TOKEN_COMPARISON_EQ=_mapscript.MS_TOKEN_COMPARISON_EQMS_TOKEN_COMPARISON_NE=_mapscript.MS_TOKEN_COMPARISON_NEMS_TOKEN_COMPARISON_GT=_mapscript.MS_TOKEN_COMPARISON_GTMS_TOKEN_COMPARISON_LT=_mapscript.MS_TOKEN_COMPARISON_LTMS_TOKEN_COMPARISON_LE=_mapscript.MS_TOKEN_COMPARISON_LEMS_TOKEN_COMPARISON_GE=_mapscript.MS_TOKEN_COMPARISON_GEMS_TOKEN_COMPARISON_IEQ=_mapscript.MS_TOKEN_COMPARISON_IEQMS_TOKEN_COMPARISON_RE=_mapscript.MS_TOKEN_COMPARISON_REMS_TOKEN_COMPARISON_IRE=_mapscript.MS_TOKEN_COMPARISON_IREMS_TOKEN_COMPARISON_IN=_mapscript.MS_TOKEN_COMPARISON_INMS_TOKEN_COMPARISON_LIKE=_mapscript.MS_TOKEN_COMPARISON_LIKEMS_TOKEN_COMPARISON_INTERSECTS=_mapscript.MS_TOKEN_COMPARISON_INTERSECTSMS_TOKEN_COMPARISON_DISJOINT=_mapscript.MS_TOKEN_COMPARISON_DISJOINTMS_TOKEN_COMPARISON_TOUCHES=_mapscript.MS_TOKEN_COMPARISON_TOUCHESMS_TOKEN_COMPARISON_OVERLAPS=_mapscript.MS_TOKEN_COMPARISON_OVERLAPSMS_TOKEN_COMPARISON_CROSSES=_mapscript.MS_TOKEN_COMPARISON_CROSSESMS_TOKEN_COMPARISON_WITHIN=_mapscript.MS_TOKEN_COMPARISON_WITHINMS_TOKEN_COMPARISON_CONTAINS=_mapscript.MS_TOKEN_COMPARISON_CONTAINSMS_TOKEN_COMPARISON_EQUALS=_mapscript.MS_TOKEN_COMPARISON_EQUALSMS_TOKEN_COMPARISON_BEYOND=_mapscript.MS_TOKEN_COMPARISON_BEYONDMS_TOKEN_COMPARISON_DWITHIN=_mapscript.MS_TOKEN_COMPARISON_DWITHINMS_TOKEN_FUNCTION_LENGTH=_mapscript.MS_TOKEN_FUNCTION_LENGTHMS_TOKEN_FUNCTION_TOSTRING=_mapscript.MS_TOKEN_FUNCTION_TOSTRINGMS_TOKEN_FUNCTION_COMMIFY=_mapscript.MS_TOKEN_FUNCTION_COMMIFYMS_TOKEN_FUNCTION_AREA=_mapscript.MS_TOKEN_FUNCTION_AREAMS_TOKEN_FUNCTION_ROUND=_mapscript.MS_TOKEN_FUNCTION_ROUNDMS_TOKEN_FUNCTION_FROMTEXT=_mapscript.MS_TOKEN_FUNCTION_FROMTEXTMS_TOKEN_FUNCTION_BUFFER=_mapscript.MS_TOKEN_FUNCTION_BUFFERMS_TOKEN_FUNCTION_DIFFERENCE=_mapscript.MS_TOKEN_FUNCTION_DIFFERENCEMS_TOKEN_FUNCTION_SIMPLIFY=_mapscript.MS_TOKEN_FUNCTION_SIMPLIFYMS_TOKEN_FUNCTION_SIMPLIFYPT=_mapscript.MS_TOKEN_FUNCTION_SIMPLIFYPTMS_TOKEN_FUNCTION_GENERALIZE=_mapscript.MS_TOKEN_FUNCTION_GENERALIZEMS_TOKEN_FUNCTION_SMOOTHSIA=_mapscript.MS_TOKEN_FUNCTION_SMOOTHSIAMS_TOKEN_FUNCTION_CENTERLINE=_mapscript.MS_TOKEN_FUNCTION_CENTERLINEMS_TOKEN_FUNCTION_DENSIFY=_mapscript.MS_TOKEN_FUNCTION_DENSIFYMS_TOKEN_FUNCTION_OUTER=_mapscript.MS_TOKEN_FUNCTION_OUTERMS_TOKEN_FUNCTION_INNER=_mapscript.MS_TOKEN_FUNCTION_INNERMS_TOKEN_FUNCTION_JAVASCRIPT=_mapscript.MS_TOKEN_FUNCTION_JAVASCRIPTMS_TOKEN_FUNCTION_UPPER=_mapscript.MS_TOKEN_FUNCTION_UPPERMS_TOKEN_FUNCTION_LOWER=_mapscript.MS_TOKEN_FUNCTION_LOWERMS_TOKEN_FUNCTION_INITCAP=_mapscript.MS_TOKEN_FUNCTION_INITCAPMS_TOKEN_FUNCTION_FIRSTCAP=_mapscript.MS_TOKEN_FUNCTION_FIRSTCAPMS_TOKEN_BINDING_DOUBLE=_mapscript.MS_TOKEN_BINDING_DOUBLEMS_TOKEN_BINDING_INTEGER=_mapscript.MS_TOKEN_BINDING_INTEGERMS_TOKEN_BINDING_STRING=_mapscript.MS_TOKEN_BINDING_STRINGMS_TOKEN_BINDING_TIME=_mapscript.MS_TOKEN_BINDING_TIMEMS_TOKEN_BINDING_SHAPE=_mapscript.MS_TOKEN_BINDING_SHAPEMS_TOKEN_BINDING_MAP_CELLSIZE=_mapscript.MS_TOKEN_BINDING_MAP_CELLSIZEMS_TOKEN_BINDING_DATA_CELLSIZE=_mapscript.MS_TOKEN_BINDING_DATA_CELLSIZEMS_PARSE_TYPE_BOOLEAN=_mapscript.MS_PARSE_TYPE_BOOLEANMS_PARSE_TYPE_STRING=_mapscript.MS_PARSE_TYPE_STRINGMS_PARSE_TYPE_SHAPE=_mapscript.MS_PARSE_TYPE_SHAPEMS_PARSE_TYPE_SLD=_mapscript.MS_PARSE_TYPE_SLDclassclusterObj(object):r"""The :ref:`CLUSTER <cluster>` object. See :ref:`RFC 69 <rfc69>`."""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprmaxdistance:"double"=property(_mapscript.clusterObj_maxdistance_get,_mapscript.clusterObj_maxdistance_set,doc=r""" Maximum distance between clusters - see :ref:`MAXDISTANCE <mapfile-cluster-maxdistance>` """)buffer:"double"=property(_mapscript.clusterObj_buffer_get,_mapscript.clusterObj_buffer_set,doc=r""" The buffer size around the selection area - see :ref:`BUFFER <mapfile-cluster-buffer>` """)region:"char *"=property(_mapscript.clusterObj_region_get,_mapscript.clusterObj_region_set,doc=r""" The type of the cluster region (rectangle or ellipse) - see :ref:`REGION <mapfile-cluster-region>` """)
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a cluster from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.clusterObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the :ref:`cluster` as a Mapfile string"""return_mapscript.clusterObj_convertToString(self)
[المستندات]defsetGroup(self,group:"char *")->"int":r""" Set :ref:`GROUP <mapfile-cluster-group>` string where `group` is a MapServer text expression. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.clusterObj_setGroup(self,group)
[المستندات]defgetGroupString(self)->"char *":r""" Return a string representation of :ref:`GROUP <mapfile-cluster-group>`"""return_mapscript.clusterObj_getGroupString(self)
[المستندات]defsetFilter(self,filter:"char *")->"int":r""" Set :ref:`FILTER <mapfile-cluster-filter>` string where `filter` is a MapServer text expression. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.clusterObj_setFilter(self,filter)
__swig_destroy__=_mapscript.delete_clusterObj# Register clusterObj in _mapscript:_mapscript.clusterObj_swigregister(clusterObj)classoutputFormatObj(object):r"""The :ref:`OUTPUTFORMAT <outputformat>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumformatoptions:"int"=property(_mapscript.outputFormatObj_numformatoptions_get,doc=r""" The number of option values set on this format - can be used to iterate over the options array in conjunction with :func:`outputFormatObj.getOptionAt` """)name:"char *"=property(_mapscript.outputFormatObj_name_get,_mapscript.outputFormatObj_name_set,doc=r""" See :ref:`NAME <mapfile-outputformat-name>`""")mimetype:"char *"=property(_mapscript.outputFormatObj_mimetype_get,_mapscript.outputFormatObj_mimetype_set,doc=r""" See :ref:`MIMETYPE <mapfile-outputformat-mimetype>`""")driver:"char *"=property(_mapscript.outputFormatObj_driver_get,_mapscript.outputFormatObj_driver_set,doc=r""" See :ref:`DRIVER <mapfile-outputformat-driver>`""")extension:"char *"=property(_mapscript.outputFormatObj_extension_get,_mapscript.outputFormatObj_extension_set,doc=r""" See :ref:`EXTENSION <mapfile-outputformat-extension>`""")renderer:"int"=property(_mapscript.outputFormatObj_renderer_get,_mapscript.outputFormatObj_renderer_set,doc=r""" A :ref:`render mode constant<mapfile-constants-render>` - normally set internally based on the driver and some other setting in the constructor. """)imagemode:"int"=property(_mapscript.outputFormatObj_imagemode_get,_mapscript.outputFormatObj_imagemode_set,doc=r""" An :ref:`Image mode constant<mapfile-constants-imagemode>` - see :ref:`IMAGEMODE <mapfile-outputformat-imagemode>` """)transparent:"int"=property(_mapscript.outputFormatObj_transparent_get,_mapscript.outputFormatObj_transparent_set,doc=r""" See :ref:`TRANSPARENT <mapfile-outputformat-transparent>` """)bands:"int"=property(_mapscript.outputFormatObj_bands_get,_mapscript.outputFormatObj_bands_set,doc=r""" The number of bands in the raster, normally set via the BAND_COUNT formatoption - this field should be considered read-only Only used for the "raw" modes, MS_IMAGEMODE_BYTE, MS_IMAGEMODE_INT16, and MS_IMAGEMODE_FLOAT32 """)inmapfile:"int"=property(_mapscript.outputFormatObj_inmapfile_get,_mapscript.outputFormatObj_inmapfile_set,doc=r""" Boolean value indicating if the format is in the Mapfile""")
[المستندات]def__init__(self,driver:"char const *",name:"char *"=None):r""" Create new instance. If name is not provided, the value of driver is used as a name."""_mapscript.outputFormatObj_swiginit(self,_mapscript.new_outputFormatObj(driver,name))
[المستندات]defsetExtension(self,extension:"char const *")->"void":r""" Set file extension for output format such as 'png' or 'jpg'. Method could probably be deprecated since the extension attribute is mutable. Not in Java extension. """return_mapscript.outputFormatObj_setExtension(self,extension)
[المستندات]defsetMimetype(self,mimetype:"char const *")->"void":r""" Set mimetype for output format such as ``image/png`` or ``image/jpeg``. Method could probably be deprecated since the mimetype attribute is mutable. Not in Java extension """return_mapscript.outputFormatObj_setMimetype(self,mimetype)
[المستندات]defsetOption(self,key:"char const *",value:"char const *")->"void":r""" Set the format option at ``key`` to ``value``. Format options are mostly driver specific."""return_mapscript.outputFormatObj_setOption(self,key,value)
[المستندات]defvalidate(self)->"int":r""" Checks some internal consistency issues, and returns :data:`MS_TRUE` if things are OK and :data:`MS_FALSE` if there are problems. Some problems are fixed up internally. May produce debug output if issues encountered. """return_mapscript.outputFormatObj_validate(self)
[المستندات]defgetOption(self,*args)->"char *":r""" Return the format option at ``key`` or ``defaultvalue`` if key is not a valid hash index. """return_mapscript.outputFormatObj_getOption(self,*args)
[المستندات]defgetOptionAt(self,i:"int")->"char *":r""" Returns the option at ``idx`` or NULL if the index is beyond the array bounds. The option is returned as the original KEY=VALUE string. The number of available options can be obtained via :attr:`outputFormatObj.numformatoptions` """return_mapscript.outputFormatObj_getOptionAt(self,i)
[المستندات]defattachDevice(self,device:"void *")->"void":r""" Set the device property of the output format"""return_mapscript.outputFormatObj_attachDevice(self,device)
# Register outputFormatObj in _mapscript:_mapscript.outputFormatObj_swigregister(outputFormatObj)MS_NOOVERRIDE=_mapscript.MS_NOOVERRIDEclassqueryMapObj(object):r""" The :ref:`QUERYMAP <querymap>` object. Instances of querymapObj are always are always embedded inside the :class:`mapObj`. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprmap:"struct mapObj *"=property(_mapscript.queryMapObj_map_get,doc=r""" Reference to parent :class:`mapObj`""")height:"int"=property(_mapscript.queryMapObj_height_get,_mapscript.queryMapObj_height_set,doc=r""" See :ref:`SIZE <mapfile-querymap-size>`""")width:"int"=property(_mapscript.queryMapObj_width_get,_mapscript.queryMapObj_width_set,doc=r""" See :ref:`SIZE <mapfile-querymap-size>`""")status:"int"=property(_mapscript.queryMapObj_status_get,_mapscript.queryMapObj_status_set,doc=r""" See :ref:`STATUS <mapfile-querymap-status>`""")style:"int"=property(_mapscript.queryMapObj_style_get,_mapscript.queryMapObj_style_set,doc=r""" ``HILITE``, ``SELECTED`` or ``NORMAL`` - see :ref:`STYLE <mapfile-querymap-style>` """)color:"colorObj"=property(_mapscript.queryMapObj_color_get,_mapscript.queryMapObj_color_set,doc=r""" See :ref:`COLOR <mapfile-querymap-color>`""")
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a querymap from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.queryMapObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Saves the object to a string. Provides the inverse option for :func:`queryMapObj.updateFromString`."""return_mapscript.queryMapObj_convertToString(self)
__swig_destroy__=_mapscript.delete_queryMapObj# Register queryMapObj in _mapscript:_mapscript.queryMapObj_swigregister(queryMapObj)classwebObj(object):r""" The :ref:`WEB <web>` object. Has no other existence than as an attribute of a :class:`mapObj`. Serves as a container for various run-time web application definitions like temporary file paths, template paths, etc. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprmetadata:"hashTableObj"=property(_mapscript.webObj_metadata_get,doc=r""" Metadata hash table - see :ref:`METADATA <mapfile-web-metadata>` """)validation:"hashTableObj"=property(_mapscript.webObj_validation_get,doc=r""" See :ref:`VALIDATION <mapfile-web-validation>`""")map:"struct mapObj *"=property(_mapscript.webObj_map_get,doc=r""" Reference to parent :class:`mapObj`""")imagepath:"char *"=property(_mapscript.webObj_imagepath_get,_mapscript.webObj_imagepath_set,doc=r""" Filesystem path to temporary image location - see :ref:`IMAGEPATH <mapfile-web-imagepath>` """)imageurl:"char *"=property(_mapscript.webObj_imageurl_get,_mapscript.webObj_imageurl_set,doc=r""" URL to temporary image location - see :ref:`IMAGEURL <mapfile-web-imageurl>` """)temppath:"char *"=property(_mapscript.webObj_temppath_get,_mapscript.webObj_temppath_set,doc=r""" See :ref:`TEMPPATH <mapfile-web-temppath>`""")header:"char *"=property(_mapscript.webObj_header_get,_mapscript.webObj_header_set,doc=r""" Path to header document - see :ref:`HEADER <mapfile-web-header>` """)footer:"char *"=property(_mapscript.webObj_footer_get,_mapscript.webObj_footer_set,doc=r""" Path to footer document - see :ref:`FOOTER <mapfile-web-footer>` """)empty:"char *"=property(_mapscript.webObj_empty_get,_mapscript.webObj_empty_set,doc=r""" See :ref:`EMPTY <mapfile-web-empty>`""")error:"char *"=property(_mapscript.webObj_error_get,_mapscript.webObj_error_set,doc=r""" Error handling - see :ref:`ERROR <mapfile-web-error>`""")minscaledenom:"double"=property(_mapscript.webObj_minscaledenom_get,_mapscript.webObj_minscaledenom_set,doc=r""" Maximum map scale - see :ref:`MINSCALEDENOM <mapfile-web-minscaledenom>` """)maxscaledenom:"double"=property(_mapscript.webObj_maxscaledenom_get,_mapscript.webObj_maxscaledenom_set,doc=r""" Minimum map scale - see :ref:`MAXSCALEDENOM <mapfile-web-maxscaledenom>` """)mintemplate:"char *"=property(_mapscript.webObj_mintemplate_get,_mapscript.webObj_mintemplate_set,doc=r""" See :ref:`MINTEMPLATE <mapfile-web-mintemplate>`""")maxtemplate:"char *"=property(_mapscript.webObj_maxtemplate_get,_mapscript.webObj_maxtemplate_set,doc=r""" See :ref:`MAXTEMPLATE <mapfile-web-maxtemplate>`""")queryformat:"char *"=property(_mapscript.webObj_queryformat_get,_mapscript.webObj_queryformat_set,doc=r""" See :ref:`QUERYFORMAT <mapfile-web-queryformat>` /* what format is the query to be returned, given as a MIME type """)legendformat:"char *"=property(_mapscript.webObj_legendformat_get,_mapscript.webObj_legendformat_set,doc=r""" See :ref:`LEGENDFORMAT <mapfile-web-legendformat>`""")browseformat:"char *"=property(_mapscript.webObj_browseformat_get,_mapscript.webObj_browseformat_set,doc=r""" See :ref:`BROWSEFORMAT <mapfile-web-browseformat>`""")template:"char *"=property(_mapscript.webObj_template_get,_mapscript.webObj_template_set,doc=r""" Path to template document - see :ref:`TEMPLATE <mapfile-web-template>` """)
[المستندات]def__init__(self):r""" Instances of :class:`webObj` are always are always embedded inside the :class:`mapObj`. Has no other existence than as an attribute of a :class:`mapObj`. Serves as a container for various run-time web application definitions like temporary file paths, template paths, etc. """_mapscript.webObj_swiginit(self,_mapscript.new_webObj())
__swig_destroy__=_mapscript.delete_webObj
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a :class:`webObj` from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.webObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the :ref:`web` object as a Mapfile string. Provides the inverse option for :func:`webObj.updateFromString`."""return_mapscript.webObj_convertToString(self)
# Register webObj in _mapscript:_mapscript.webObj_swigregister(webObj)classstyleObj(object):r""" The :ref:`STYLE <style>` object. An instance of styleObj is associated with one instance of :class:`classObj`. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprrefcount:"int"=property(_mapscript.styleObj_refcount_get,doc=r""" number of references to this object""")symbolname:"char *"=property(_mapscript.styleObj_symbolname_get,doc=r""" Name of the style's symbol - see :ref:`symbolname <mapfile-style-symbol>` """)patternlength:"int"=property(_mapscript.styleObj_patternlength_get,doc=r""" Number of elements in the pattern attribute""")angle:"double"=property(_mapscript.styleObj_angle_get,_mapscript.styleObj_angle_set,doc=r""" Angle, given in degrees, to draw the line work, default is 0, for symbols of Type HATCH, this is the angle of the hatched lines - see :ref:`ANGLE <mapfile-style-angle>` """)autoangle:"int"=property(_mapscript.styleObj_autoangle_get,_mapscript.styleObj_autoangle_set,doc=r""" If the angle is set to ``AUTO`` - see :ref:`ANGLE <mapfile-style-angle>` """)antialiased:"int"=property(_mapscript.styleObj_antialiased_get,_mapscript.styleObj_antialiased_set,doc=r""" See :ref:`ANTIALIAS <mapfile-style-antialias>`""")color:"colorObj"=property(_mapscript.styleObj_color_get,_mapscript.styleObj_color_set,doc=r""" Foreground or fill pen color - see :ref:`COLOR <mapfile-style-color>` """)outlinecolor:"colorObj"=property(_mapscript.styleObj_outlinecolor_get,_mapscript.styleObj_outlinecolor_set,doc=r""" Outline pen color - see :ref:`OUTLINECOLOR <mapfile-style-outlinecolor>` """)opacity:"int"=property(_mapscript.styleObj_opacity_get,_mapscript.styleObj_opacity_set,doc=r""" See :ref:`OPACITY <mapfile-style-opacity>`""")mincolor:"colorObj"=property(_mapscript.styleObj_mincolor_get,_mapscript.styleObj_mincolor_set,doc=r""" Minimum color in the :ref:`COLORRANGE <mapfile-style-colorrange>` """)maxcolor:"colorObj"=property(_mapscript.styleObj_maxcolor_get,_mapscript.styleObj_maxcolor_set,doc=r""" Maximum color in the :ref:`COLORRANGE <mapfile-style-colorrange>` """)minvalue:"double"=property(_mapscript.styleObj_minvalue_get,_mapscript.styleObj_minvalue_set,doc=r""" related to color ranges""")maxvalue:"double"=property(_mapscript.styleObj_maxvalue_get,_mapscript.styleObj_maxvalue_set,doc=r""" related to color ranges""")rangeitem:"char *"=property(_mapscript.styleObj_rangeitem_get,_mapscript.styleObj_rangeitem_set,doc=r""" Attribute/field that stores the values for the Color Range Mapping - see :ref:`RANGEITEM <mapfile-style-rangeitem>` """)rangeitemindex:"int"=property(_mapscript.styleObj_rangeitemindex_get,_mapscript.styleObj_rangeitemindex_set,doc=r""" The index of the range item - see :ref:`RANGEITEM <mapfile-style-rangeitem>` """)symbol:"int"=property(_mapscript.styleObj_symbol_get,_mapscript.styleObj_symbol_set,doc=r""" The index within the map symbolset of the style's symbol - see :ref:`SYMBOL <mapfile-style-symbol>` """)size:"double"=property(_mapscript.styleObj_size_get,_mapscript.styleObj_size_set,doc=r""" Pixel width of the style's pen or symbol - see :ref:`SIZE <mapfile-style-size>` """)minsize:"double"=property(_mapscript.styleObj_minsize_get,_mapscript.styleObj_minsize_set,doc=r""" Minimum pen or symbol width for scaling styles - see :ref:`MINSIZE <mapfile-style-minsize>` """)maxsize:"double"=property(_mapscript.styleObj_maxsize_get,_mapscript.styleObj_maxsize_set,doc=r""" Maximum pen or symbol width for scaling - see :ref:`MAXSIZE <mapfile-style-maxsize>` """)gap:"double"=property(_mapscript.styleObj_gap_get,_mapscript.styleObj_gap_set,doc=r""" See :ref:`GAP <mapfile-style-gap>` - moved from symbolObj in version 6.0 """)initialgap:"double"=property(_mapscript.styleObj_initialgap_get,_mapscript.styleObj_initialgap_set,doc=r""" See :ref:`INITIALGAP <mapfile-style-initialgap>`""")linecap:"int"=property(_mapscript.styleObj_linecap_get,_mapscript.styleObj_linecap_set,doc=r""" See :ref:`LINECAP <mapfile-style-linecap>`""")linejoin:"int"=property(_mapscript.styleObj_linejoin_get,_mapscript.styleObj_linejoin_set,doc=r""" See :ref:`LINEJOIN <mapfile-style-linejoin>` - moved from symbolObj in version 6.0 """)linejoinmaxsize:"double"=property(_mapscript.styleObj_linejoinmaxsize_get,_mapscript.styleObj_linejoinmaxsize_set,doc=r""" See :ref:`LINEJOINMAXSIZE <mapfile-style-linejoinmaxsize>` - moved from symbolObj in version 6.0 """)width:"double"=property(_mapscript.styleObj_width_get,_mapscript.styleObj_width_set,doc=r""" Width refers to the thickness of line work drawn, in pixels - default is 1, for symbols of type ``HATCH``, the with is how thick the hatched lines are - see :ref:`WIDTH <mapfile-style-width>` """)outlinewidth:"double"=property(_mapscript.styleObj_outlinewidth_get,_mapscript.styleObj_outlinewidth_set,doc=r""" See :ref:`OUTLINEWIDTH <mapfile-style-outlinewidth>`""")minwidth:"double"=property(_mapscript.styleObj_minwidth_get,_mapscript.styleObj_minwidth_set,doc=r""" Minimum width of the symbol - see :ref:`MINWIDTH <mapfile-style-minwidth>` """)maxwidth:"double"=property(_mapscript.styleObj_maxwidth_get,_mapscript.styleObj_maxwidth_set,doc=r""" Maximum width of the symbol - see :ref:`MAXWIDTH <mapfile-style-maxwidth>` """)offsetx:"double"=property(_mapscript.styleObj_offsetx_get,_mapscript.styleObj_offsetx_set,doc=r""" Draw with pen or symbol offset from map data, for shadows, hollow symbols, etc - see :ref:`OFFSET <mapfile-style-offset>` """)offsety:"double"=property(_mapscript.styleObj_offsety_get,_mapscript.styleObj_offsety_set,doc=r""" Draw with pen or symbol offset from map data, for shadows, hollow symbols, etc - see :ref:`OFFSET <mapfile-style-offset>` """)polaroffsetpixel:"double"=property(_mapscript.styleObj_polaroffsetpixel_get,_mapscript.styleObj_polaroffsetpixel_set,doc=r""" Specifies the radius/distance - see :ref:`POLAROFFSET <mapfile-style-polaroffset>` """)polaroffsetangle:"double"=property(_mapscript.styleObj_polaroffsetangle_get,_mapscript.styleObj_polaroffsetangle_set,doc=r""" Specified the angle - see :ref:`POLAROFFSET <mapfile-style-polaroffset>` """)minscaledenom:"double"=property(_mapscript.styleObj_minscaledenom_get,_mapscript.styleObj_minscaledenom_set,doc=r""" See :ref:`MINSCALEDENOM <mapfile-style-minscaledenom>`""")maxscaledenom:"double"=property(_mapscript.styleObj_maxscaledenom_get,_mapscript.styleObj_maxscaledenom_set,doc=r""" See :ref:`MAXSCALEDENOM <mapfile-style-maxscaledenom>`""")sizeunits:"int"=property(_mapscript.styleObj_sizeunits_get,_mapscript.styleObj_sizeunits_set,doc=r""" Supersedes class's :ref:`SIZEUNITS <mapfile-layer-sizeunits>` to allow fine-grained sizing for improved SLD (RFC 124) """)
[المستندات]def__init__(self,parent_class:"classObj"=None):r""" Returns new default :class:`styleObj` instance. The ``parent_class`` is optional."""_mapscript.styleObj_swiginit(self,_mapscript.new_styleObj(parent_class))
__swig_destroy__=_mapscript.delete_styleObj
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a style from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.styleObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Saves the object to a string. Provides the inverse option for :func:`styleObj.updateFromString`"""return_mapscript.styleObj_convertToString(self)
[المستندات]defclone(self)->"styleObj *":r""" Return an independent copy of the style with no parent class. .. note:: In the Java & PHP modules this method is named ``cloneStyle``. """return_mapscript.styleObj_clone(self)
[المستندات]defsetSymbolByName(self,map:"mapObj",symbolname:"char *")->"int":r""" Setting the symbol of the :class:`styleObj` given the reference of the map object and the symbol name. """return_mapscript.styleObj_setSymbolByName(self,map,symbolname)
[المستندات]defremoveBinding(self,binding:"int")->"int":r""" Remove the attribute binding for a specified style property."""return_mapscript.styleObj_removeBinding(self,binding)
[المستندات]defsetBinding(self,binding:"int",item:"char const *")->"int":r""" Remove the attribute binding for a specified style property."""return_mapscript.styleObj_setBinding(self,binding,item)
[المستندات]defgetBinding(self,binding:"int")->"char const *":r""" Get the attribute binding for a specified style property. Returns NULL if there is no binding for this property. """return_mapscript.styleObj_getBinding(self,binding)
[المستندات]defgetGeomTransform(self)->"char *":r""" Get the :ref:`GEOMTRANSFORM <mapfile-style-geomtransform>` for the style."""return_mapscript.styleObj_getGeomTransform(self)
[المستندات]defsetGeomTransform(self,transform:"char *")->"void":r""" Set the :ref:`GEOMTRANSFORM <mapfile-style-geomtransform>` for the style."""return_mapscript.styleObj_setGeomTransform(self,transform)
[المستندات]defpattern_set(self,nListSize:"int")->"void":r"""Python Only** Set the pattern for the style."""return_mapscript.styleObj_pattern_set(self,nListSize)
[المستندات]defpattern_get(self)->"void":r"""Python Only** Get the pattern for the style."""return_mapscript.styleObj_pattern_get(self)
pattern=property(pattern_get,pattern_set,doc=r"""pattern : list **Python Only**""")# Register styleObj in _mapscript:_mapscript.styleObj_swigregister(styleObj)MS_STYLE_SINGLE_SIDED_OFFSET=_mapscript.MS_STYLE_SINGLE_SIDED_OFFSETMS_STYLE_DOUBLE_SIDED_OFFSET=_mapscript.MS_STYLE_DOUBLE_SIDED_OFFSETclasslabelLeaderObj(object):r"""The :ref:`LEADER <leader>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumstyles:"int"=property(_mapscript.labelLeaderObj_numstyles_get,doc=r""" Number of styles used""")maxdistance:"int"=property(_mapscript.labelLeaderObj_maxdistance_get,_mapscript.labelLeaderObj_maxdistance_set,doc=r""" See :ref:`MAXDISTANCE <mapfile-leader-maxdistance>`""")gridstep:"int"=property(_mapscript.labelLeaderObj_gridstep_get,_mapscript.labelLeaderObj_gridstep_set,doc=r""" See :ref:`GRIDSTEP <mapfile-leader-gridstep>`""")
__swig_destroy__=_mapscript.delete_labelLeaderObj# Register labelLeaderObj in _mapscript:_mapscript.labelLeaderObj_swigregister(labelLeaderObj)classlabelObj(object):r"""The :ref:`LABEL <label>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprrefcount:"int"=property(_mapscript.labelObj_refcount_get)font:"char *"=property(_mapscript.labelObj_font_get,_mapscript.labelObj_font_set,doc=r""" Name of TrueType font see :ref:`FONT <mapfile-label-font>`""")color:"colorObj"=property(_mapscript.labelObj_color_get,_mapscript.labelObj_color_set,doc=r""" Foreground color - see :ref:`COLOR <mapfile-label-color>`""")outlinecolor:"colorObj"=property(_mapscript.labelObj_outlinecolor_get,_mapscript.labelObj_outlinecolor_set,doc=r""" Color of one point outline - see :ref:`OUTLINECOLOR <mapfile-label-outlinecolor>` """)outlinewidth:"int"=property(_mapscript.labelObj_outlinewidth_get,_mapscript.labelObj_outlinewidth_set,doc=r""" See :ref:`OUTLINEWIDTH <mapfile-label-outlinewidth>`""")shadowcolor:"colorObj"=property(_mapscript.labelObj_shadowcolor_get,_mapscript.labelObj_shadowcolor_set,doc=r""" See :ref:`SHADOWCOLOR <mapfile-label-shadowcolor>`""")shadowsizex:"int"=property(_mapscript.labelObj_shadowsizex_get,_mapscript.labelObj_shadowsizex_set,doc=r""" See :ref:`SHADOWSIZE <mapfile-label-shadowsize>`""")shadowsizey:"int"=property(_mapscript.labelObj_shadowsizey_get,_mapscript.labelObj_shadowsizey_set,doc=r""" See :ref:`SHADOWSIZE <mapfile-label-shadowsize>`""")size:"int"=property(_mapscript.labelObj_size_get,_mapscript.labelObj_size_set,doc=r""" Annotation height in pixels - see :ref:`SIZE <mapfile-label-size>` """)minsize:"int"=property(_mapscript.labelObj_minsize_get,_mapscript.labelObj_minsize_set,doc=r""" Minimum height in pixels - see :ref:`MINSIZE <mapfile-label-minsize>` """)maxsize:"int"=property(_mapscript.labelObj_maxsize_get,_mapscript.labelObj_maxsize_set,doc=r""" Maximum height in pixels for scaled labels. See :ref:`MAXSIZE <mapfile-label-maxsize>` """)position:"int"=property(_mapscript.labelObj_position_get,_mapscript.labelObj_position_set,doc=r""" See :ref:`POSTION <mapfile-label-position>`""")offsetx:"int"=property(_mapscript.labelObj_offsetx_get,_mapscript.labelObj_offsetx_set,doc=r""" Horizontal offset of label - see :ref:`OFFSET <mapfile-label-offset>` """)offsety:"int"=property(_mapscript.labelObj_offsety_get,_mapscript.labelObj_offsety_set,doc=r""" Vertical offset of label - see :ref:`OFFSET <mapfile-label-offset>` """)angle:"double"=property(_mapscript.labelObj_angle_get,_mapscript.labelObj_angle_set,doc=r""" See :ref:`ANGLE <mapfile-label-angle>`""")anglemode:"enum MS_POSITIONS_ENUM"=property(_mapscript.labelObj_anglemode_get,_mapscript.labelObj_anglemode_set,doc=r""" One of :data:`AUTO` :data:`AUTO2`, or :data:`FOLLOW` - see :ref:`ANGLE <mapfile-label-angle>` """)buffer:"int"=property(_mapscript.labelObj_buffer_get,_mapscript.labelObj_buffer_set,doc=r""" Space to reserve around a label (padding) - see :ref:`BUFFER <mapfile-label-buffer>` """)align:"int"=property(_mapscript.labelObj_align_get,_mapscript.labelObj_align_set,doc=r""" See :ref:`ALIGN <mapfile-label-align>`""")wrap:"char"=property(_mapscript.labelObj_wrap_get,_mapscript.labelObj_wrap_set,doc=r""" See :ref:`WRAP <mapfile-label-wrap>`""")maxlength:"int"=property(_mapscript.labelObj_maxlength_get,_mapscript.labelObj_maxlength_set,doc=r""" See :ref:`MAXLENGTH <mapfile-label-maxlength>`""")space_size_10:"double"=property(_mapscript.labelObj_space_size_10_get,_mapscript.labelObj_space_size_10_set,doc=r""" Cached size of a single space character used for label text alignment of rfc40 """)minfeaturesize:"int"=property(_mapscript.labelObj_minfeaturesize_get,_mapscript.labelObj_minfeaturesize_set,doc=r""" Minimum feature size (in pixels) to label, features of this size or greater will be labeled - see :ref:`MINFEATURESIZE <mapfile-label-minfeaturesize>` """)autominfeaturesize:"int"=property(_mapscript.labelObj_autominfeaturesize_get,_mapscript.labelObj_autominfeaturesize_set,doc=r""" :data:`MS_TRUE` or :data:`MS_FALSE`""")minscaledenom:"double"=property(_mapscript.labelObj_minscaledenom_get,_mapscript.labelObj_minscaledenom_set,doc=r""" See :ref:`MINSCALEDENOM <mapfile-label-minscaledenom>`""")maxscaledenom:"double"=property(_mapscript.labelObj_maxscaledenom_get,_mapscript.labelObj_maxscaledenom_set,doc=r""" See :ref:`MAXSCALEDENOM <mapfile-label-maxscaledenom>`""")mindistance:"int"=property(_mapscript.labelObj_mindistance_get,_mapscript.labelObj_mindistance_set,doc=r""" Minimum distance in pixels between duplicate labels - see :ref:`MINDISTANCE <mapfile-label-mindistance>` """)repeatdistance:"int"=property(_mapscript.labelObj_repeatdistance_get,_mapscript.labelObj_repeatdistance_set,doc=r""" See :ref:`REPEATDISTANCE <mapfile-label-repeatdistance>` """)maxoverlapangle:"double"=property(_mapscript.labelObj_maxoverlapangle_get,_mapscript.labelObj_maxoverlapangle_set,doc=r""" See :ref:`MAXOVERLAPANGLE <mapfile-label-maxoverlapangle>` """)partials:"int"=property(_mapscript.labelObj_partials_get,_mapscript.labelObj_partials_set,doc=r""" Indicates if labels can run off the edge of an image, either :data:`MS_TRUE` or :data:`MS_FALSE` (default) - see :ref:`PARTIALS <mapfile-label-partials>` """)force:"int"=property(_mapscript.labelObj_force_get,_mapscript.labelObj_force_set,doc=r""" Indicates if labels **must** be drawn - see :ref:`FORCE <mapfile-label-force>` """)encoding:"char *"=property(_mapscript.labelObj_encoding_get,_mapscript.labelObj_encoding_set,doc=r""" Supported encoding format to be used for labels - see :ref:`ENCODING <mapfile-label-encoding>` """)priority:"int"=property(_mapscript.labelObj_priority_get,_mapscript.labelObj_priority_set,doc=r""" Priority level 1 to :data:`MS_MAX_LABEL_PRIORITY`, default=1 - see :ref:`PRIORITY <mapfile-label-priority>` """)numstyles:"int"=property(_mapscript.labelObj_numstyles_get,_mapscript.labelObj_numstyles_set,doc=r""" The number of styles associated with the label""")sizeunits:"int"=property(_mapscript.labelObj_sizeunits_get,_mapscript.labelObj_sizeunits_set,doc=r""" Supersedes class's sizeunits, defaults to :data:`MS_INHERIT`. """)
[المستندات]def__init__(self):r""" Create a new :class:`labelObj`. A :class:`labelObj` is associated with a :class:`classObj` a :class:`scalebarObj` or a :class:`legendObj`. An instance of :class:`labelObj` can exist outside of a :class:`classObj` container and be explicitly inserted into the :class:`classObj`: >>> new_label = new labelObj() >>> the_class.addLabel(new_label) """_mapscript.labelObj_swiginit(self,_mapscript.new_labelObj())
__swig_destroy__=_mapscript.delete_labelObj
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a :class:`labelObj` from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.labelObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the :class:`labelObj` object as a Mapfile string. Provides the inverse option for :func:`labelObj.updateFromString`."""return_mapscript.labelObj_convertToString(self)
[المستندات]defremoveBinding(self,binding:"int")->"int":r""" Remove the attribute binding for a specified label property."""return_mapscript.labelObj_removeBinding(self,binding)
[المستندات]defgetBinding(self,binding:"int")->"char const *":r""" Get the attribute binding for a specified label property. Returns NULL if there is no binding for this property."""return_mapscript.labelObj_getBinding(self,binding)
[المستندات]defsetBinding(self,binding:"int",item:"char const *")->"int":r""" Set the attribute binding for a specified label property. Binding constants look like this: ``MS_LABEL_BINDING_[attribute name]``: >>> new_label.setBinding(MS_LABEL_BINDING_COLOR, "FIELD_NAME_COLOR") """return_mapscript.labelObj_setBinding(self,binding,item)
[المستندات]defremoveExpressionBinding(self,binding:"int")->"int":r""" Remove an expression binding for a specified label property."""return_mapscript.labelObj_removeExpressionBinding(self,binding)
[المستندات]defsetExpressionBinding(self,binding:"int",text:"char const *")->"int":r""" Set the expression binding for a specified label property. Binding constants look like this: ``MS_LABEL_BINDING_[attribute name]`` Expressions are automatically wrapped in brackets, so do not need to be added to the input string >>> new_label.setExpressionBinding(MS_LABEL_BINDING_PRIORITY, "[priority] * 2") """return_mapscript.labelObj_setExpressionBinding(self,binding,text)
[المستندات]defsetExpression(self,expression:"char *")->"int":r""" Set the label expression property"""return_mapscript.labelObj_setExpression(self,expression)
[المستندات]defgetStyle(self,i:"int")->"styleObj *":r""" Return a reference to the :class:`styleObj` at index *i* in the styles array."""return_mapscript.labelObj_getStyle(self,i)
[المستندات]definsertStyle(self,style:"styleObj",index:"int"=-1)->"int":r""" Insert a copy of style into the styles array at index *index*. Default is -1, or the end of the array. Returns the index at which the style was inserted. """return_mapscript.labelObj_insertStyle(self,style,index)
[المستندات]defremoveStyle(self,index:"int")->"styleObj *":r""" Remove the styleObj at *index* from the styles array and return a copy."""return_mapscript.labelObj_removeStyle(self,index)
[المستندات]defmoveStyleUp(self,index:"int")->"int":r""" Swap the styleObj at *index* with the styleObj index - 1."""return_mapscript.labelObj_moveStyleUp(self,index)
[المستندات]defmoveStyleDown(self,index:"int")->"int":r""" Swap the styleObj at *index* with the styleObj index + 1."""return_mapscript.labelObj_moveStyleDown(self,index)
# Register labelObj in _mapscript:_mapscript.labelObj_swigregister(labelObj)MS_LABEL_PERPENDICULAR_OFFSET=_mapscript.MS_LABEL_PERPENDICULAR_OFFSETMS_LABEL_PERPENDICULAR_TOP_OFFSET=_mapscript.MS_LABEL_PERPENDICULAR_TOP_OFFSETclassclassObj(object):r""" The :ref:`CLASS <class>` object. Used for symbolization and classification information. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprmetadata:"hashTableObj"=property(_mapscript.classObj_metadata_get,doc=r""" see :ref:`METADATA <mapfile-class-metadata>`""")validation:"hashTableObj"=property(_mapscript.classObj_validation_get,doc=r""" see :ref:`VALIDATION <mapfile-class-validation>`""")numstyles:"int"=property(_mapscript.classObj_numstyles_get,doc=r""" number of styles for class""")numlabels:"int"=property(_mapscript.classObj_numlabels_get,doc=r""" number of labels for class""")refcount:"int"=property(_mapscript.classObj_refcount_get,doc=r""" number of references to this object""")layer:"struct layerObj *"=property(_mapscript.classObj_layer_get,doc=r""" reference to the parent layer""")leader:"labelLeaderObj *"=property(_mapscript.classObj_leader_get,doc=r""" see :ref:`LEADER <mapfile-class-leader>`""")status:"int"=property(_mapscript.classObj_status_get,_mapscript.classObj_status_set,doc=r""" :data:`MS_ON` or :data:`MS_OFF` - draw features of this class or do not - see :ref:`STATUS <mapfile-class-status>` """)isfallback:"int"=property(_mapscript.classObj_isfallback_get,_mapscript.classObj_isfallback_set,doc=r""" :data:`MS_TRUE` or :data:`MS_FALSE` use :data:`MS_TRUE` if this class should be applied if and only if no other class is applicable """)name:"char *"=property(_mapscript.classObj_name_get,_mapscript.classObj_name_set,doc=r""" See :ref:`NAME <mapfile-class-name>` should be unique within a layer """)title:"char *"=property(_mapscript.classObj_title_get,_mapscript.classObj_title_set,doc=r""" See :ref:`TITLE <mapfile-class-title>`""")minscaledenom:"double"=property(_mapscript.classObj_minscaledenom_get,_mapscript.classObj_minscaledenom_set,doc=r""" See :ref:`MINSCALEDENOM <mapfile-class-minscaledenom>`""")maxscaledenom:"double"=property(_mapscript.classObj_maxscaledenom_get,_mapscript.classObj_maxscaledenom_set,doc=r""" See :ref:`MAXSCALEDENOM <mapfile-CLASS-maxscaledenom>`""")minfeaturesize:"int"=property(_mapscript.classObj_minfeaturesize_get,_mapscript.classObj_minfeaturesize_set,doc=r""" See :ref:`MINFEATURESIZE <mapfile-class-minfeaturesize>` minimum feature size in pixels """)debug:"int"=property(_mapscript.classObj_debug_get,_mapscript.classObj_debug_set,doc=r""" :data:`MS_TRUE` or :data:`MS_FALSE` - see :ref:`DEBUG <mapfile-class-debug>` """)keyimage:"char *"=property(_mapscript.classObj_keyimage_get,_mapscript.classObj_keyimage_set,doc=r""" See :ref:`KEYIMAGE <mapfile-class-keyimage>`""")group:"char *"=property(_mapscript.classObj_group_get,_mapscript.classObj_group_set,doc=r""" See :ref:`GROUP <mapfile-class-group>`""")sizeunits:"int"=property(_mapscript.classObj_sizeunits_get,_mapscript.classObj_sizeunits_set,doc=r""" Supersedes layer's sizeunits and applies to all styles and labels - see :ref:`LAYER SIZEUNITS <mapfile-layer-sizeunits>` """)template:"char *"=property(_mapscript.classObj_template_get,_mapscript.classObj_template_set,doc=r""" See :ref:`TEMPLATE <mapfile-class-template>`""")
[المستندات]def__init__(self,layer:"layerObj"=None):r""" Create a new child classObj instance at the tail (highest index) of the class array of the parent_layer. A class can be created outside the context of a parent layer by omitting the layerObj constructor argument """_mapscript.classObj_swiginit(self,_mapscript.new_classObj(layer))self.p_layer=Noneiflayer:self.p_layer=layer
__swig_destroy__=_mapscript.delete_classObj
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a class from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.classObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the CLASS as a Mapfile string"""return_mapscript.classObj_convertToString(self)
[المستندات]defclone(self)->"classObj *":r""" Return an independent copy of the class without a parent layer .. note:: In the Java & PHP modules this method is named ``cloneClass``. """return_mapscript.classObj_clone(self)
[المستندات]defsetExpression(self,expression:"char *")->"int":r""" Set :ref:`EXPRESSION <mapfile-class-expression>` string where `expression` is a MapServer regular, logical or string expression. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.classObj_setExpression(self,expression)
[المستندات]defgetExpressionString(self)->"char *":r""" Return a string representation of the :ref:`EXPRESSION <mapfile-class-expression>` enclosed in the quote characters appropriate to the expression type """return_mapscript.classObj_getExpressionString(self)
[المستندات]defsetText(self,text:"char *")->"int":r""" Set :ref:`TEXT <mapfile-class-text>` string where `text` is a MapServer text expression. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.classObj_setText(self,text)
[المستندات]defgetTextString(self)->"char *":r""" Return a string representation of :ref:`TEXT <mapfile-class-text>`"""return_mapscript.classObj_getTextString(self)
[المستندات]defdrawLegendIcon(self,map:"mapObj",layer:"layerObj",width:"int",height:"int",dstImage:"imageObj",dstX:"int",dstY:"int")->"int":r""" Draw the legend icon onto *image* at *dstx*, *dsty*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.classObj_drawLegendIcon(self,map,layer,width,height,dstImage,dstX,dstY)
[المستندات]defcreateLegendIcon(self,map:"mapObj",layer:"layerObj",width:"int",height:"int")->"imageObj *":r""" Draw and return a new legend icon"""return_mapscript.classObj_createLegendIcon(self,map,layer,width,height)
[المستندات]defgetLabel(self,i:"int")->"labelObj *":r""" Return a reference to the :class:`labelObj` at *index* in the labels array"""return_mapscript.classObj_getLabel(self,i)
[المستندات]defaddLabel(self,label:"labelObj")->"int":r""" Add a :class:`labelObj` to the :class:`classObj` and return its index in the labels array"""return_mapscript.classObj_addLabel(self,label)
[المستندات]defremoveLabel(self,index:"int")->"labelObj *":r""" Remove the :class:`labelObj` at *index* from the labels array and return a reference to the :class:`labelObj`. numlabels is decremented, and the array is updated """return_mapscript.classObj_removeLabel(self,index)
[المستندات]defgetStyle(self,i:"int")->"styleObj *":r""" Return a reference to the :class:`styleObj` at *index* in the styles array"""return_mapscript.classObj_getStyle(self,i)
[المستندات]definsertStyle(self,style:"styleObj",index:"int"=-1)->"int":r""" Insert a **copy** of *style* into the styles array at index *index* Default is -1, or the end of the array. Returns the index at which the style was inserted. """return_mapscript.classObj_insertStyle(self,style,index)
[المستندات]defremoveStyle(self,index:"int")->"styleObj *":r""" Remove the :class:`styleObj` at *index* from the styles array and return a copy."""return_mapscript.classObj_removeStyle(self,index)
[المستندات]defmoveStyleUp(self,index:"int")->"int":r""" Swap the :class:`styleObj` at *index* with the styleObj at *index* - 1"""return_mapscript.classObj_moveStyleUp(self,index)
[المستندات]defmoveStyleDown(self,index:"int")->"int":r""" Swap the :class:`styleObj` at *index* with the :class:`styleObj` at *index* + 1"""return_mapscript.classObj_moveStyleDown(self,index)
# Register classObj in _mapscript:_mapscript.classObj_swigregister(classObj)classlabelCacheMemberObj(object):r""" An individual feature label. The labelCacheMemberObj class is associated with labelCacheObj. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumtextsymbols:"int"=property(_mapscript.labelCacheMemberObj_numtextsymbols_get,doc=r""" Number of text symbols found in textsymbols""")layerindex:"int"=property(_mapscript.labelCacheMemberObj_layerindex_get,doc=r""" The index of the layer of the labelled feature""")classindex:"int"=property(_mapscript.labelCacheMemberObj_classindex_get,doc=r""" Index of the class of the labelled feature""")status:"int"=property(_mapscript.labelCacheMemberObj_status_get,doc=r""" Has this label been drawn or not?""")markerid:"int"=property(_mapscript.labelCacheMemberObj_markerid_get,doc=r""" Corresponding marker (POINT layers only)""")point:"pointObj"=property(_mapscript.labelCacheMemberObj_point_get,doc=r""" Label point""")bbox:"rectObj"=property(_mapscript.labelCacheMemberObj_bbox_get,doc=r""" Bounds of the whole cachePtr. Individual text and symbol sub bounds are found in textsymbols """)leaderline:"lineObj *"=property(_mapscript.labelCacheMemberObj_leaderline_get,doc=r""" Leader lineObj""")leaderbbox:"rectObj *"=property(_mapscript.labelCacheMemberObj_leaderbbox_get,doc=r""" Leader rectObj""")
__swig_destroy__=_mapscript.delete_labelCacheMemberObj# Register labelCacheMemberObj in _mapscript:_mapscript.labelCacheMemberObj_swigregister(labelCacheMemberObj)classmarkerCacheMemberObj(object):r""" An individual marker. The markerCacheMemberObj class is associated with labelCacheObj. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprid:"int"=property(_mapscript.markerCacheMemberObj_id_get,doc=r""" Corresponding label""")bounds:"rectObj"=property(_mapscript.markerCacheMemberObj_bounds_get,doc=r""" Bounds of the markerCacheMemberObj""")
__swig_destroy__=_mapscript.delete_markerCacheMemberObj# Register markerCacheMemberObj in _mapscript:_mapscript.markerCacheMemberObj_swigregister(markerCacheMemberObj)classlabelCacheSlotObj(object):r"""A cache slot to hold labels grouped by priority"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumlabels:"int"=property(_mapscript.labelCacheSlotObj_numlabels_get,doc=r""" Number of label members""")cachesize:"int"=property(_mapscript.labelCacheSlotObj_cachesize_get,doc=r""" TODO""")nummarkers:"int"=property(_mapscript.labelCacheSlotObj_nummarkers_get,doc=r""" Number of marker members""")markercachesize:"int"=property(_mapscript.labelCacheSlotObj_markercachesize_get,doc=r""" TODO""")labels:"labelCacheMemberObj *"=property(_mapscript.labelCacheSlotObj_labels_get)markers:"markerCacheMemberObj *"=property(_mapscript.labelCacheSlotObj_markers_get)
__swig_destroy__=_mapscript.delete_labelCacheSlotObj# Register labelCacheSlotObj in _mapscript:_mapscript.labelCacheSlotObj_swigregister(labelCacheSlotObj)classlabelCacheObj(object):r""" Set of a map's cached labels. Has no other existence other than as a labelcache attribute of a mapObj. Associated with labelCacheMemberObj and markerCacheMemberObj. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnum_rendered_members:"int"=property(_mapscript.labelCacheObj_num_rendered_members_get,doc=r""" Number of rendered labels""")
[المستندات]deffreeCache(self)->"void":r""" Free the labelCache"""return_mapscript.labelCacheObj_freeCache(self)
__swig_destroy__=_mapscript.delete_labelCacheObj# Register labelCacheObj in _mapscript:_mapscript.labelCacheObj_swigregister(labelCacheObj)classresultObj(object):r"""The result object is a handle, of sorts, for a feature of the layer"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprshapeindex:"long"=property(_mapscript.resultObj_shapeindex_get,doc=r""" The shape index of the result""")tileindex:"int"=property(_mapscript.resultObj_tileindex_get,doc=r""" The tile index of the result""")resultindex:"int"=property(_mapscript.resultObj_resultindex_get,doc=r""" The index of the result""")classindex:"int"=property(_mapscript.resultObj_classindex_get,doc=r""" The class index of the result""")
[المستندات]def__init__(self,shapeindex:"long"):r""" The result object is a handle, of sorts, for a feature of the layer, having ``shapeindex`` and ``tileindex`` attributes that can be used as arguments to ``getFeature`` """_mapscript.resultObj_swiginit(self,_mapscript.new_resultObj(shapeindex))
__swig_destroy__=_mapscript.delete_resultObj# Register resultObj in _mapscript:_mapscript.resultObj_swigregister(resultObj)classresultCacheObj(object):r"""A cached result object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumresults:"int"=property(_mapscript.resultCacheObj_numresults_get,doc=r""" Length of result set""")bounds:"rectObj"=property(_mapscript.resultCacheObj_bounds_get,doc=r""" Bounding box of query results""")
[المستندات]defgetResult(self,i:"int")->"resultObj *":r""" Returns the result at index i, like :meth:`layerObj.getResult`, or ``NULL`` if index is outside the range of results. """return_mapscript.resultCacheObj_getResult(self,i)
__swig_destroy__=_mapscript.delete_resultCacheObj# Register resultCacheObj in _mapscript:_mapscript.resultCacheObj_swigregister(resultCacheObj)classsymbolSetObj(object):r""" A :class:`symbolSetObj` is an attribute of a :class:`mapObj` and is associated with instances of :class:`symbolObj`. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumsymbols:"int"=property(_mapscript.symbolSetObj_numsymbols_get,doc=r""" Number of symbols in the set""")maxsymbols:"int"=property(_mapscript.symbolSetObj_maxsymbols_get,doc=r""" Maximum number of allowed symbols""")filename:"char *"=property(_mapscript.symbolSetObj_filename_get,_mapscript.symbolSetObj_filename_set,doc=r""" Symbolset filename""")imagecachesize:"int"=property(_mapscript.symbolSetObj_imagecachesize_get,_mapscript.symbolSetObj_imagecachesize_set,doc=r""" Symbols in the cache""")
[المستندات]def__init__(self,symbolfile:"char const *"=None):r""" Create new :class:`symbolSetObj` instance. If symbolfile is specified, symbols will be loaded from the file. """_mapscript.symbolSetObj_swiginit(self,_mapscript.new_symbolSetObj(symbolfile))
__swig_destroy__=_mapscript.delete_symbolSetObj
[المستندات]defgetSymbol(self,i:"int")->"symbolObj *":r""" Returns a reference to the symbol at index."""return_mapscript.symbolSetObj_getSymbol(self,i)
[المستندات]defgetSymbolByName(self,symbolname:"char *")->"symbolObj *":r""" Returns a reference to the symbol named name."""return_mapscript.symbolSetObj_getSymbolByName(self,symbolname)
[المستندات]defindex(self,symbolname:"char *")->"int":r""" Return the index of the symbol named name or -1 in the case that no such symbol is found. """return_mapscript.symbolSetObj_index(self,symbolname)
[المستندات]defappendSymbol(self,symbol:"symbolObj")->"int":r""" Add a copy of symbol to the symbolset and return its index."""return_mapscript.symbolSetObj_appendSymbol(self,symbol)
[المستندات]defremoveSymbol(self,index:"int")->"symbolObj *":r""" Remove the symbol at index and return a copy of the symbol."""return_mapscript.symbolSetObj_removeSymbol(self,index)
[المستندات]defsave(self,filename:"char const *")->"int":r""" Save symbol set to a file. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.symbolSetObj_save(self,filename)
# Register symbolSetObj in _mapscript:_mapscript.symbolSetObj_swigregister(symbolSetObj)classreferenceMapObj(object):r"""The :ref:`REFERENCE <reference>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprmap:"struct mapObj *"=property(_mapscript.referenceMapObj_map_get,doc=r""" Reference to parent :class:`mapObj`""")extent:"rectObj"=property(_mapscript.referenceMapObj_extent_get,_mapscript.referenceMapObj_extent_set,doc=r""" Spatial extent of reference in units of parent map - see :ref:`EXTENT <mapfile-reference-extent>` """)height:"int"=property(_mapscript.referenceMapObj_height_get,_mapscript.referenceMapObj_height_set,doc=r""" Height of reference map in pixels - see :ref:`SIZE <mapfile-reference-size>` """)width:"int"=property(_mapscript.referenceMapObj_width_get,_mapscript.referenceMapObj_width_set,doc=r""" Width of reference map in pixels - see :ref:`SIZE <mapfile-reference-size>` """)color:"colorObj"=property(_mapscript.referenceMapObj_color_get,_mapscript.referenceMapObj_color_set,doc=r""" Color of reference box - see :ref:`COLOR <mapfile-reference-color>` """)outlinecolor:"colorObj"=property(_mapscript.referenceMapObj_outlinecolor_get,_mapscript.referenceMapObj_outlinecolor_set,doc=r""" Outline color of reference box - see :ref:`OUTLINECOLOR <mapfile-reference-outlinecolor>` """)image:"char *"=property(_mapscript.referenceMapObj_image_get,_mapscript.referenceMapObj_image_set,doc=r""" Filename of reference map image - see :ref:`IMAGE <mapfile-reference-image>` """)status:"int"=property(_mapscript.referenceMapObj_status_get,_mapscript.referenceMapObj_status_set,doc=r""" :data:`MS_ON` or :data:`MS_OFF` - see :ref:`STATUS <mapfile-reference-status>` """)marker:"int"=property(_mapscript.referenceMapObj_marker_get,_mapscript.referenceMapObj_marker_set,doc=r""" Index of a symbol in the map symbol set to use for marker - see :ref:`MARKER <mapfile-reference-marker>` """)markername:"char *"=property(_mapscript.referenceMapObj_markername_get,_mapscript.referenceMapObj_markername_set,doc=r""" Name of a symbol - see :ref:`MARKER <mapfile-reference-marker>` """)markersize:"int"=property(_mapscript.referenceMapObj_markersize_get,_mapscript.referenceMapObj_markersize_set,doc=r""" Size of marker - see :ref:`MARKERSIZE <mapfile-reference-markersize>` """)minboxsize:"int"=property(_mapscript.referenceMapObj_minboxsize_get,_mapscript.referenceMapObj_minboxsize_set,doc=r""" In pixels - see :ref:`MINBOXSIZE <mapfile-reference-minboxsize>` """)maxboxsize:"int"=property(_mapscript.referenceMapObj_maxboxsize_get,_mapscript.referenceMapObj_maxboxsize_set,doc=r""" In pixels - see :ref:`MAXBOXSIZE <mapfile-reference-maxboxsize>` """)
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a reference map from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.referenceMapObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Saves the object to a string. Provides the inverse option for :func:`referenceMapObj.updateFromString`."""return_mapscript.referenceMapObj_convertToString(self)
__swig_destroy__=_mapscript.delete_referenceMapObj# Register referenceMapObj in _mapscript:_mapscript.referenceMapObj_swigregister(referenceMapObj)MS_SCALEBAR_INTERVALS_MIN=_mapscript.MS_SCALEBAR_INTERVALS_MINMS_SCALEBAR_INTERVALS_MAX=_mapscript.MS_SCALEBAR_INTERVALS_MAXMS_SCALEBAR_WIDTH_MIN=_mapscript.MS_SCALEBAR_WIDTH_MINMS_SCALEBAR_WIDTH_MAX=_mapscript.MS_SCALEBAR_WIDTH_MAXMS_SCALEBAR_HEIGHT_MIN=_mapscript.MS_SCALEBAR_HEIGHT_MINMS_SCALEBAR_HEIGHT_MAX=_mapscript.MS_SCALEBAR_HEIGHT_MAXMS_SCALEBAR_OFFSET_MIN=_mapscript.MS_SCALEBAR_OFFSET_MINMS_SCALEBAR_OFFSET_MAX=_mapscript.MS_SCALEBAR_OFFSET_MAXclassscalebarObj(object):r"""The :ref:`SCALEBAR <scalebar>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprtransparent:"int"=property(_mapscript.scalebarObj_transparent_get,_mapscript.scalebarObj_transparent_set,doc=r""" Allows transparency for an embedded scalebar - see :ref:`TRANSPARENT <mapfile-scalebar-transparent>` """)imagecolor:"colorObj"=property(_mapscript.scalebarObj_imagecolor_get,_mapscript.scalebarObj_imagecolor_set,doc=r""" Background color of scalebar - see :ref:`IMAGECOLOR <mapfile-scalebar-imagecolor>` """)height:"int"=property(_mapscript.scalebarObj_height_get,_mapscript.scalebarObj_height_set,doc=r""" Height in pixels - see :ref:`SIZE <mapfile-scalebar-size>`""")width:"int"=property(_mapscript.scalebarObj_width_get,_mapscript.scalebarObj_width_set,doc=r""" Height in pixels - see :ref:`SIZE <mapfile-scalebar-size>`""")style:"int"=property(_mapscript.scalebarObj_style_get,_mapscript.scalebarObj_style_set,doc=r""" 0 or 1 - see :ref:`STYLE <mapfile-scalebar-style>`""")intervals:"int"=property(_mapscript.scalebarObj_intervals_get,_mapscript.scalebarObj_intervals_set,doc=r""" Number of intervals - see :ref:`INTERVALS <mapfile-scalebar-intervals>` """)label:"labelObj"=property(_mapscript.scalebarObj_label_get,_mapscript.scalebarObj_label_set,doc=r""" Scalebar label - see :ref:`LABEL <mapfile-scalebar-label>`""")color:"colorObj"=property(_mapscript.scalebarObj_color_get,_mapscript.scalebarObj_color_set,doc=r""" Scalebar foreground color - see :ref:`COLOR <mapfile-scalebar-color>` """)backgroundcolor:"colorObj"=property(_mapscript.scalebarObj_backgroundcolor_get,_mapscript.scalebarObj_backgroundcolor_set,doc=r""" Scalebar background color - see :ref:`BACKGROUNDCOLOR <mapfile-scalebar-backgroundcolor>` """)outlinecolor:"colorObj"=property(_mapscript.scalebarObj_outlinecolor_get,_mapscript.scalebarObj_outlinecolor_set,doc=r""" Foreground outline color - see :ref:`OUTLINECOLOR <mapfile-scalebar-outlinecolor>` """)units:"int"=property(_mapscript.scalebarObj_units_get,_mapscript.scalebarObj_units_set,doc=r""" See :ref:`UNITS <mapfile-scalebar-units>`""")status:"int"=property(_mapscript.scalebarObj_status_get,_mapscript.scalebarObj_status_set,doc=r""" ON, OFF or EMBED - see :ref:`STATUS <mapfile-scalebar-status>` - :data:`MS_ON`, :data:`MS_OFF`, or :data:`MS_EMBED`. """)position:"int"=property(_mapscript.scalebarObj_position_get,_mapscript.scalebarObj_position_set,doc=r""" For embeded scalebars - see :ref:`POSITION <mapfile-scalebar-position>` - :data:`MS_UL`, :data:`MS_UC`, :data:`MS_UR`, :data:`MS_LL`, :data:`MS_LC`, or :data:`MS_LR` """)postlabelcache:"int"=property(_mapscript.scalebarObj_postlabelcache_get,_mapscript.scalebarObj_postlabelcache_set,doc=r""" See :ref:`POSTLABELCACHE <mapfile-scalebar-postlabelcache>` - :data:`MS_TRUE` or :data:`MS_FALSE` """)align:"int"=property(_mapscript.scalebarObj_align_get,_mapscript.scalebarObj_align_set,doc=r""" See :ref:`ALIGN <mapfile-scalebar-align>`""")offsetx:"int"=property(_mapscript.scalebarObj_offsetx_get,_mapscript.scalebarObj_offsetx_set,doc=r""" See :ref:`OFFSET <mapfile-scalebar-offset>`""")offsety:"int"=property(_mapscript.scalebarObj_offsety_get,_mapscript.scalebarObj_offsety_set,doc=r""" See :ref:`OFFSET <mapfile-scalebar-offset>`""")
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a scalebar from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.scalebarObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Saves the object to a string. Provides the inverse option for updateFromString."""return_mapscript.scalebarObj_convertToString(self)
__swig_destroy__=_mapscript.delete_scalebarObj# Register scalebarObj in _mapscript:_mapscript.scalebarObj_swigregister(scalebarObj)MS_LEGEND_KEYSIZE_MIN=_mapscript.MS_LEGEND_KEYSIZE_MINMS_LEGEND_KEYSIZE_MAX=_mapscript.MS_LEGEND_KEYSIZE_MAXMS_LEGEND_KEYSPACING_MIN=_mapscript.MS_LEGEND_KEYSPACING_MINMS_LEGEND_KEYSPACING_MAX=_mapscript.MS_LEGEND_KEYSPACING_MAXclasslegendObj(object):r"""The :ref:`LEGEND <legend>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprlabel:"labelObj"=property(_mapscript.legendObj_label_get,doc=r""" See :ref:`LABEL <mapfile-legend-label>`""")map:"struct mapObj *"=property(_mapscript.legendObj_map_get,doc=r""" Instances of legendObj are always are always embedded inside the mapObj """)transparent:"int"=property(_mapscript.legendObj_transparent_get,_mapscript.legendObj_transparent_set,doc=r""" Allows transparency for an embedded legend - see :ref:`TRANSPARENT <mapfile-legend-transparent>` """)imagecolor:"colorObj"=property(_mapscript.legendObj_imagecolor_get,_mapscript.legendObj_imagecolor_set,doc=r""" Legend background color - see :ref:`IMAGECOLOR <mapfile-legend-imagecolor>` """)keysizex:"int"=property(_mapscript.legendObj_keysizex_get,_mapscript.legendObj_keysizex_set,doc=r""" Width in pixels of legend keys - see :ref:`KEYSIZE <mapfile-legend-keysize>` """)keysizey:"int"=property(_mapscript.legendObj_keysizey_get,_mapscript.legendObj_keysizey_set,doc=r""" Height in pixels of legend keys - see :ref:`KEYSIZE <mapfile-legend-keysize>` """)keyspacingx:"int"=property(_mapscript.legendObj_keyspacingx_get,_mapscript.legendObj_keyspacingx_set,doc=r""" Horizontal padding around keys in pixels - see :ref:`KEYSPACING <mapfile-legend-keyspacing>` """)keyspacingy:"int"=property(_mapscript.legendObj_keyspacingy_get,_mapscript.legendObj_keyspacingy_set,doc=r""" Vertical padding around keys in pixels - see :ref:`KEYSPACING <mapfile-legend-keyspacing>` """)outlinecolor:"colorObj"=property(_mapscript.legendObj_outlinecolor_get,_mapscript.legendObj_outlinecolor_set,doc=r""" Key outline color, -1 for no outline - see :ref:`OUTLINECOLOR <mapfile-legend-outlinecolor>` """)status:"int"=property(_mapscript.legendObj_status_get,_mapscript.legendObj_status_set,doc=r""" :data:`MS_ON`, :data:`MS_OFF` or :data:`MS_EMBED`- see :ref:`STATUS <mapfile-legend-status>` """)height:"int"=property(_mapscript.legendObj_height_get,_mapscript.legendObj_height_set,doc=r""" Legend height""")width:"int"=property(_mapscript.legendObj_width_get,_mapscript.legendObj_width_set,doc=r""" Legend width""")position:"int"=property(_mapscript.legendObj_position_get,_mapscript.legendObj_position_set,doc=r""" Used for embedded legends, see :ref:`POSITION <mapfile-legend-position>` """)postlabelcache:"int"=property(_mapscript.legendObj_postlabelcache_get,_mapscript.legendObj_postlabelcache_set,doc=r""" :data:`MS_TRUE`, :data:`MS_FALSE` - see :ref:`POSTLABELCACHE <mapfile-legend-postlabelcache>` """)template:"char *"=property(_mapscript.legendObj_template_get,_mapscript.legendObj_template_set,doc=r""" See :ref:`TEMPLATE <mapfile-legend-template>`""")
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a :class:`legendObj` from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.legendObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the :class:`legendObj` object as a Mapfile string. Provides the inverse option for :func:`legendObj.updateFromString`."""return_mapscript.legendObj_convertToString(self)
__swig_destroy__=_mapscript.delete_legendObj# Register legendObj in _mapscript:_mapscript.legendObj_swigregister(legendObj)classimageObj(object):r"""An image object is a wrapper for images generated by MapServer."""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprwidth:"int"=property(_mapscript.imageObj_width_get,doc=r""" image width in pixels""")height:"int"=property(_mapscript.imageObj_height_get,doc=r""" image height in pixels""")resolution:"double"=property(_mapscript.imageObj_resolution_get,doc=r""" image resolution in pixels per inch""")resolutionfactor:"double"=property(_mapscript.imageObj_resolutionfactor_get,doc=r""" resolution factor""")imagepath:"char *"=property(_mapscript.imageObj_imagepath_get,doc=r""" if image is drawn by :func:`mapObj.draw` this is :ref:`IMAGEPATH <mapfile-web-imagepath>` """)imageurl:"char *"=property(_mapscript.imageObj_imageurl_get,doc=r""" if image is drawn by :func:`mapObj.draw` this is :ref:`IMAGEURL <mapfile-web-imageurl>` """)format:"outputFormatObj *"=property(_mapscript.imageObj_format_get,doc=r""" an :class:`outputFormatObj` representing the output format of the image """)
[المستندات]def__init__(self,*args):r""" Create a new :class:`imageObj` instance. If *filename* is specified, an imageObj is created from the file and any specified *width*, *height*, and *format* parameters will be overridden by values of the image in *filename*. Otherwise, if *format* is specified (as an :class:`outputFormatObj`) an imageObj is created using that format. If *filename* is not specified, then *width* and *height* should be specified. The default resolution is currently 72 and defined by :data:`MS_DEFAULT_RESOLUTION` - this setting is not available in MapScript. """_mapscript.imageObj_swiginit(self,_mapscript.new_imageObj(*args))
__swig_destroy__=_mapscript.delete_imageObj
[المستندات]defsave(self,filename:"char *",map:"mapObj"=None)->"void":r""" Save image to filename. The optional map parameter must be specified if saving GeoTIFF images. """return_mapscript.imageObj_save(self,filename,map)
[المستندات]defgetBytes(self)->"gdBuffer":r""" Returns the image contents as a binary buffer. The exact form of this buffer will vary by MapScript language (e.g. a string in Python, byte[] array in Java and C#, unhandled in Perl) """return_mapscript.imageObj_getBytes(self)
[المستندات]defgetSize(self)->"int":r""" Returns the size of the binary buffer representing the image buffer .. note:: The getSize method is inefficient as it does a call to getBytes and then computes the size of the byte array. The byte array is then immediately discarded. In most cases it is more efficient to call getBytes directly. """return_mapscript.imageObj_getSize(self)
[المستندات]defpasteImage(self,imageSrc:"imageObj",opacity:"double"=1.0,dstx:"int"=0,dsty:"int"=0)->"int":r""" Pastes another imageObj on top of this imageObj. If optional dstx,dsty are provided then they define the position where the image should be copied (dstx,dsty = top-left corner position). """return_mapscript.imageObj_pasteImage(self,imageSrc,opacity,dstx,dsty)
[المستندات]defsaveWebImage(self)->"char *":r""" Writes the image to temp directory. Returns the image URL. """return_mapscript.imageObj_saveWebImage(self)
[المستندات]defwrite(self,*args)->"int":r""" Write image data to an open file handle. Replaces the removed saveToString function. See ``python/pyextend.i`` for the Python specific version of this method. """return_mapscript.imageObj_write(self,*args)
# Register imageObj in _mapscript:_mapscript.imageObj_swigregister(imageObj)classscaleTokenEntryObj(object):r""" An individual value within the :ref:`SCALETOKEN <mapfile-layer-scaletoken>` object """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprminscale:"double"=property(_mapscript.scaleTokenEntryObj_minscale_get,_mapscript.scaleTokenEntryObj_minscale_set,doc=r""" The minimum scale for the replacement""")maxscale:"double"=property(_mapscript.scaleTokenEntryObj_maxscale_get,_mapscript.scaleTokenEntryObj_maxscale_set,doc=r""" The maximum scale for the replacement""")value:"char *"=property(_mapscript.scaleTokenEntryObj_value_get,_mapscript.scaleTokenEntryObj_value_set,doc=r""" The token replacement value""")
__swig_destroy__=_mapscript.delete_scaleTokenEntryObj# Register scaleTokenEntryObj in _mapscript:_mapscript.scaleTokenEntryObj_swigregister(scaleTokenEntryObj)classscaleTokenObj(object):r"""The :ref:`SCALETOKEN <mapfile-layer-scaletoken>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprname:"char *"=property(_mapscript.scaleTokenObj_name_get,_mapscript.scaleTokenObj_name_set,doc=r""" The name of the token to replace in the :ref:`DATA <mapfile-layer-data>` statement """)n_entries:"int"=property(_mapscript.scaleTokenObj_n_entries_get,_mapscript.scaleTokenObj_n_entries_set,doc=r""" The number of values within the scaletoken""")tokens:"scaleTokenEntryObj *"=property(_mapscript.scaleTokenObj_tokens_get,_mapscript.scaleTokenObj_tokens_set,doc=r""" A reference to the values""")
__swig_destroy__=_mapscript.delete_scaleTokenObj# Register scaleTokenObj in _mapscript:_mapscript.scaleTokenObj_swigregister(scaleTokenObj)classlayerObj(object):r"""The :ref:`LAYER <layer>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprrefcount:"int"=property(_mapscript.layerObj_refcount_get,doc=r""" reference counting, RFC24""")numclasses:"int"=property(_mapscript.layerObj_numclasses_get,doc=r""" Number of layer classes""")maxclasses:"int"=property(_mapscript.layerObj_maxclasses_get,doc=r""" Used to track of the maximum number of classes - see RFC-17 """)index:"int"=property(_mapscript.layerObj_index_get,doc=r""" Index of layer within parent map's layers array""")map:"struct mapObj *"=property(_mapscript.layerObj_map_get,doc=r""" Reference to parent map""")numitems:"int"=property(_mapscript.layerObj_numitems_get,doc=r""" Number of layer feature attributes (items)""")metadata:"hashTableObj"=property(_mapscript.layerObj_metadata_get,doc=r""" See :ref:`METADATA <mapfile-layer-metadata>`""")validation:"hashTableObj"=property(_mapscript.layerObj_validation_get,doc=r""" See :ref:`VALIDATION <mapfile-layer-validation>`""")bindvals:"hashTableObj"=property(_mapscript.layerObj_bindvals_get,doc=r""" Relates to RFC59""")connectionoptions:"hashTableObj"=property(_mapscript.layerObj_connectionoptions_get,doc=r""" See :ref:`CONNECTIONOPTIONS <mapfile-layer-connectionoptions>` """)cluster:"clusterObj"=property(_mapscript.layerObj_cluster_get,doc=r""" See :ref:`CLUSTER <mapfile-layer-cluster>`""")extent:"rectObj"=property(_mapscript.layerObj_extent_get,doc=r""" optional limiting extent for layer features - see :ref:`EXTENT <mapfile-layer-extent>` """)numprocessing:"int"=property(_mapscript.layerObj_numprocessing_get,doc=r""" Number of raster processing directives""")numjoins:"int"=property(_mapscript.layerObj_numjoins_get,doc=r""" Number of layer joins""")utfdata:"expressionObj"=property(_mapscript.layerObj_utfdata_get,doc=r""" See :ref:`UTFDATA <mapfile-layer-utfdata>`""")compositer:"LayerCompositer *"=property(_mapscript.layerObj_compositer_get,doc=r""" See :ref:`COMPOSITE <mapfile-layer-composite>`""")classitem:"char *"=property(_mapscript.layerObj_classitem_get,_mapscript.layerObj_classitem_set,doc=r""" the attribute used to classify layer data - see :ref:`CLASSITEM <mapfile-layer-classitem>` """)header:"char *"=property(_mapscript.layerObj_header_get,_mapscript.layerObj_header_set,doc=r""" filename to a template for result's header - see :ref:`HEADER <mapfile-layer-header>` """)footer:"char *"=property(_mapscript.layerObj_footer_get,_mapscript.layerObj_footer_set,doc=r""" filename to a template for result's footer - see :ref:`FOOTER <mapfile-layer-footer>` """)template:"char *"=property(_mapscript.layerObj_template_get,_mapscript.layerObj_template_set,doc=r""" See :ref:`TEMPLATE <mapfile-layer-template>` - global template, used across all classes """)name:"char *"=property(_mapscript.layerObj_name_get,_mapscript.layerObj_name_set,doc=r""" See :ref:`NAME <mapfile-layer-name>` - should be unique""")group:"char *"=property(_mapscript.layerObj_group_get,_mapscript.layerObj_group_set,doc=r""" Name of a group of layers - see :ref:`GROUP <mapfile-layer-group>` """)status:"int"=property(_mapscript.layerObj_status_get,_mapscript.layerObj_status_set,doc=r""" See :ref:`STATUS <mapfile-layer-status>`:data:`MS_ON`, :data:`MS_OFF` or :data:`MS_DEFAULT` """)rendermode:"enum MS_RENDER_MODE"=property(_mapscript.layerObj_rendermode_get,_mapscript.layerObj_rendermode_set,doc=r""" :data:`MS_FIRST_MATCHING_CLASS` - default and historic MapServer behavior, :data:`MS_ALL_MATCHING_CLASSES` - SLD behavior """)data:"char *"=property(_mapscript.layerObj_data_get,_mapscript.layerObj_data_set,doc=r""" Layer data definition, values depend upon connectiontype - see :ref:`DATA <mapfile-layer-data>` """)type:"enum MS_LAYER_TYPE"=property(_mapscript.layerObj_type_get,_mapscript.layerObj_type_set,doc=r""" the layer type - see :ref:`TYPE <mapfile-layer-type>`""")connectiontype:"enum MS_CONNECTION_TYPE"=property(_mapscript.layerObj_connectiontype_get,_mapscript.layerObj_connectiontype_set,doc=r""" the layer connection type - see :ref:`CONNECTIONTYPE <mapfile-layer-connectiontype>` """)tolerance:"double"=property(_mapscript.layerObj_tolerance_get,_mapscript.layerObj_tolerance_set,doc=r""" search buffer for point and line queries (in toleranceunits) - see :ref:`TOLERANCE <mapfile-layer-tolerance>` """)toleranceunits:"int"=property(_mapscript.layerObj_toleranceunits_get,_mapscript.layerObj_toleranceunits_set,doc=r""" See :ref:`TOLERANCEUNITS <mapfile-layer-toleranceunits>` """)symbolscaledenom:"double"=property(_mapscript.layerObj_symbolscaledenom_get,_mapscript.layerObj_symbolscaledenom_set,doc=r""" scale at which symbols are default size - see :ref:`SYMBOLSCALEDENOM <mapfile-layer-symbolscaledenom>` """)minscaledenom:"double"=property(_mapscript.layerObj_minscaledenom_get,_mapscript.layerObj_minscaledenom_set,doc=r""" Maximum scale at which layer will be drawn - see :ref:`MINSCALEDENOM <mapfile-layer-minscaledenom>` """)maxscaledenom:"double"=property(_mapscript.layerObj_maxscaledenom_get,_mapscript.layerObj_maxscaledenom_set,doc=r""" Minimum scale at which layer will be drawn - see :ref:`MAXSCALEDENOM <mapfile-layer-maxscaledenom>` """)minfeaturesize:"int"=property(_mapscript.layerObj_minfeaturesize_get,_mapscript.layerObj_minfeaturesize_set,doc=r""" minimum feature size (in pixels) for shape""")labelminscaledenom:"double"=property(_mapscript.layerObj_labelminscaledenom_get,_mapscript.layerObj_labelminscaledenom_set,doc=r""" See :ref:`LABELMINSCALEDENOM <mapfile-layer-labelminscaledenom>` """)labelmaxscaledenom:"double"=property(_mapscript.layerObj_labelmaxscaledenom_get,_mapscript.layerObj_labelmaxscaledenom_set,doc=r""" See :ref:`LABELMAXSCALEDENOM <mapfile-layer-labelmaxscaledenom>` """)mingeowidth:"double"=property(_mapscript.layerObj_mingeowidth_get,_mapscript.layerObj_mingeowidth_set,doc=r""" min map width (in map units) at which the layer should be drawn - see :ref:`MAXGEOWIDTH <mapfile-layer-maxgeowidth>` """)maxgeowidth:"double"=property(_mapscript.layerObj_maxgeowidth_get,_mapscript.layerObj_maxgeowidth_set,doc=r""" max map width (in map units) at which the layer should be drawn - see :ref:`MAXGEOWIDTH <mapfile-layer-maxgeowidth>` """)sizeunits:"int"=property(_mapscript.layerObj_sizeunits_get,_mapscript.layerObj_sizeunits_set,doc=r""" applies to all classes - see :ref:`SIZEUNITS <mapfile-layer-sizeunits>` """)maxfeatures:"int"=property(_mapscript.layerObj_maxfeatures_get,_mapscript.layerObj_maxfeatures_set,doc=r""" Maximum number of layer features that will be drawn - see :ref:`MAXFEATURES <mapfile-layer-maxfeatures>` """)startindex:"int"=property(_mapscript.layerObj_startindex_get,_mapscript.layerObj_startindex_set,doc=r""" Feature start index - used for paging""")offsite:"colorObj"=property(_mapscript.layerObj_offsite_get,_mapscript.layerObj_offsite_set,doc=r""" transparent pixel value for raster images - see :ref:`OFFSITE <mapfile-layer-offsite>` """)transform:"int"=property(_mapscript.layerObj_transform_get,_mapscript.layerObj_transform_set,doc=r""" :data:`MS_TRUE` (default) or :data:`MS_FALSE` whether or not layer data is to be transformed to image units - see :ref:`TRANSFORM <mapfile-layer-transform>` """)labelcache:"int"=property(_mapscript.layerObj_labelcache_get,_mapscript.layerObj_labelcache_set,doc=r""" :data:`MS_ON` (default) or :data:`MS_OFF` - see :ref:`LABELCACHE <mapfile-layer-labelcache>` """)postlabelcache:"int"=property(_mapscript.layerObj_postlabelcache_get,_mapscript.layerObj_postlabelcache_set,doc=r""" :data:`MS_ON` or :data:`MS_OFF` (default) - see :ref:`POSTLABELCACHE <mapfile-layer-postlabelcache>` """)labelitem:"char *"=property(_mapscript.layerObj_labelitem_get,_mapscript.layerObj_labelitem_set,doc=r""" attribute defining feature label text - see :ref:`LABELITEM <mapfile-layer-labelitem>` """)tileitem:"char *"=property(_mapscript.layerObj_tileitem_get,_mapscript.layerObj_tileitem_set,doc=r""" attribute defining tile paths - see :ref:`TILEITEM <mapfile-layer-tileitem>` """)tileindex:"char *"=property(_mapscript.layerObj_tileindex_get,_mapscript.layerObj_tileindex_set,doc=r""" layer index file for tiling support - see :ref:`TILEINDEX <mapfile-layer-tileindex>` """)tilesrs:"char *"=property(_mapscript.layerObj_tilesrs_get,_mapscript.layerObj_tilesrs_set,doc=r""" name of the attribute that contains the SRS of an individual tile - see :ref:`TILESRS <mapfile-layer-tilesrs>` """)units:"int"=property(_mapscript.layerObj_units_get,_mapscript.layerObj_units_set,doc=r""" units of the layer - see :ref:`UNITS <mapfile-layer-units>`""")connection:"char *"=property(_mapscript.layerObj_connection_get,_mapscript.layerObj_connection_set,doc=r""" layer connection or data source name - see :ref:`CONNECTION <mapfile-layer-connection>` """)plugin_library:"char *"=property(_mapscript.layerObj_plugin_library_get,_mapscript.layerObj_plugin_library_set,doc=r""" Used to select the library to load by MapServer""")plugin_library_original:"char *"=property(_mapscript.layerObj_plugin_library_original_get,_mapscript.layerObj_plugin_library_original_set,doc=r""" this is needed for Mapfile writing""")bandsitem:"char *"=property(_mapscript.layerObj_bandsitem_get,_mapscript.layerObj_bandsitem_set,doc=r""" The attribute from the index file used to select the source raster band(s) to be used - normally NULL for default bands processing """)filteritem:"char *"=property(_mapscript.layerObj_filteritem_get,_mapscript.layerObj_filteritem_set,doc=r""" Attribute defining filter - see :ref:`FILTERITEM <mapfile-layer-filteritem>` """)styleitem:"char *"=property(_mapscript.layerObj_styleitem_get,_mapscript.layerObj_styleitem_set,doc=r""" item to be used for style lookup - can also be 'AUTO' - see :ref:`STYLEITEM <mapfile-layer-styleitem>` """)requires:"char *"=property(_mapscript.layerObj_requires_get,_mapscript.layerObj_requires_set,doc=r""" Context expressions, simple enough to not use expressionObj - see :ref:`REQUIRES <mapfile-layer-requires>` """)labelrequires:"char *"=property(_mapscript.layerObj_labelrequires_get,_mapscript.layerObj_labelrequires_set,doc=r""" Simple logical expression - see :ref:`LABELREQUIRES <mapfile-layer-labelrequires>` """)debug:"int"=property(_mapscript.layerObj_debug_get,_mapscript.layerObj_debug_set,doc=r""" Enable debugging of layer- :data:`MS_ON` or :data:`MS_OFF` (default) - see :ref:`DEBUG <mapfile-layer-debug>` """)classgroup:"char *"=property(_mapscript.layerObj_classgroup_get,_mapscript.layerObj_classgroup_set,doc=r""" See :ref:`CLASSGROUP <mapfile-layer-classgroup>`""")mask:"char *"=property(_mapscript.layerObj_mask_get,_mapscript.layerObj_mask_set,doc=r""" See :ref:`MASK <mapfile-layer-mask>`""")encoding:"char *"=property(_mapscript.layerObj_encoding_get,_mapscript.layerObj_encoding_set,doc=r""" For iconving shape attributes, ignored if NULL or "utf-8" - see :ref:`ENCODING <mapfile-layer-encoding>` """)utfitem:"char *"=property(_mapscript.layerObj_utfitem_get,_mapscript.layerObj_utfitem_set,doc=r""" See :ref:`UTFITEM <mapfile-layer-utfitem>`""")utfitemindex:"int"=property(_mapscript.layerObj_utfitemindex_get,_mapscript.layerObj_utfitemindex_set,doc=r""" See :ref:`CLASSITEM <mapfile-layer-classitem>`""")
[المستندات]def__init__(self,map:"mapObj"=None):r""" A :class:`layerObj` is associated with :class:`mapObj`. An instance of :class:`layerObj` can exist outside of a :class:`mapObj` """_mapscript.layerObj_swiginit(self,_mapscript.new_layerObj(map))self.p_map=Noneifmap:self.p_map=map
[المستندات]defsetOpacity(self,opacity:"int")->"void":r""" Sets an opacity for the layer, where the value is an integer in range [0, 100]. A new :ref:`composite` block is generated, containing this ``OPACITY`` value. """return_mapscript.layerObj_setOpacity(self,opacity)
[المستندات]defgetOpacity(self)->"int":r""" Returns the opacity value for the layer."""return_mapscript.layerObj_getOpacity(self)
__swig_destroy__=_mapscript.delete_layerObj
[المستندات]defclone(self)->"layerObj *":r""" Return an independent copy of the layer with no parent map. .. note:: In the Java & PHP modules this method is named ``cloneLayer``. """return_mapscript.layerObj_clone(self)
[المستندات]defupdateFromString(self,snippet:"char *")->"int":r""" Update a :class:`layerObj` from a string snippet. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.layerObj_updateFromString(self,snippet)
[المستندات]defconvertToString(self)->"char *":r""" Output the :class:`layerObj` object as a Mapfile string. Provides the inverse option for :func:`layerObj.updateFromString`."""return_mapscript.layerObj_convertToString(self)
[المستندات]definsertClass(*args):""" Insert a **copy** of the class into the layer at the requested *index*. Default index of -1 means insertion at the end of the array of classes. Returns the index at which the class was inserted. """actualIndex=_mapscript.layerObj_insertClass(*args)args[1].p_layer=args[0]returnactualIndex
[المستندات]defremoveClass(self,index:"int")->"classObj *":r""" Removes the class at *index* and returns a copy, or NULL in the case of a failure. Note that subsequent classes will be renumbered by this operation. The numclasses field contains the number of classes available. """return_mapscript.layerObj_removeClass(self,index)
[المستندات]defopen(self)->"int":r""" Opens the underlying layer. This is required before operations like :func:`layerObj.getResult` will work, but is not required before a draw or query call. """return_mapscript.layerObj_open(self)
[المستندات]defwhichShapes(self,rect:"rectObj")->"int":r""" Performs a spatial, and optionally an attribute based feature search. The function basically prepares things so that candidate features can be accessed by query or drawing functions (e.g using :func:`layerObj.nextShape` function). Returns :data:`MS_SUCCESS`, :data:`MS_FAILURE` or :data:`MS_DONE`. MS_DONE is returned if the layer extent does not overlap *rect*. """return_mapscript.layerObj_whichShapes(self,rect)
[المستندات]defnextShape(self)->"shapeObj *":r""" Called after :func:`layerObj.whichShapes` has been called to actually retrieve shapes within a given area returns a shape object or :data:`MS_FALSE` Example of usage: .. code-block:: mapObj map = new mapObj("d:/msapps/gmap-ms40/htdocs/gmap75.map"); layerObj layer = map.getLayerByName('road'); int status = layer.open(); status = layer.whichShapes(map.extent); shapeObj shape; while ((shape = layer.nextShape()) != null) { ... } layer.close(); """return_mapscript.layerObj_nextShape(self)
[المستندات]defclose(self)->"void":r""" Close the underlying layer."""return_mapscript.layerObj_close(self)
[المستندات]defgetShape(self,record:"resultObj")->"shapeObj *":r""" Get a shape from layer data. Argument is a result cache member from :func:`layerObj.getResult`"""return_mapscript.layerObj_getShape(self,record)
[المستندات]defgetNumResults(self)->"int":r""" Returns the number of entries in the query result cache for this layer."""return_mapscript.layerObj_getNumResults(self)
[المستندات]defgetResultsBounds(self)->"rectObj *":r""" Returns the bounds of the features in the result cache."""return_mapscript.layerObj_getResultsBounds(self)
[المستندات]defgetResult(self,i:"int")->"resultObj *":r""" Fetches the requested query result cache entry, or NULL if the index is outside the range of available results. This method would normally only be used after issuing a query operation. """return_mapscript.layerObj_getResult(self,i)
[المستندات]defgetClass(*args):""" Fetch the requested class object at *i*. Returns NULL if the class index is out of the legal range. The numclasses field contains the number of classes available, and the first class is index 0. """clazz=_mapscript.layerObj_getClass(*args)ifclazz:ifargsandlen(args)!=0:clazz.p_layer=args[0]else:clazz.p_layer=Nonereturnclazz
[المستندات]defgetItem(self,i:"int")->"char *":r""" Returns the requested item. Items are attribute fields, and this method returns the item name (field name). The numitems field contains the number of items available, and the first item is index zero. """return_mapscript.layerObj_getItem(self,i)
[المستندات]defsetItems(self,items:"char **",numitems:"int")->"int":r""" Set the items to be retrieved with a particular shape."""return_mapscript.layerObj_setItems(self,items,numitems)
[المستندات]defdraw(self,map:"mapObj",image:"imageObj")->"int":r""" Renders this layer into the target image, adding labels to the cache if required. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.layerObj_draw(self,map,image)
[المستندات]defdrawQuery(self,map:"mapObj",image:"imageObj")->"int":r""" Draw query map for a single layer into the target image. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.layerObj_drawQuery(self,map,image)
[المستندات]defqueryByFilter(self,map:"mapObj",string:"char *")->"int":r""" Query by the filter *string*. For querying, we switch layer status ON and then back to original value before returning. """return_mapscript.layerObj_queryByFilter(self,map,string)
[المستندات]defqueryByAttributes(self,map:"mapObj",qitem:"char *",qstring:"char *",mode:"int")->"int":r""" Query layer for shapes that intersect current map extents. *qitem* is the item (attribute) on which the query is performed, and *qstring* is the expression to match. The query is performed on all the shapes that are part of a CLASS that contains a TEMPLATE value or that match any class in a layer that contains a LAYER TEMPLATE value. Note that the layer's FILTER/FILTERITEM are ignored by this function. *mode* is :data:`MS_SINGLE` or :data:`MS_MULTIPLE` depending on number of results you want. Returns :data:`MS_SUCCESS` if the query was successfully performed, regardless of whether any shapes were found, or :data:`MS_FAILURE` if an error occured. """return_mapscript.layerObj_queryByAttributes(self,map,qitem,qstring,mode)
[المستندات]defqueryByPoint(self,map:"mapObj",point:"pointObj",mode:"int",buffer:"double")->"int":r""" Query layer at point location specified in georeferenced map coordinates (i.e. not pixels). The query is performed on all the shapes that are part of a CLASS that contains a TEMPLATE value or that match any class in a layer that contains a LAYER TEMPLATE value. Note that the layer's FILTER/FILTERITEM are ignored by this function. *mode* is :data:`MS_SINGLE` or :data:`MS_MULTIPLE` depending on number of results you want. Returns :data:`MS_SUCCESS` if the query was successfully performed, regardless of whether any shapes were found, or :data:`MS_FAILURE` if an error occured. """return_mapscript.layerObj_queryByPoint(self,map,point,mode,buffer)
[المستندات]defqueryByRect(self,map:"mapObj",rect:"rectObj")->"int":r""" Query layer using a rectangle specified in georeferenced map coordinates (i.e. not pixels). The query is performed on all the shapes that are part of a CLASS that contains a TEMPLATE value or that match any class in a layer that contains a LAYER TEMPLATE value. Note that the layer's FILTER/FILTERITEM are ignored by this function. The :data:`MS_MULTIPLE` mode is set by default. Returns :data:`MS_SUCCESS` if the query was successfully performed, regardless of whether any shapes were found, or :data:`MS_FAILURE` if an error occured. """return_mapscript.layerObj_queryByRect(self,map,rect)
[المستندات]defqueryByFeatures(self,map:"mapObj",slayer:"int")->"int":r""" Perform a query set based on a previous set of results from another layer. At present the results MUST be based on a polygon layer. Returns :data:`MS_SUCCESS` if the query was successfully performed, regardless of whether any shapes were found, or :data:`MS_FAILURE` if an error occured. """return_mapscript.layerObj_queryByFeatures(self,map,slayer)
[المستندات]defqueryByShape(self,map:"mapObj",shape:"shapeObj")->"int":r""" Query layer based on a single shape, the shape has to be a polygon at this point. Returns :data:`MS_SUCCESS` if the query was successfully performed, regardless of whether any shapes were found, or :data:`MS_FAILURE` if an error occured. """return_mapscript.layerObj_queryByShape(self,map,shape)
[المستندات]defqueryByIndex(self,map:"mapObj",tileindex:"int",shapeindex:"int",bAddToQuery:"int"=0)->"int":r""" Pop a query result member into the layer's result cache. By default clobbers existing cache. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.layerObj_queryByIndex(self,map,tileindex,shapeindex,bAddToQuery)
[المستندات]defgetResults(self)->"resultCacheObj *":r""" Returns a reference to layer's result cache. Should be NULL prior to any query, or after a failed query or query with no results."""return_mapscript.layerObj_getResults(self)
[المستندات]defsetFilter(self,filter:"char *")->"int":r""" Sets a filter expression similarly to the FILTER expression in a map file. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` if the expression fails to parse. """return_mapscript.layerObj_setFilter(self,filter)
[المستندات]defgetFilterString(self)->"char *":r""" Returns the current filter expression."""return_mapscript.layerObj_getFilterString(self)
[المستندات]defsetWKTProjection(self,wkt:"char *")->"int":r""" Set the layer projection using OpenGIS Well Known Text format. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.layerObj_setWKTProjection(self,wkt)
[المستندات]defgetProjection(self)->"char *":r""" Returns the PROJ definition of the layer's projection."""return_mapscript.layerObj_getProjection(self)
[المستندات]defsetProjection(self,proj4:"char *")->"int":r""" Set the layer projection using a PROJ format projection definition (i.e. "+proj=utm +zone=11 +datum=WGS84" or "init=EPSG:26911"). Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.layerObj_setProjection(self,proj4)
[المستندات]defaddFeature(self,shape:"shapeObj")->"int":r""" Add a new inline feature on a layer. Returns -1 on error. TODO: Is this similar to inline features in a mapfile? Does it work for any kind of layer or connection type? """return_mapscript.layerObj_addFeature(self,shape)
[المستندات]defgetNumFeatures(self)->"int":r""" Returns the number of inline features in a layer. TODO: is this really only online features or will it return the number of non-inline features on a regular layer? """return_mapscript.layerObj_getNumFeatures(self)
[المستندات]defgetExtent(self)->"rectObj *":r""" Fetches the extents of the data in the layer. This normally requires a full read pass through the features of the layer and does not work for raster layers."""return_mapscript.layerObj_getExtent(self)
[المستندات]defsetExtent(self,minx:"double"=-1.0,miny:"double"=-1.0,maxx:"double"=-1.0,maxy:"double"=-1.0)->"int":r""" Sets the extent of a layer. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.layerObj_setExtent(self,minx,miny,maxx,maxy)
[المستندات]defgetWMSFeatureInfoURL(self,map:"mapObj",click_x:"int",click_y:"int",feature_count:"int",info_format:"char *")->"char *":r""" Return a WMS GetFeatureInfo URL (works only for WMS layers) *clickX*, *clickY* is the location of to query in pixel coordinates with (0,0) at the top left of the image. *featureCount* is the number of results to return. *infoFormat* is the format the format in which the result should be requested. Depends on remote server's capabilities. MapServer WMS servers support only "MIME" (and should support "GML.1" soon). Returns "" and outputs a warning if layer is not a WMS layer or if it is not queryable. """return_mapscript.layerObj_getWMSFeatureInfoURL(self,map,click_x,click_y,feature_count,info_format)
[المستندات]defexecuteWFSGetFeature(self,layer:"layerObj")->"char *":r""" Executes a GetFeature request on a WFS layer and returns the name of the temporary GML file created. Returns an empty string on error."""return_mapscript.layerObj_executeWFSGetFeature(self,layer)
[المستندات]defapplySLD(self,sld:"char *",stylelayer:"char *")->"int":r""" Apply the SLD document to the layer object. The matching between the SLD document and the layer will be done using the layer's name. If a *stylelayer* argument is passed (argument is optional), the NamedLayer in the SLD that matches it will be used to style the layer. See SLD HOWTO for more information on the SLD support. """return_mapscript.layerObj_applySLD(self,sld,stylelayer)
[المستندات]defapplySLDURL(self,sld:"char *",stylelayer:"char *")->"int":r""" Apply the SLD document pointed by the URL to the layer object. The matching between the SLD document and the layer will be done using the layer's name. If a *stylelayer* argument is passed (argument is optional), the NamedLayer in the SLD that matches it will be used to style the layer. See SLD HOWTO for more information on the SLD support. """return_mapscript.layerObj_applySLDURL(self,sld,stylelayer)
[المستندات]defgenerateSLD(self)->"char *":r""" Returns an SLD XML string based on all the classes found in the layer (the layer must have ``STATUS ON```)."""return_mapscript.layerObj_generateSLD(self)
[المستندات]defisVisible(self)->"int":r""" Returns :data:`MS_TRUE` or :data:`MS_FALSE` after considering the layer status, minscaledenom, and maxscaledenom within the context of the parent map. """return_mapscript.layerObj_isVisible(self)
[المستندات]defmoveClassUp(self,index:"int")->"int":r""" The class specified by the class index will be moved up in the array of classes. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. For example ``moveClassUp(1)`` will have the effect of moving class 1 up to position 0, and the class at position 0 will be moved to position 1. """return_mapscript.layerObj_moveClassUp(self,index)
[المستندات]defmoveClassDown(self,index:"int")->"int":r""" The class specified by the class index will be moved up into the array of classes. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. For example ``moveClassDown(1)`` will have the effect of moving class 1 down to position 2, and the class at position 2 will be moved to position 1. """return_mapscript.layerObj_moveClassDown(self,index)
[المستندات]defsetProcessingKey(self,key:"char const *",value:"char const *")->"void":r""" Adds or replaces a processing directive of the form "key=value". Unlike the :func:`layerObj.addProcessing` function, this will replace an existing processing directive for the given key value. Processing directives supported are specific to the layer type and underlying renderer. """return_mapscript.layerObj_setProcessingKey(self,key,value)
[المستندات]defaddProcessing(self,directive:"char const *")->"void":r""" Adds a new processing directive line to a layer, similar to the PROCESSING directive in a map file. Processing directives supported are specific to the layer type and underlying renderer. """return_mapscript.layerObj_addProcessing(self,directive)
[المستندات]defgetProcessing(self,index:"int")->"char *":r""" Return the raster processing directive at *index*."""return_mapscript.layerObj_getProcessing(self,index)
[المستندات]defgetProcessingKey(self,key:"char const *")->"char *":r""" Return the processing directive specified by *key*."""return_mapscript.layerObj_getProcessingKey(self,key)
[المستندات]defclearProcessing(self)->"int":r""" Clears the layer's raster processing directives. Returns the subsequent number of directives, which will equal :data:`MS_SUCCESS` if the directives have been cleared. """return_mapscript.layerObj_clearProcessing(self)
[المستندات]defsetConnectionType(self,connectiontype:"int",library_str:"char const *")->"int":r""" Changes the connectiontype of the layer and recreates the vtable according to the new connection type. This method should be used instead of setting the *connectiontype* parameter directly. In case when the layer.connectiontype = :data:`MS_PLUGIN` the *library_str* parameter should also be specified so as to select the library to load by MapServer. For the other connection types this parameter should be set to an empty string "". """return_mapscript.layerObj_setConnectionType(self,connectiontype,library_str)
[المستندات]defgetClassIndex(self,map:"mapObj",shape:"shapeObj",classgroup:"int *"=None,numclasses:"int"=0)->"int":r""" Get the class index for a shape in the layer."""return_mapscript.layerObj_getClassIndex(self,map,shape,classgroup,numclasses)
[المستندات]defgetGeomTransform(self)->"char *":r""" Return the geomtransform string for the layer."""return_mapscript.layerObj_getGeomTransform(self)
[المستندات]defsetGeomTransform(self,transform:"char *")->"void":r""" Set the geomtransform string for the layer."""return_mapscript.layerObj_setGeomTransform(self,transform)
[المستندات]defgetItemType(self,i:"int")->"char *":r""" Returns the requested item's field type. A layer must be open to retrieve the item definition. Pass in the attribute index to retrieve the type. The layer's numitems property contains the number of items available, and the first item is index zero. """return_mapscript.layerObj_getItemType(self,i)
[المستندات]defgetItemDefinitions(self):""" **Python MapScript only** Return item (field) names and their types if available. Field types are specified using GML metadata and can be one of the following: ``Integer|Long|Real|Character|Date|Boolean`` """item_names=[self.getItem(idx)foridxinrange(0,self.numitems)]item_types=[self.getItemType(idx)foridxinrange(0,self.numitems)]returnzip(item_names,item_types)
# Register layerObj in _mapscript:_mapscript.layerObj_swigregister(layerObj)MS_RESOLUTION_MAX=_mapscript.MS_RESOLUTION_MAXMS_RESOLUTION_MIN=_mapscript.MS_RESOLUTION_MINclassmapObj(object):r"""The :ref:`MAP <map>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprrefcount:"int"=property(_mapscript.mapObj_refcount_get,doc=r""" Used for reference counting see RFC24""")numlayers:"int"=property(_mapscript.mapObj_numlayers_get,doc=r""" Number of layers in mapfile""")maxlayers:"int"=property(_mapscript.mapObj_maxlayers_get,doc=r""" Allocated size of layers[] array""")configoptions:"hashTableObj"=property(_mapscript.mapObj_configoptions_get,doc=r""" A hash table of configuration options from CONFIG keywords in the map - see :ref:`CONFIG <mapfile-map-config>` """)symbolset:"symbolSetObj"=property(_mapscript.mapObj_symbolset_get,doc=r""" See :ref:`SYMBOLSET <mapfile-map-symbolset>`""")fontset:"fontSetObj"=property(_mapscript.mapObj_fontset_get,doc=r""" See :ref:`FONTSET <mapfile-map-fontset>`""")labelcache:"labelCacheObj"=property(_mapscript.mapObj_labelcache_get,doc=r""" We need this here so multiple feature processors can access it """)numoutputformats:"int"=property(_mapscript.mapObj_numoutputformats_get,doc=r""" Number of output formats available in the map""")outputformat:"outputFormatObj *"=property(_mapscript.mapObj_outputformat_get,doc=r""" See :ref:`OUTPUTFORMAT <mapfile-map-outputformat>`""")imagetype:"char *"=property(_mapscript.mapObj_imagetype_get,doc=r""" Name of current outputformat""")reference:"referenceMapObj"=property(_mapscript.mapObj_reference_get,doc=r""" See :ref:`SCALEBAR <mapfile-map-scalebar>`""")scalebar:"scalebarObj"=property(_mapscript.mapObj_scalebar_get,doc=r""" See :ref:`SCALEBAR <mapfile-map-scalebar>`""")legend:"legendObj"=property(_mapscript.mapObj_legend_get,doc=r""" See :ref:`LEGEND <mapfile-map-legend>`""")querymap:"queryMapObj"=property(_mapscript.mapObj_querymap_get,doc=r""" See :ref:`QUERYMAP <mapfile-map-querymap>`""")web:"webObj"=property(_mapscript.mapObj_web_get,doc=r""" See :ref:`WEB <mapfile-map-web>`""")config:"configObj const *"=property(_mapscript.mapObj_config_get)datapattern:"char *"=property(_mapscript.mapObj_datapattern_get,_mapscript.mapObj_datapattern_set,doc=r""" TODO - Deprecated use VALIDATION ... END block instead""")templatepattern:"char *"=property(_mapscript.mapObj_templatepattern_get,_mapscript.mapObj_templatepattern_set,doc=r""" TODO - Deprecated use VALIDATION ... END block instead """)name:"char *"=property(_mapscript.mapObj_name_get,_mapscript.mapObj_name_set,doc=r""" Small identifier for naming etc - see :ref:`NAME <mapfile-map-name>` """)status:"int"=property(_mapscript.mapObj_status_get,_mapscript.mapObj_status_set,doc=r""" Is map creation on or off - see :ref:`STATUS <mapfile-map-status>` """)height:"int"=property(_mapscript.mapObj_height_get,_mapscript.mapObj_height_set,doc=r""" See :ref:`SIZE <mapfile-map-size>`""")width:"int"=property(_mapscript.mapObj_width_get,_mapscript.mapObj_width_set,doc=r""" See :ref:`SIZE <mapfile-map-size>`""")maxsize:"int"=property(_mapscript.mapObj_maxsize_get,_mapscript.mapObj_maxsize_set,doc=r""" See :ref:`MAXSIZE <mapfile-map-maxsize>`""")extent:"rectObj"=property(_mapscript.mapObj_extent_get,_mapscript.mapObj_extent_set,doc=r""" Map extent array - see :ref:`EXTENT <mapfile-map-extent>`""")cellsize:"double"=property(_mapscript.mapObj_cellsize_get,_mapscript.mapObj_cellsize_set,doc=r""" Pixel size in map units""")units:"enum MS_UNITS"=property(_mapscript.mapObj_units_get,_mapscript.mapObj_units_set,doc=r""" Units of the projection - see :ref:`UNITS <mapfile-map-units>`""")scaledenom:"double"=property(_mapscript.mapObj_scaledenom_get,_mapscript.mapObj_scaledenom_set,doc=r""" The nominal map scale, a value of 25000 means 1:25000 scale - see :ref:`SCALEDENOM <mapfile-map-scaledenom>` """)resolution:"double"=property(_mapscript.mapObj_resolution_get,_mapscript.mapObj_resolution_set,doc=r""" See :ref:`RESOLUTION <mapfile-map-resolution>`""")defresolution:"double"=property(_mapscript.mapObj_defresolution_get,_mapscript.mapObj_defresolution_set,doc=r""" Default resolution - used to calculate the scalefactor, see :ref:`DEFRESOLUTION <mapfile-map-defresolution>` """)shapepath:"char *"=property(_mapscript.mapObj_shapepath_get,_mapscript.mapObj_shapepath_set,doc=r""" Where are the shape files located - see :ref:`SHAPEPATH <mapfile-map-shapepath>` """)mappath:"char *"=property(_mapscript.mapObj_mappath_get,_mapscript.mapObj_mappath_set,doc=r""" Path of the mapfile, all paths are relative to this path""")sldurl:"char *"=property(_mapscript.mapObj_sldurl_get,_mapscript.mapObj_sldurl_set,doc=r""" URL of SLD document as specified with "&SLD=..." WMS parameter d- currently this reference is used only in mapogcsld.c and has a NULL value outside that context """)imagecolor:"colorObj"=property(_mapscript.mapObj_imagecolor_get,_mapscript.mapObj_imagecolor_set,doc=r""" Holds the initial image color value - see :ref:`IMAGECOLOR <mapfile-map-imagecolor>` """)layerorder:"int *"=property(_mapscript.mapObj_layerorder_get,_mapscript.mapObj_layerorder_set,doc=r""" Used to modify the order in which the layers are drawn - TODO should be immutable? """)debug:"int"=property(_mapscript.mapObj_debug_get,_mapscript.mapObj_debug_set,doc=r""" See :ref:`DEBUG <mapfile-map-debug>`""")
[المستندات]def__init__(self,*args):r""" Create a new instance of :class:`mapObj`. Note that the *filename* is optional."""_mapscript.mapObj_swiginit(self,_mapscript.new_mapObj(*args))
__swig_destroy__=_mapscript.delete_mapObj
[المستندات]defclone(self)->"mapObj *":r""" Return an independent copy of the map, less any caches. .. note:: In the Java & PHP modules this method is named ``cloneMap``. """return_mapscript.mapObj_clone(self)
[المستندات]definsertLayer(*args):""" Insert a copy of *layer* into the map at *index*. The default value of *index* is -1, which means the last possible index. Returns the index of the new layer, or -1 in the case of a failure. """actualIndex=_mapscript.mapObj_insertLayer(*args)args[1].p_map=args[0]returnactualIndex
[المستندات]defremoveLayer(self,index:"int")->"layerObj *":r""" Remove the layer at *index*. Returns the :class:`layerObj`."""return_mapscript.mapObj_removeLayer(self,index)
[المستندات]defsetExtent(self,minx:"double",miny:"double",maxx:"double",maxy:"double")->"int":r""" Set the map extent, returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. This method will correct the extents (width/height ratio) before setting the minx, miny, maxx, maxy values. See extent properties to set up a custom extent from :class:`rectObj`. """return_mapscript.mapObj_setExtent(self,minx,miny,maxx,maxy)
[المستندات]defoffsetExtent(self,x:"double",y:"double")->"int":r""" Offset the map extent based on the given distances in map coordinates. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_offsetExtent(self,x,y)
[المستندات]defscaleExtent(self,zoomfactor:"double",minscaledenom:"double",maxscaledenom:"double")->"int":r""" Scale the map extent using the *zoomfactor* and ensure the extent within the *minscaledenom* and *maxscaledenom* domain. If *minscaledenom* and/or *maxscaledenom* is 0 then the parameter is not taken into account. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_scaleExtent(self,zoomfactor,minscaledenom,maxscaledenom)
[المستندات]defsetCenter(self,center:"pointObj")->"int":r""" Set the map center to the given map point. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_setCenter(self,center)
[المستندات]defgetRotation(self)->"double":r""" Returns the map rotation angle."""return_mapscript.mapObj_getRotation(self)
[المستندات]defsetRotation(self,rotation_angle:"double")->"int":r""" Set map rotation angle. The map view rectangle (specified in EXTENTS) will be rotated by the indicated angle in the counter- clockwise direction. Note that this implies the rendered map will be rotated by the angle in the clockwise direction. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_setRotation(self,rotation_angle)
[المستندات]defgetLayer(*args):""" Returns a reference to the layer at index *i*. """layer=_mapscript.mapObj_getLayer(*args)iflayer:ifargsandlen(args)!=0:layer.p_map=args[0]else:layer.p_map=Nonereturnlayer
[المستندات]defgetLayerByName(*args):""" Returns a reference to the named layer. """layer=_mapscript.mapObj_getLayerByName(*args)iflayer:ifargsandlen(args)!=0:layer.p_map=args[0]else:layer.p_map=Nonereturnlayer
[المستندات]defgetSymbolByName(self,name:"char *")->"int":r""" Return the index of the named symbol in the map's symbolset. .. note:: This method is poorly named and too indirect. It is preferable to use the getSymbolByName method of :class:`symbolSetObj`, which really does return a :class:`symbolObj` reference, or use the index method of symbolSetObj to get a symbol's index number. """return_mapscript.mapObj_getSymbolByName(self,name)
[المستندات]defprepareQuery(self)->"void":r""" **TODO** this function only calculates the scale or am I missing something?"""return_mapscript.mapObj_prepareQuery(self)
[المستندات]defprepareImage(self)->"imageObj *":r""" Returns an :class:`imageObj` initialized to map extents and outputformat."""return_mapscript.mapObj_prepareImage(self)
[المستندات]defsetImageType(self,imagetype:"char const *")->"void":r""" Sets map outputformat to the named format. .. note:: :func:`mapObj.setImageType` remains in the module but its use is deprecated in favor of :func:`mapObj.selectOutputFormat`. """return_mapscript.mapObj_setImageType(self,imagetype)
[المستندات]defselectOutputFormat(self,imagetype:"char const *")->"void":r""" Set the map's active output format to the internal format named imagetype. Built-in formats are "PNG", "PNG24", "JPEG", "GIF", "GTIFF". """return_mapscript.mapObj_selectOutputFormat(self,imagetype)
[المستندات]defgetOutputFormat(self,i:"int")->"outputFormatObj *":r""" Returns the output format at the specified *i* index from the output formats array or null if *i* is beyond the array bounds. The number of outpuFormats can be retrieved by calling :func:`mapObj.getNumoutputformats`. """return_mapscript.mapObj_getOutputFormat(self,i)
[المستندات]defdraw(self)->"imageObj *":r""" Draw the map, processing layers according to their defined order and status. Return an :class:`imageObj`. """return_mapscript.mapObj_draw(self)
[المستندات]defdrawQuery(self)->"imageObj *":r""" Draw query map, returning an :class:`imageObj`."""return_mapscript.mapObj_drawQuery(self)
[المستندات]defdrawLegend(self,scale_independent:"int"=0)->"imageObj *":r""" Draw map legend, returning an :class:`imageObj`."""return_mapscript.mapObj_drawLegend(self,scale_independent)
[المستندات]defdrawScalebar(self)->"imageObj *":r""" Draw scale bar, returning an :class:`imageObj`."""return_mapscript.mapObj_drawScalebar(self)
[المستندات]defdrawReferenceMap(self)->"imageObj *":r""" Draw reference map, returning an :class:`imageObj`."""return_mapscript.mapObj_drawReferenceMap(self)
[المستندات]defembedScalebar(self,image:"imageObj")->"int":r""" Embed map's legend in *image*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_embedScalebar(self,image)
[المستندات]defembedLegend(self,image:"imageObj")->"int":r""" Embed map's legend in *image*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_embedLegend(self,image)
[المستندات]defdrawLabelCache(self,image:"imageObj")->"int":r""" Draw map's label cache on *image*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_drawLabelCache(self,image)
[المستندات]defqueryByFilter(self,string:"char *")->"int":r""" Query map layers using the filter *string*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_queryByFilter(self,string)
[المستندات]defqueryByPoint(self,point:"pointObj",mode:"int",buffer:"double")->"int":r""" Query map layers, result sets contain one or more features, depending on mode, that intersect *point* within a tolerance *buffer*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_queryByPoint(self,point,mode,buffer)
[المستندات]defqueryByRect(self,rect:"rectObj")->"int":r""" Query map layers, result sets contain features that intersect or are contained within the features in the result set of the :data:`MS_LAYER_POLYGON` type layer at layer index *slayer*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_queryByRect(self,rect)
[المستندات]defqueryByFeatures(self,slayer:"int")->"int":r""" Query map layers, result sets contain features that intersect or are contained within the features in the result set of the :data:`MS_LAYER_POLYGON` type layer at layer index *slayer*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`. """return_mapscript.mapObj_queryByFeatures(self,slayer)
[المستندات]defqueryByShape(self,shape:"shapeObj")->"int":r""" Query layer based on a single shape, the shape has to be a polygon at this point. Returns :data:`MS_SUCCESS` if shapes were found or :data:`MS_FAILURE` if nothing was found or if some other error happened """return_mapscript.mapObj_queryByShape(self,shape)
[المستندات]defsetWKTProjection(self,wkt:"char *")->"int":r""" Sets map projection from OGC definition *wkt*."""return_mapscript.mapObj_setWKTProjection(self,wkt)
[المستندات]defgetProjection(self)->"char *":r""" Returns the PROJ definition of the map's projection."""return_mapscript.mapObj_getProjection(self)
[المستندات]defsetProjection(self,proj4:"char *")->"int":r""" Set map projection from PROJ definition string proj4."""return_mapscript.mapObj_setProjection(self,proj4)
[المستندات]defsave(self,filename:"char *")->"int":r""" Save map to disk as a new map file. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_save(self,filename)
[المستندات]defsaveQuery(self,filename:"char *",results:"int"=0)->"int":r""" Save query to disk. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_saveQuery(self,filename,results)
[المستندات]defloadQuery(self,filename:"char *")->"int":r""" Load a saved query. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_loadQuery(self,filename)
[المستندات]deffreeQuery(self,qlayer:"int"=-1)->"void":r""" Clear layer query result caches. Default is -1, or all layers."""return_mapscript.mapObj_freeQuery(self,qlayer)
[المستندات]defsaveQueryAsGML(self,*args)->"int":r""" Save query to disk. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_saveQueryAsGML(self,*args)
[المستندات]defsetSymbolSet(self,szFileName:"char *")->"int":r""" Load symbols defined in filename into map symbolset. The existing symbolset is cleared. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_setSymbolSet(self,szFileName)
[المستندات]defgetNumSymbols(self)->"int":r""" Return the number of symbols in map"""return_mapscript.mapObj_getNumSymbols(self)
[المستندات]defsetFontSet(self,filename:"char *")->"int":r""" . Load fonts defined in filename into map fontset. The existing fontset is cleared. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_setFontSet(self,filename)
[المستندات]defsaveMapContext(self,szFileName:"char *")->"int":r""" Save map definition to disk as OGC-compliant XML. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_saveMapContext(self,szFileName)
[المستندات]defloadMapContext(self,szFileName:"char *",useUniqueNames:"int"=0)->"int":r""" Load an OGC map context file to define extents and layers of a map Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_loadMapContext(self,szFileName,useUniqueNames)
[المستندات]defmoveLayerUp(self,layerindex:"int")->"int":r""" Move the layer at layerindex up in the drawing order array, meaning that it is drawn earlier. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_moveLayerUp(self,layerindex)
[المستندات]defmoveLayerDown(self,layerindex:"int")->"int":r""" Move the layer at layerindex down in the drawing order array, meaning that it is drawn later. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_moveLayerDown(self,layerindex)
[المستندات]defgetLayersDrawingOrder(self)->"intarray *":r""" Returns an array of layer indexes in drawing order. Note Unless the proper typemap is implemented for the module's language a user is more likely to get back an unusable SWIG pointer to the integer array. """return_mapscript.mapObj_getLayersDrawingOrder(self)
[المستندات]defsetLayersDrawingOrder(self,panIndexes:"int *")->"int":r""" Set map layer drawing order. Note Unless the proper typemap is implemented for the module's language users will not be able to pass arrays or lists to this method and it will be unusable. """return_mapscript.mapObj_setLayersDrawingOrder(self,panIndexes)
[المستندات]defsetConfigOption(self,key:"char *",value:"char *")->"void":r""" Set the indicated key configuration option to the indicated value. Equivalent to including a CONFIG keyword in a map file. """return_mapscript.mapObj_setConfigOption(self,key,value)
[المستندات]defgetConfigOption(self,key:"char *")->"char *":r""" Fetches the value of the requested configuration key if set. Returns NULL if the key is not set. """return_mapscript.mapObj_getConfigOption(self,key)
[المستندات]defapplyConfigOptions(self)->"void":r""" Apply the defined configuration options set by setConfigOption()"""return_mapscript.mapObj_applyConfigOptions(self)
[المستندات]defapplySLD(self,sld:"char *")->"int":r""" Parse the SLD XML string sldxml and apply to map layers. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_applySLD(self,sld)
[المستندات]defapplySLDURL(self,sld:"char *")->"int":r""" Fetch SLD XML from the URL sldurl and apply to map layers. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_applySLDURL(self,sld)
[المستندات]defgenerateSLD(self,sldVersion:"char *"=None)->"char *":r""" Return SLD XML as a string for map layers that have STATUS on."""return_mapscript.mapObj_generateSLD(self,sldVersion)
[المستندات]defprocessTemplate(self,bGenerateImages:"int",names:"char **",values:"char **",numentries:"int")->"char *":r""" Process MapServer template and return HTML. Note none of the three template processing methods will be usable unless the proper typemaps are implemented in the module for the target language.Currently the typemaps are not implemented. """return_mapscript.mapObj_processTemplate(self,bGenerateImages,names,values,numentries)
[المستندات]defprocessLegendTemplate(self,names:"char **",values:"char **",numentries:"int")->"char *":r""" Process MapServer legend template and return HTML. Note none of the three template processing methods will be usable unless the proper typemaps are implemented in the module for the target language.Currently the typemaps are not implemented. """return_mapscript.mapObj_processLegendTemplate(self,names,values,numentries)
[المستندات]defprocessQueryTemplate(self,names:"char **",values:"char **",numentries:"int")->"char *":r""" Process MapServer query template and return HTML. Note none of the three template processing methods will be usable unless the proper typemaps are implemented in the module for the target language.Currently the typemaps are not implemented. """return_mapscript.mapObj_processQueryTemplate(self,names,values,numentries)
[المستندات]defgetOutputFormatByName(self,name:"char const *")->"outputFormatObj *":r""" Return the output format corresponding to driver name imagetype or to format name imagetype. This works exactly the same as the IMAGETYPE directive in a mapfile, is case insensitive and allows an output format to be found either by driver (like 'AGG/PNG') or name (like 'png'). """return_mapscript.mapObj_getOutputFormatByName(self,name)
[المستندات]defappendOutputFormat(self,format:"outputFormatObj")->"int":r""" Attach format to the map's output format list. Returns the updated number of output formats. """return_mapscript.mapObj_appendOutputFormat(self,format)
[المستندات]defremoveOutputFormat(self,name:"char const *")->"int":r""" Removes the format named name from the map's output format list. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_removeOutputFormat(self,name)
[المستندات]defloadOWSParameters(self,*args)->"int":r""" Load OWS request parameters (BBOX, LAYERS, &c.) into map. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_loadOWSParameters(self,*args)
[المستندات]defOWSDispatch(self,req:"OWSRequest")->"int":r""" Processes and executes the passed OpenGIS Web Services request on the map. Returns :data:`MS_DONE` (2) if there is no valid OWS request in the req object, :data:`MS_SUCCESS` (0) if an OWS request was successfully processed and :data:`MS_FAILURE` (1) if an OWS request was not successfully processed. OWS requests include WMS, WFS, WCS and SOS requests supported by MapServer. Results of a dispatched request are written to stdout and can be captured using the msIO services (i.e. :func:`mapscript.msIO_installStdoutToBuffer` and :func:`mapscript.msIO_getStdoutBufferString()` """return_mapscript.mapObj_OWSDispatch(self,req)
[المستندات]defconvertToString(self)->"char *":r""" Saves the object to a string. Provides the inverse option for updateFromString."""return_mapscript.mapObj_convertToString(self)
[المستندات]defapplyDefaultSubstitutions(self)->"void":r""" Apply any default values defined in a VALIDATION block used for runtime substitutions"""return_mapscript.mapObj_applyDefaultSubstitutions(self)
[المستندات]defapplySubstitutions(self,names:"char **")->"void":r""" Pass in runtime substitution keys and values and apply them to the map. Note - this method is currently enabled for Python only. Typemaps are needed for other MapScript languages. """return_mapscript.mapObj_applySubstitutions(self,names)
[المستندات]defzoomPoint(self,zoomfactor:"int",poPixPos:"pointObj",width:"int",height:"int",poGeorefExt:"rectObj",poMaxGeorefExt:"rectObj")->"int":r""" Zoom by the given factor to a pixel position within the width and height bounds. If max_extent is not NULL, the zoom is constrained to the max_extents Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.mapObj_zoomPoint(self,zoomfactor,poPixPos,width,height,poGeorefExt,poMaxGeorefExt)
[المستندات]defzoomRectangle(self,poPixRect:"rectObj",width:"int",height:"int",poGeorefExt:"rectObj",poMaxGeorefExt:"rectObj")->"int":r""" Set the map extents to a given extents. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` on error """return_mapscript.mapObj_zoomRectangle(self,poPixRect,width,height,poGeorefExt,poMaxGeorefExt)
[المستندات]defzoomScale(self,scale:"double",poPixPos:"pointObj",width:"int",height:"int",poGeorefExt:"rectObj",poMaxGeorefExt:"rectObj")->"int":r""" Zoom by the given factor to a pixel position within the width and height bounds. If max_extent is not NULL, the zoom is constrained to the max_extents """return_mapscript.mapObj_zoomScale(self,scale,poPixPos,width,height,poGeorefExt,poMaxGeorefExt)
[المستندات]defgetLayerOrder(self)->"PyObject *":r""" **Python MapScript only** - returns the map layer order as a native sequence"""return_mapscript.mapObj_getLayerOrder(self)
[المستندات]defsetLayerOrder(self,order:"PyObject *")->"int":r""" **Python MapScript only** - sets the map layer order using a native sequence"""return_mapscript.mapObj_setLayerOrder(self,order)
[المستندات]defgetSize(self)->"PyObject *":r""" **Python MapScript only** - gets the map size as a tuple"""return_mapscript.mapObj_getSize(self)
[المستندات]defget_height(self):""" **Python MapScript only** Return the map height from the map size """returnself.getSize()[1]# <-- second member is the height
[المستندات]defget_width(self):""" **Python MapScript only** Return the map width from the map size """returnself.getSize()[0]# <-- first member is the width
[المستندات]defset_height(self,value):""" **Python MapScript only** Set the map height value of the map size """returnself.setSize(self.getSize()[0],value)
[المستندات]defset_width(self,value):""" **Python MapScript only** Set the map width value of the map size """returnself.setSize(value,self.getSize()[1])
width=property(get_width,set_width,doc="See :ref:`SIZE <mapfile-map-size>`")height=property(get_height,set_height,doc="See :ref:`SIZE <mapfile-map-size>`")# Register mapObj in _mapscript:_mapscript.mapObj_swigregister(mapObj)defmsSaveImage(map:"mapObj",img:"imageObj",filename:"char const *")->"int":r"""Saves a map image to a file"""return_mapscript.msSaveImage(map,img,filename)defmsFreeImage(img:"imageObj")->"void":r"""Generic function to free a imageObj"""return_mapscript.msFreeImage(img)defmsSetup()->"int":r"""Sets up threads and font cache - called when MapScript is initialised"""return_mapscript.msSetup()defmsCleanup()->"void":r""" Attempts to recover all dynamically allocated resources allocated by MapServer code and dependent libraries. It is used primarily for final clean-up in scripts that need to do memory leak testing to get rid of "noise" one-time allocations. It should not normally be used by production code. """return_mapscript.msCleanup()defmsLoadMapFromString(buffer:"char *",new_mappath:"char *",config:"configObj")->"mapObj *":r"""Sets up string-based mapfile loading and calls loadMapInternal to do the work"""return_mapscript.msLoadMapFromString(buffer,new_mappath,config)MS_VERSION_MAJOR=_mapscript.MS_VERSION_MAJORMS_VERSION_MINOR=_mapscript.MS_VERSION_MINORMS_VERSION_REV=_mapscript.MS_VERSION_REVMS_VERSION=_mapscript.MS_VERSIONMS_VERSION_NUM=_mapscript.MS_VERSION_NUMclassrectObj(object):r""" A rectObj represents a rectangle or bounding box. A rectObj may be a lone object or an attribute of another object and has no other associations. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprminx:"double"=property(_mapscript.rectObj_minx_get,_mapscript.rectObj_minx_set,doc=r""" Minimum easting""")miny:"double"=property(_mapscript.rectObj_miny_get,_mapscript.rectObj_miny_set,doc=r""" Minimum northing""")maxx:"double"=property(_mapscript.rectObj_maxx_get,_mapscript.rectObj_maxx_set,doc=r""" Maximum easting""")maxy:"double"=property(_mapscript.rectObj_maxy_get,_mapscript.rectObj_maxy_set,doc=r""" Maximum northing""")
[المستندات]def__init__(self,minx:"double"=-1.0,miny:"double"=-1.0,maxx:"double"=-1.0,maxy:"double"=-1.0,imageunits:"int"=0):r""" Create new instance. The four easting and northing arguments are optional and default to -1.0. Note the new optional fifth argument which allows creation of rectangles in image (pixel/line) units which are also tested for validity. """_mapscript.rectObj_swiginit(self,_mapscript.new_rectObj(minx,miny,maxx,maxy,imageunits))
__swig_destroy__=_mapscript.delete_rectObj
[المستندات]defproject(self,*args)->"int":r""" *Overload 1:* Reproject rectangle from proj_in to proj_out. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` | *Overload 2:* Reproject rectangle given a reprojection object. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.rectObj_project(self,*args)
[المستندات]deffit(self,width:"int",height:"int")->"double":r""" Adjust the rect to fit the width and height. Returns cellsize of rect."""return_mapscript.rectObj_fit(self,width,height)
[المستندات]defdraw(self,map:"mapObj",layer:"layerObj",image:"imageObj",classindex:"int",text:"char *")->"int":r""" Draw rectangle into img using style defined by the classindex class of layer. The rectangle is labeled with the string text. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.rectObj_draw(self,map,layer,image,classindex,text)
[المستندات]defgetCenter(self)->"pointObj *":r""" Return the center point of the rectangle."""return_mapscript.rectObj_getCenter(self)
[المستندات]deftoPolygon(self)->"shapeObj *":r""" Convert to a polygon of five vertices."""return_mapscript.rectObj_toPolygon(self)
[المستندات]deftoString(self)->"char *":r""" Return a string formatted like: ``{ 'minx': %f , 'miny': %f , 'maxx': %f , 'maxy': %f }`` with the bounding values substituted appropriately. Python users can get the same effect via the rectObj __str__ method: >>> r = mapscript.rectObj(0, 0, 1, 1) >>> str(r) { 'minx': 0 , 'miny': 0 , 'maxx': 1 , 'maxy': 1 } """return_mapscript.rectObj_toString(self)
def__str__(self):returnself.toString()def__contains__(self,item):item_type=item.__class__.__name__ifitem_type=="pointObj":ifitem.x>=self.minxanditem.x<=self.maxx \
anditem.y>=self.minyanditem.y<=self.maxy:returnTrueelse:returnFalseelse:raiseTypeError('__contains__ does not yet handle %s'%(item_type))# Register rectObj in _mapscript:_mapscript.rectObj_swigregister(rectObj)classpointObj(object):r""" A :class:`pointObj` has an x, y, z and m values. A :class:`pointObj` instance may be associated with a :class:`lineObj`. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprx:"double"=property(_mapscript.pointObj_x_get,_mapscript.pointObj_x_set,doc=r""" The x coordinate of the point""")y:"double"=property(_mapscript.pointObj_y_get,_mapscript.pointObj_y_set,doc=r""" The y coordinate of the point""")z:"double"=property(_mapscript.pointObj_z_get,_mapscript.pointObj_z_set,doc=r""" The z (height) coordinate of the point""")m:"double"=property(_mapscript.pointObj_m_get,_mapscript.pointObj_m_set,doc=r""" The m (measure) of the point, used for linear referencing""")
[المستندات]def__init__(self,x:"double"=0.0,y:"double"=0.0,z:"double"=0.0,m:"double"=-2e38):r""" Create new instance. Easting, northing, and measure arguments are optional. Java pointObj constructors are in java/javaextend.i See https://github.com/mapserver/mapserver/issues/1106 """_mapscript.pointObj_swiginit(self,_mapscript.new_pointObj(x,y,z,m))
__swig_destroy__=_mapscript.delete_pointObj
[المستندات]defproject(self,*args)->"int":r""" *Overload 1:* Reproject point from proj_in to proj_out. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` | *Overload 2:* Reproject point given a reprojection object. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.pointObj_project(self,*args)
[المستندات]defdraw(self,map:"mapObj",layer:"layerObj",image:"imageObj",classindex:"int",text:"char *")->"int":r""" Draw the point using the styles defined by the classindex class of layer and labelled with string text. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.pointObj_draw(self,map,layer,image,classindex,text)
[المستندات]defdistanceToPoint(self,point:"pointObj")->"double":r""" Returns the distance to point."""return_mapscript.pointObj_distanceToPoint(self,point)
[المستندات]defdistanceToSegment(self,a:"pointObj",b:"pointObj")->"double":r""" Returns the minimum distance to a hypothetical line segment connecting point1 and point2. """return_mapscript.pointObj_distanceToSegment(self,a,b)
[المستندات]defdistanceToShape(self,shape:"shapeObj")->"double":r""" Returns the minimum distance to shape."""return_mapscript.pointObj_distanceToShape(self,shape)
[المستندات]defsetXY(self,x:"double",y:"double",m:"double"=-2e38)->"int":r""" Set spatial coordinate and, optionally, measure values simultaneously. The measure will be set only if the value of m is greater than the ESRI measure no-data value of -1e38. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.pointObj_setXY(self,x,y,m)
[المستندات]defsetXYZ(self,x:"double",y:"double",z:"double",m:"double"=-2e38)->"int":r""" Set spatial coordinate and, optionally, measure values simultaneously. The measure will be set only if the value of m is greater than the ESRI measure no-data value of -1e38. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.pointObj_setXYZ(self,x,y,z,m)
[المستندات]defsetXYZM(self,x:"double",y:"double",z:"double",m:"double")->"int":r""" Set spatial coordinate and, optionally, measure values simultaneously. The measure will be set only if the value of m is greater than the ESRI measure no-data value of -1e38. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.pointObj_setXYZM(self,x,y,z,m)
[المستندات]deftoString(self)->"char *":r""" Return a string formatted like: ``{ 'x': %f , 'y': %f, 'z': %f }`` with the coordinate values substituted appropriately. Python users can get the same effect via the pointObj __str__ method: >>> p = mapscript.pointObj(1, 1) >>> str(p) { 'x': 1.000000 , 'y': 1.000000, 'z': 1.000000 } """return_mapscript.pointObj_toString(self)
[المستندات]deftoShape(self)->"shapeObj *":r""" Convert to a new :class:`shapeObj`"""return_mapscript.pointObj_toShape(self)
def__str__(self):returnself.toString()@propertydef__geo_interface__(self):ifhasattr(self,"z"):coords=(self.x,self.y,self.z)else:coords=(self.x,self.y)return{"type":"Point","coordinates":coords}# Register pointObj in _mapscript:_mapscript.pointObj_swigregister(pointObj)classlineObj(object):r"""A :class:`lineObj` is composed of one or more :class:`pointObj` instances"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumpoints:"int"=property(_mapscript.lineObj_numpoints_get,doc=r""" Number of points in the line""")
[المستندات]def__init__(self):r""" A :class:`lineObj` is composed of one or more :class:`pointObj` instances"""_mapscript.lineObj_swiginit(self,_mapscript.new_lineObj())
__swig_destroy__=_mapscript.delete_lineObj
[المستندات]defproject(self,*args)->"int":r""" *Overload 1:* Transform line in place from proj_in to proj_out. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` | *Overload 2:* Reproject line given a reprojection object. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.lineObj_project(self,*args)
[المستندات]defget(self,i:"int")->"pointObj *":r""" Return reference to point at index *i*."""return_mapscript.lineObj_get(self,i)
[المستندات]defadd(self,p:"pointObj")->"int":r""" Add point *p* to the line. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.lineObj_add(self,p)
[المستندات]defset(self,i:"int",p:"pointObj")->"int":r""" Set the point at index *i* to point *p*. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.lineObj_set(self,i,p)
@propertydef__geo_interface__(self):coords=[]foridxinrange(0,self.numpoints):pt=self.get(idx)geom=pt.__geo_interface__coords.append(geom["coordinates"])return{"type":"LineString","coordinates":coords}# Register lineObj in _mapscript:_mapscript.lineObj_swigregister(lineObj)classshapeObj(object):r""" Each feature of a layer's data is a :class:`shapeObj`. Each part of the shape is a closed :class:`lineObj`. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumlines:"int"=property(_mapscript.shapeObj_numlines_get,doc=r""" Number of parts""")numvalues:"int"=property(_mapscript.shapeObj_numvalues_get,doc=r""" Number of shape attributes""")bounds:"rectObj"=property(_mapscript.shapeObj_bounds_get,_mapscript.shapeObj_bounds_set,doc=r""" Bounding box of shape""")type:"int"=property(_mapscript.shapeObj_type_get,_mapscript.shapeObj_type_set,doc=r""" MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON, or MS_SHAPE_NULL """)index:"long"=property(_mapscript.shapeObj_index_get,_mapscript.shapeObj_index_set,doc=r""" Feature index within the layer""")tileindex:"int"=property(_mapscript.shapeObj_tileindex_get,_mapscript.shapeObj_tileindex_set,doc=r""" Index of tiled file for tile-indexed layers""")classindex:"int"=property(_mapscript.shapeObj_classindex_get,_mapscript.shapeObj_classindex_set,doc=r""" The class index for features of a classified layer""")text:"char *"=property(_mapscript.shapeObj_text_get,_mapscript.shapeObj_text_set,doc=r""" Shape annotation""")scratch:"int"=property(_mapscript.shapeObj_scratch_get,_mapscript.shapeObj_scratch_set)resultindex:"int"=property(_mapscript.shapeObj_resultindex_get,_mapscript.shapeObj_resultindex_set,doc=r""" Index within a query result set""")
[المستندات]def__init__(self,type:"int"=MS_SHAPE_NULL):r""" Return a new shapeObj of the specified type. See the type attribute. No attribute values created by default. initValues should be explicitly called to create the required number of values. Each feature of a layer's data is a shapeObj. Each part of the shape is a closed :class:`lineObj` """_mapscript.shapeObj_swiginit(self,_mapscript.new_shapeObj(type))
__swig_destroy__=_mapscript.delete_shapeObj
[المستندات]@staticmethoddeffromWKT(wkt:"char *")->"shapeObj *":r""" Returns a new shapeObj based on a well-known text representation of a geometry. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_fromWKT(wkt)
[المستندات]defproject(self,*args)->"int":r""" *Overload 1:* Reproject shape from proj_in to proj_out. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` | *Overload 2:* Reproject shape given a reprojection object. Transformation is done in place. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapeObj_project(self,*args)
[المستندات]defget(self,i:"int")->"lineObj *":r""" Returns a reference to part at index. Reference is valid only during the life of the shapeObj. """return_mapscript.shapeObj_get(self,i)
[المستندات]defadd(self,line:"lineObj")->"int":r""" Add line (i.e. a part) to the shape. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapeObj_add(self,line)
[المستندات]defdraw(self,map:"mapObj",layer:"layerObj",image:"imageObj")->"int":r""" Draws the individual shape using layer. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapeObj_draw(self,map,layer,image)
[المستندات]defsetBounds(self)->"void":r""" Must be called to calculate new bounding box after new parts have been added. TODO: should return int and set msSetError. """return_mapscript.shapeObj_setBounds(self)
[المستندات]defclone(self)->"shapeObj *":r""" Return an independent copy of the shape. .. note:: In the Java & PHP modules this method is named ``cloneShape``. """return_mapscript.shapeObj_clone(self)
[المستندات]defcopy(self,dest:"shapeObj")->"int":r""" Copy the shape to shape_copy. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapeObj_copy(self,dest)
[المستندات]deftoWKT(self)->"char *":r""" Returns the well - known text representation of a shapeObj. Requires GEOS support.Returns NULL / undefined on failure. """return_mapscript.shapeObj_toWKT(self)
[المستندات]defbuffer(self,width:"double")->"shapeObj *":r""" Returns a new buffered shapeObj based on the supplied distance (given in the coordinates of the existing shapeObj). Requires GEOS support. Returns NULL/undefined on failure. """return_mapscript.shapeObj_buffer(self,width)
[المستندات]defsimplify(self,tolerance:"double")->"shapeObj *":r""" Given a tolerance, returns a simplified shape object or NULL on error. Requires GEOS support (>=3.0). """return_mapscript.shapeObj_simplify(self,tolerance)
[المستندات]deftopologyPreservingSimplify(self,tolerance:"double")->"shapeObj *":r""" Given a tolerance, returns a simplified shape object or NULL on error. Requires GEOS support (>=3.0). """return_mapscript.shapeObj_topologyPreservingSimplify(self,tolerance)
[المستندات]defconvexHull(self)->"shapeObj *":r""" Returns the convex hull of the existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_convexHull(self)
[المستندات]defboundary(self)->"shapeObj *":r""" Returns the boundary of the existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_boundary(self)
[المستندات]defgetCentroid(self)->"pointObj *":r""" Returns the centroid for the existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_getCentroid(self)
[المستندات]defUnion(self,shape:"shapeObj")->"shapeObj *":r""" Returns the union of the existing and supplied shape. Shapes must be of the same type. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_Union(self,shape)
[المستندات]defintersection(self,shape:"shapeObj")->"shapeObj *":r""" Returns the computed intersection of the supplied and existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_intersection(self,shape)
[المستندات]defdifference(self,shape:"shapeObj")->"shapeObj *":r""" Returns the computed difference of the supplied and existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_difference(self,shape)
[المستندات]defsymDifference(self,shape:"shapeObj")->"shapeObj *":r""" Returns the computed symmetric difference of the supplied and existing shape. Requires GEOS support. Returns NULL/undef on failure. """return_mapscript.shapeObj_symDifference(self,shape)
[المستندات]defoverlaps(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape2 overlaps shape, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_overlaps(self,shape)
[المستندات]defwithin(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape is entirely within shape2, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_within(self,shape)
[المستندات]defcrosses(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape2 crosses the shape, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_crosses(self,shape)
[المستندات]defintersects(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape and shape2 intersect, and :data:`MS_FALSE` otherwise. Does not require GEOS support but will use GEOS functions if available. """return_mapscript.shapeObj_intersects(self,shape)
[المستندات]deftouches(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape and shape2 touch, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_touches(self,shape)
[المستندات]defequals(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape and shape2 are equal (geometry only), returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_equals(self,shape)
[المستندات]defdisjoint(self,shape:"shapeObj")->"int":r""" Returns :data:`MS_TRUE` if shape and shape2 are disjoint, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. """return_mapscript.shapeObj_disjoint(self,shape)
[المستندات]defgetArea(self)->"double":r""" Returns the area of the shape (if applicable). Requires GEOS support."""return_mapscript.shapeObj_getArea(self)
[المستندات]defgetLength(self)->"double":r""" Returns the length (or perimeter) of the shape. Requires GEOS support."""return_mapscript.shapeObj_getLength(self)
[المستندات]defgetValue(self,i:"int")->"char *":r""" Return the shape attribute at index i."""return_mapscript.shapeObj_getValue(self,i)
[المستندات]defcontains(self,*args)->"int":r""" *Overload 1:* Returns :data:`MS_TRUE` if shape2 is entirely inside the shape, returns -1 on error and :data:`MS_FALSE` otherwise. Requires GEOS support. | *Overload 2:* Returns :data:`MS_TRUE` if the point is inside the shape, :data:`MS_FALSE` otherwise """return_mapscript.shapeObj_contains(self,*args)
[المستندات]defdistanceToPoint(self,point:"pointObj")->"double":r""" Returns the distance to point."""return_mapscript.shapeObj_distanceToPoint(self,point)
[المستندات]defdistanceToShape(self,shape:"shapeObj")->"double":r""" Returns the minimum distance to shape."""return_mapscript.shapeObj_distanceToShape(self,shape)
[المستندات]defgetLabelPoint(self)->"pointObj *":r""" Given a shape, return a point object suitable for labelling it."""return_mapscript.shapeObj_getLabelPoint(self)
[المستندات]defsetValue(self,i:"int",value:"char *")->"int":r""" Set the shape value at index i to value."""return_mapscript.shapeObj_setValue(self,i,value)
[المستندات]definitValues(self,numvalues:"int")->"void":r""" Allocates memory for the requested number of values."""return_mapscript.shapeObj_initValues(self,numvalues)
def_convert_item_values(self,property_values,property_types):""" **Python MapScript only** Convert an item value, which is always stored as a string, into a Python type, based on an attributes GML metadata type. These can be one of the following: ``Integer|Long|Real|Character|Date|Boolean`` """typed_values=[]forvalue,type_inzip(property_values,property_types):try:iftype_.lower()=="integer":value=int(value)eliftype_.lower()=="long":value=long(value)eliftype_.lower()=="real":value=float(value)else:passexceptValueError:passtyped_values.append(value)returntyped_values@propertydef__geo_interface__(self):bounds=self.boundsms_geom_type=self.type# see https://tools.ietf.org/html/rfc7946 for GeoJSON typesifms_geom_type==MS_SHAPE_POINTorms_geom_type==MS_SHP_POINTZorms_geom_type==MS_SHP_POINTM:geom_type="Point"elifms_geom_type==MS_SHP_MULTIPOINTZorms_geom_type==MS_SHP_MULTIPOINTM:geom_type="MultiPoint"elifms_geom_type==MS_SHAPE_LINEorms_geom_type==MS_SHP_ARCZorms_geom_type==MS_SHP_ARCM:ifself.numlines==1:geom_type="LineString"else:geom_type="MultiLineString"elifms_geom_type==MS_SHAPE_POLYGONorms_geom_type==MS_SHP_POLYGONZorms_geom_type==MS_SHP_POLYGONM:ifself.numlines==1:geom_type="Polygon"else:geom_type="MultiPolygon"elifms_geom_type==MS_SHAPE_NULL:returnNoneelse:raiseTypeError("Shape type {} not supported".format(geom_type))properties={}coords=[]# property names are stored at the layer level# https://github.com/mapserver/mapserver/issues/130property_values=[self.getValue(idx)foridxinrange(0,self.numvalues)]ifhasattr(self,"_item_definitions"):property_names,property_types=zip(*self._item_definitions)property_values=self._convert_item_values(property_values,property_types)else:property_names=[str(idx)foridxinrange(0,self.numvalues)]properties=dict(zip(property_names,property_values))foridxinrange(0,self.numlines):line=self.get(idx)geom=line.__geo_interface__coords.append(geom["coordinates"])return{"type":"Feature","bbox":(bounds.minx,bounds.miny,bounds.maxx,bounds.maxy),"properties":properties,"geometry":{"type":geom_type,"coordinates":coords}}@propertydefitemdefinitions(self):returnself._item_definitions@itemdefinitions.setterdefitemdefinitions(self,item_definitions):self._item_definitions=item_definitions# Register shapeObj in _mapscript:_mapscript.shapeObj_swigregister(shapeObj)MS_NOERR=_mapscript.MS_NOERRMS_IOERR=_mapscript.MS_IOERRMS_MEMERR=_mapscript.MS_MEMERRMS_TYPEERR=_mapscript.MS_TYPEERRMS_SYMERR=_mapscript.MS_SYMERRMS_REGEXERR=_mapscript.MS_REGEXERRMS_TTFERR=_mapscript.MS_TTFERRMS_DBFERR=_mapscript.MS_DBFERRMS_IDENTERR=_mapscript.MS_IDENTERRMS_EOFERR=_mapscript.MS_EOFERRMS_PROJERR=_mapscript.MS_PROJERRMS_MISCERR=_mapscript.MS_MISCERRMS_CGIERR=_mapscript.MS_CGIERRMS_WEBERR=_mapscript.MS_WEBERRMS_IMGERR=_mapscript.MS_IMGERRMS_HASHERR=_mapscript.MS_HASHERRMS_JOINERR=_mapscript.MS_JOINERRMS_NOTFOUND=_mapscript.MS_NOTFOUNDMS_SHPERR=_mapscript.MS_SHPERRMS_PARSEERR=_mapscript.MS_PARSEERRMS_UNUSEDERR=_mapscript.MS_UNUSEDERRMS_OGRERR=_mapscript.MS_OGRERRMS_QUERYERR=_mapscript.MS_QUERYERRMS_WMSERR=_mapscript.MS_WMSERRMS_WMSCONNERR=_mapscript.MS_WMSCONNERRMS_ORACLESPATIALERR=_mapscript.MS_ORACLESPATIALERRMS_WFSERR=_mapscript.MS_WFSERRMS_WFSCONNERR=_mapscript.MS_WFSCONNERRMS_MAPCONTEXTERR=_mapscript.MS_MAPCONTEXTERRMS_HTTPERR=_mapscript.MS_HTTPERRMS_CHILDERR=_mapscript.MS_CHILDERRMS_WCSERR=_mapscript.MS_WCSERRMS_GEOSERR=_mapscript.MS_GEOSERRMS_RECTERR=_mapscript.MS_RECTERRMS_TIMEERR=_mapscript.MS_TIMEERRMS_GMLERR=_mapscript.MS_GMLERRMS_SOSERR=_mapscript.MS_SOSERRMS_NULLPARENTERR=_mapscript.MS_NULLPARENTERRMS_AGGERR=_mapscript.MS_AGGERRMS_OWSERR=_mapscript.MS_OWSERRMS_OGLERR=_mapscript.MS_OGLERRMS_RENDERERERR=_mapscript.MS_RENDERERERRMS_V8ERR=_mapscript.MS_V8ERRMS_OGCAPIERR=_mapscript.MS_OGCAPIERRMS_FGBERR=_mapscript.MS_FGBERRMS_NUMERRORCODES=_mapscript.MS_NUMERRORCODESMESSAGELENGTH=_mapscript.MESSAGELENGTHROUTINELENGTH=_mapscript.ROUTINELENGTHMS_ERROR_LANGUAGE=_mapscript.MS_ERROR_LANGUAGEclasserrorObj(object):r""" This class allows inspection of the MapServer error stack. Instances of errorObj are created internally by MapServer as errors happen. Errors are managed as a chained list with the first item being the most recent error. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprcode:"int"=property(_mapscript.errorObj_code_get,_mapscript.errorObj_code_set,doc=r""" MapServer error code such as :data:`MS_IMGERR`""")routine:"char [64]"=property(_mapscript.errorObj_routine_get,_mapscript.errorObj_routine_set,doc=r""" MapServer function in which the error was set""")message:"char [2048]"=property(_mapscript.errorObj_message_get,_mapscript.errorObj_message_set,doc=r""" Context-dependent error message""")isreported:"int"=property(_mapscript.errorObj_isreported_get,_mapscript.errorObj_isreported_set,doc=r""" :data:`MS_TRUE` or :data:`MS_FALSE` flag indicating if the error has been output """)errorcount:"int"=property(_mapscript.errorObj_errorcount_get,_mapscript.errorObj_errorcount_set,doc=r""" Number of subsequent errors""")
[المستندات]def__init__(self):r""" Create a new instance"""_mapscript.errorObj_swiginit(self,_mapscript.new_errorObj())
__swig_destroy__=_mapscript.delete_errorObj
[المستندات]defnext(self)->"errorObj *":r""" Returns the next error in the stack or NULL if the end has been reached"""return_mapscript.errorObj_next(self)
# Register errorObj in _mapscript:_mapscript.errorObj_swigregister(errorObj)defmsGetErrorObj()->"errorObj *":r"""Get the MapServer error object"""return_mapscript.msGetErrorObj()defmsResetErrorList()->"void":r"""Clear the list of error objects"""return_mapscript.msResetErrorList()defmsGetVersion()->"char *":r""" Returns a string containing MapServer version information, and details on what optional components are built in - the same report as produced by ``mapserv -v`` """return_mapscript.msGetVersion()defmsGetVersionInt()->"int":r""" Returns the MapServer version number (x.y.z) as an integer (x*10000 + y*100 + z) e.g. V7.4.2 would return 70402 """return_mapscript.msGetVersionInt()defmsGetErrorString(delimiter:"char const *")->"char *":r"""Return a string of all errors"""return_mapscript.msGetErrorString(delimiter)MS_DEBUGLEVEL_ERRORSONLY=_mapscript.MS_DEBUGLEVEL_ERRORSONLYMS_DEBUGLEVEL_DEBUG=_mapscript.MS_DEBUGLEVEL_DEBUGMS_DEBUGLEVEL_TUNING=_mapscript.MS_DEBUGLEVEL_TUNINGMS_DEBUGLEVEL_V=_mapscript.MS_DEBUGLEVEL_VMS_DEBUGLEVEL_VV=_mapscript.MS_DEBUGLEVEL_VVMS_DEBUGLEVEL_VVV=_mapscript.MS_DEBUGLEVEL_VVVMS_DEBUGLEVEL_DEVDEBUG=_mapscript.MS_DEBUGLEVEL_DEVDEBUGSHX_BUFFER_PAGE=_mapscript.SHX_BUFFER_PAGEMS_SHAPEFILE_POINT=_mapscript.MS_SHAPEFILE_POINTMS_SHAPEFILE_ARC=_mapscript.MS_SHAPEFILE_ARCMS_SHAPEFILE_POLYGON=_mapscript.MS_SHAPEFILE_POLYGONMS_SHAPEFILE_MULTIPOINT=_mapscript.MS_SHAPEFILE_MULTIPOINTMS_SHP_POINTZ=_mapscript.MS_SHP_POINTZMS_SHP_ARCZ=_mapscript.MS_SHP_ARCZMS_SHP_POLYGONZ=_mapscript.MS_SHP_POLYGONZMS_SHP_MULTIPOINTZ=_mapscript.MS_SHP_MULTIPOINTZMS_SHP_POINTM=_mapscript.MS_SHP_POINTMMS_SHP_ARCM=_mapscript.MS_SHP_ARCMMS_SHP_POLYGONM=_mapscript.MS_SHP_POLYGONMMS_SHP_MULTIPOINTM=_mapscript.MS_SHP_MULTIPOINTMclassDBFInfo(object):r"""An object containing information about a DBF file"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnRecords:"int"=property(_mapscript.DBFInfo_nRecords_get,doc=r""" Number of records in the DBF""")nFields:"int"=property(_mapscript.DBFInfo_nFields_get,doc=r""" Number of fields in the DBF""")
[المستندات]defgetFieldName(self,iField:"int")->"char *":r""" Get the field name of a DBF using the field index ``iField``"""return_mapscript.DBFInfo_getFieldName(self,iField)
[المستندات]defgetFieldWidth(self,iField:"int")->"int":r""" Get the field width of a DBF using the field index ``iField``"""return_mapscript.DBFInfo_getFieldWidth(self,iField)
[المستندات]defgetFieldDecimals(self,iField:"int")->"int":r""" Get the field decimals of a DBF using the field index ``iField``"""return_mapscript.DBFInfo_getFieldDecimals(self,iField)
[المستندات]defgetFieldType(self,iField:"int")->"int":r""" Get the field type of a DBF using the field index ``iField``. Field types are one of FTString, FTInteger, FTDouble, FTInvalid """return_mapscript.DBFInfo_getFieldType(self,iField)
__swig_destroy__=_mapscript.delete_DBFInfo# Register DBFInfo in _mapscript:_mapscript.DBFInfo_swigregister(DBFInfo)FTString=_mapscript.FTStringFTInteger=_mapscript.FTIntegerFTDouble=_mapscript.FTDoubleFTInvalid=_mapscript.FTInvalidclassshapefileObj(object):r""" An object representing a Shapefile. There is no write access to this object using MapScript. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprtype:"int"=property(_mapscript.shapefileObj_type_get,doc=r""" Shapefile type - see mapshape.h for values of type""")numshapes:"int"=property(_mapscript.shapefileObj_numshapes_get,doc=r""" Number of shapes""")bounds:"rectObj"=property(_mapscript.shapefileObj_bounds_get,doc=r""" Extent of shapes""")
[المستندات]def__init__(self,filename:"char *",type:"int"=-1):r""" Create a new instance. Omit the type argument or use a value of -1 to open an existing shapefile. Type should be one of :data:`MS_SHAPEFILE_POINT`, :data:`MS_SHAPEFILE_ARC`, :data:`MS_SHAPEFILE_POLYGON` or :data:`MS_SHAPEFILE_MULTIPOINT` """_mapscript.shapefileObj_swiginit(self,_mapscript.new_shapefileObj(filename,type))
__swig_destroy__=_mapscript.delete_shapefileObj
[المستندات]defget(self,i:"int",shape:"shapeObj")->"int":r""" Get the shapefile feature from index i and store it in shape. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapefileObj_get(self,i,shape)
[المستندات]defgetShape(self,i:"int")->"shapeObj *":r""" Returns the shapefile feature at index i. More efficient than get."""return_mapscript.shapefileObj_getShape(self,i)
[المستندات]defgetPoint(self,i:"int",point:"pointObj")->"int":r""" Returns the point feature at index i and store it in pointObj."""return_mapscript.shapefileObj_getPoint(self,i,point)
[المستندات]defgetTransformed(self,map:"mapObj",i:"int",shape:"shapeObj")->"int":r""" Returns the feature at index i, simplify it, and store it in shape. Uses the map extent and cellsize for simplification. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapefileObj_getTransformed(self,map,i,shape)
[المستندات]defgetExtent(self,i:"int",rect:"rectObj")->"void":r""" Retrieve a shape's bounding box by index and stores it in rect."""return_mapscript.shapefileObj_getExtent(self,i,rect)
[المستندات]defadd(self,shape:"shapeObj")->"int":r""" Appends a shape to the open shapefile. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapefileObj_add(self,shape)
[المستندات]defaddPoint(self,point:"pointObj")->"int":r""" Appends a point to the open shapefile. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.shapefileObj_addPoint(self,point)
[المستندات]defgetDBF(self)->"DBFInfo *":r""" Returns a :class:`DBFInfo` object containing information on the associated DBF"""return_mapscript.shapefileObj_getDBF(self)
# Register shapefileObj in _mapscript:_mapscript.shapefileObj_swigregister(shapefileObj)wkp_none=_mapscript.wkp_nonewkp_lonlat=_mapscript.wkp_lonlatwkp_gmerc=_mapscript.wkp_gmercclassprojectionObj(object):r""" The :ref:`PROJECTION <projection>` object MapServer's Maps and Layers have Projection attributes, and these are C projectionObj structures, but are not directly exposed by the mapscript module """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumargs:"int"=property(_mapscript.projectionObj_numargs_get,doc=r""" Actual number of projection args""")generation_number:"unsigned short"=property(_mapscript.projectionObj_generation_number_get,doc=r""" To be incremented when the content of the object changes, so that a reprojector can be invalidated """)wellknownprojection:"int"=property(_mapscript.projectionObj_wellknownprojection_get,_mapscript.projectionObj_wellknownprojection_set,doc=r""" One of ``wkp_none 0``, ``wkp_lonlat 1``, or ``wkp_gmerc 2`` """)
[المستندات]def__init__(self,proj4:"char *"):r""" Create new instance of projectionObj. Input parameter proj4 is a PROJ definition string such as 'init=EPSG:4269' """_mapscript.projectionObj_swiginit(self,_mapscript.new_projectionObj(proj4))
__swig_destroy__=_mapscript.delete_projectionObj
[المستندات]defsetWKTProjection(self,wkt:"char *")->"int":r""" Update the projectionObj using an OGC WKT definition Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.projectionObj_setWKTProjection(self,wkt)
[المستندات]defgetUnits(self)->"int":r""" Returns the units of a projection object. Returns -1 on error."""return_mapscript.projectionObj_getUnits(self)
# Register projectionObj in _mapscript:_mapscript.projectionObj_swigregister(projectionObj)classreprojectionObj(object):r""" A holder object for projection coordinate transformations, introduced in RFC 126. This allows caching of reprojections improving performance. """thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprgeneration_number_in:"unsigned short"=property(_mapscript.reprojectionObj_generation_number_in_get,_mapscript.reprojectionObj_generation_number_in_set,doc=r""" A counter that is incremented when the input projectionObj changes """)generation_number_out:"unsigned short"=property(_mapscript.reprojectionObj_generation_number_out_get,_mapscript.reprojectionObj_generation_number_out_set,doc=r""" A counter that is incremented when the output projectionObj changes """)
[المستندات]def__init__(self,_in:"projectionObj",out:"projectionObj"):r""" Create new instance of reprojectionObj. Input parameters are two projectionsObj's - in and out."""_mapscript.reprojectionObj_swiginit(self,_mapscript.new_reprojectionObj(_in,out))
__swig_destroy__=_mapscript.delete_reprojectionObj# Register reprojectionObj in _mapscript:_mapscript.reprojectionObj_swigregister(reprojectionObj)MS_SYMBOL_SIMPLE=_mapscript.MS_SYMBOL_SIMPLEMS_SYMBOL_VECTOR=_mapscript.MS_SYMBOL_VECTORMS_SYMBOL_ELLIPSE=_mapscript.MS_SYMBOL_ELLIPSEMS_SYMBOL_PIXMAP=_mapscript.MS_SYMBOL_PIXMAPMS_SYMBOL_TRUETYPE=_mapscript.MS_SYMBOL_TRUETYPEMS_SYMBOL_HATCH=_mapscript.MS_SYMBOL_HATCHMS_SYMBOL_SVG=_mapscript.MS_SYMBOL_SVGMS_SYMBOL_ALLOCSIZE=_mapscript.MS_SYMBOL_ALLOCSIZEMS_MAXVECTORPOINTS=_mapscript.MS_MAXVECTORPOINTSMS_MAXPATTERNLENGTH=_mapscript.MS_MAXPATTERNLENGTHMS_IMAGECACHESIZE=_mapscript.MS_IMAGECACHESIZEclasscolorObj(object):r"""An object representing a color."""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprred:"int"=property(_mapscript.colorObj_red_get,_mapscript.colorObj_red_set,doc=r"""Red component of color in range [0-255]""")green:"int"=property(_mapscript.colorObj_green_get,_mapscript.colorObj_green_set,doc=r"""Green component of color in range [0-255]""")blue:"int"=property(_mapscript.colorObj_blue_get,_mapscript.colorObj_blue_set,doc=r"""Blue component of color in range [0-255]""")alpha:"int"=property(_mapscript.colorObj_alpha_get,_mapscript.colorObj_alpha_set,doc=r"""Alpha (opacity) component of color in range [0-255]""")
[المستندات]def__init__(self,red:"int"=0,green:"int"=0,blue:"int"=0,alpha:"int"=255):r"""An object representing a color."""_mapscript.colorObj_swiginit(self,_mapscript.new_colorObj(red,green,blue,alpha))
__swig_destroy__=_mapscript.delete_colorObj
[المستندات]defsetRGB(self,red:"int",green:"int",blue:"int",alpha:"int"=255)->"int":r""" Set all four RGBA components. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE`"""return_mapscript.colorObj_setRGB(self,red,green,blue,alpha)
[المستندات]defsetHex(self,psHexColor:"char *")->"int":r""" Set the color to values specified in case-independent hexadecimal notation. hex must start with a '#' followed by three or four hex bytes, e.g. '#ffffff' or '#ffffffff'. If only three hex bytes are supplied, the alpha will be set to 255. Calling setHex('#ffffff') therefore assigns values of 255 to each color component, including the alpha. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.colorObj_setHex(self,psHexColor)
[المستندات]deftoHex(self)->"char *":r""" Complement to setHex, returning a hexadecimal representation of the color components. If alpha is 255 then this is three hex bytes '#rrggbb', otherwise four hex bytes '#rrggbbaa' """return_mapscript.colorObj_toHex(self)
# Register colorObj in _mapscript:_mapscript.colorObj_swigregister(colorObj)classsymbolObj(object):r"""The :ref:`SYMBOL <symbol>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprrefcount:"int"=property(_mapscript.symbolObj_refcount_get,doc=r""" Reference counter""")numpoints:"int"=property(_mapscript.symbolObj_numpoints_get,doc=r""" Number of points of a vector symbol""")imagepath:"char *"=property(_mapscript.symbolObj_imagepath_get,doc=r""" Path to pixmap file - see :ref:`IMAGE <mapfile-symbol-image>` """)name:"char *"=property(_mapscript.symbolObj_name_get,_mapscript.symbolObj_name_set,doc=r""" Symbol name - see :ref:`NAME <mapfile-symbol-name>`""")type:"int"=property(_mapscript.symbolObj_type_get,_mapscript.symbolObj_type_set,doc=r""" See :ref:`TYPE <mapfile-symbol-type>`""")inmapfile:"int"=property(_mapscript.symbolObj_inmapfile_get,_mapscript.symbolObj_inmapfile_set,doc=r""" Boolean value for writing - if set to :data:`TRUE`, the symbol will be saved inside the Mapfile. Added in MapServer 5.6.1 """)sizex:"double"=property(_mapscript.symbolObj_sizex_get,_mapscript.symbolObj_sizex_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")sizey:"double"=property(_mapscript.symbolObj_sizey_get,_mapscript.symbolObj_sizey_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")minx:"double"=property(_mapscript.symbolObj_minx_get,_mapscript.symbolObj_minx_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")miny:"double"=property(_mapscript.symbolObj_miny_get,_mapscript.symbolObj_miny_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")maxx:"double"=property(_mapscript.symbolObj_maxx_get,_mapscript.symbolObj_maxx_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")maxy:"double"=property(_mapscript.symbolObj_maxy_get,_mapscript.symbolObj_maxy_set,doc=r""" :data:`MS_SYMBOL_VECTOR` and :data:`MS_SYMBOL_ELLIPSE` option""")filled:"int"=property(_mapscript.symbolObj_filled_get,_mapscript.symbolObj_filled_set,doc=r""" :data:`MS_TRUE` or :data:`MS_FALSE` - see :ref:`FILLED <mapfile-symbol-filled>` """)anchorpoint_x:"double"=property(_mapscript.symbolObj_anchorpoint_x_get,_mapscript.symbolObj_anchorpoint_x_set,doc=r""" See :ref:`ANCHORPOINT <mapfile-symbol-anchorpoint>`""")anchorpoint_y:"double"=property(_mapscript.symbolObj_anchorpoint_y_get,_mapscript.symbolObj_anchorpoint_y_set,doc=r""" See :ref:`ANCHORPOINT <mapfile-symbol-anchorpoint>`""")transparent:"int"=property(_mapscript.symbolObj_transparent_get,_mapscript.symbolObj_transparent_set,doc=r""" **TODO** Remove""")transparentcolor:"int"=property(_mapscript.symbolObj_transparentcolor_get,_mapscript.symbolObj_transparentcolor_set,doc=r""" **TODO** Remove""")character:"char *"=property(_mapscript.symbolObj_character_get,_mapscript.symbolObj_character_set,doc=r""" For TrueType symbols - see :ref:`CHARACTER <mapfile-symbol-character>` """)font:"char *"=property(_mapscript.symbolObj_font_get,_mapscript.symbolObj_font_set,doc=r""" For TrueType symbols - see :ref:`FONT <mapfile-symbol-font>`""")
[المستندات]def__init__(self,symbolname:"char *",imagefile:"char const *"=None):r""" Create new default :class:`symbolObj` named ``symbolname``. If ``imagefile`` is specified, then the symbol will be of type :data:`MS_SYMBOL_PIXMAP`. """_mapscript.symbolObj_swiginit(self,_mapscript.new_symbolObj(symbolname,imagefile))
__swig_destroy__=_mapscript.delete_symbolObj
[المستندات]defsetImagepath(self,imagefile:"char const *")->"int":r""" Sets the ``imagefile`` path for a :data:`MS_SYMBOL_PIXMAP`. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.symbolObj_setImagepath(self,imagefile)
[المستندات]defsetPoints(self,line:"lineObj")->"int":r""" Sets the symbol points from the points of line. Returns the updated number of points."""return_mapscript.symbolObj_setPoints(self,line)
[المستندات]defgetPoints(self)->"lineObj *":r""" Returns the symbol points as a :class:`lineObj`."""return_mapscript.symbolObj_getPoints(self)
[المستندات]defgetImage(self,input_format:"outputFormatObj")->"imageObj *":r""" Returns a pixmap symbol's imagery as an :class:`imageObj`."""return_mapscript.symbolObj_getImage(self,input_format)
[المستندات]defsetImage(self,image:"imageObj")->"int":r""" Set a pixmap symbol's imagery from image. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.symbolObj_setImage(self,image)
# Register symbolObj in _mapscript:_mapscript.symbolObj_swigregister(symbolObj)MS_HASHSIZE=_mapscript.MS_HASHSIZEclasshashTableObj(object):r"""An object to store key-value pairs"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprnumitems:"int"=property(_mapscript.hashTableObj_numitems_get,doc=r""" **immutable** number of items""")
[المستندات]def__init__(self):r""" Create a new instance"""_mapscript.hashTableObj_swiginit(self,_mapscript.new_hashTableObj())
__swig_destroy__=_mapscript.delete_hashTableObj
[المستندات]defset(self,key:"char *",value:"char *")->"int":r""" Set a hash item given key and value. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.hashTableObj_set(self,key,value)
[المستندات]defget(self,key:"char *",default_value:"char *"=None)->"char *":r""" Returns the value of the item by its key, or default if the key does not exist"""return_mapscript.hashTableObj_get(self,key,default_value)
[المستندات]defremove(self,key:"char *")->"int":r""" Removes the hash item by its key. Returns :data:`MS_SUCCESS` or :data:`MS_FAILURE` """return_mapscript.hashTableObj_remove(self,key)
[المستندات]defclear(self)->"void":r""" Empties the table of all items"""return_mapscript.hashTableObj_clear(self)
[المستندات]defnextKey(self,prevkey:"char *"=None)->"char const *":r""" Returns the name of the next key or NULL if there is no valid next key. If the input key is NULL, returns the first key """return_mapscript.hashTableObj_nextKey(self,prevkey)
[المستندات]defkeys(self):""" **Python-only**. In Python MapScript the ``hashTableObj`` can be used and accessed as a dictionary. The ``keys`` method returns a view of all the keys in the ``hashTableObj``. """keys=[]k=NonewhileTrue:k=self.nextKey(k)ifk:keys.append(k)else:breakreturnkeys
# Register hashTableObj in _mapscript:_mapscript.hashTableObj_swigregister(hashTableObj)MS_CONFIG_SECTION=_mapscript.MS_CONFIG_SECTIONMS_CONFIG_SECTION_ENV=_mapscript.MS_CONFIG_SECTION_ENVMS_CONFIG_SECTION_MAPS=_mapscript.MS_CONFIG_SECTION_MAPSMS_CONFIG_SECTION_PLUGINS=_mapscript.MS_CONFIG_SECTION_PLUGINSclassconfigObj(object):r"""The :ref:`CONFIG <config>` object"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprenv:"hashTableObj"=property(_mapscript.configObj_env_get,_mapscript.configObj_env_set,doc=r""" Key-value pairs of environment variables and values""")maps:"hashTableObj"=property(_mapscript.configObj_maps_get,_mapscript.configObj_maps_set,doc=r""" Key-value pairs of Mapfile names and paths""")plugins:"hashTableObj"=property(_mapscript.configObj_plugins_get,_mapscript.configObj_plugins_set,doc=r""" Key-value pairs of plugin names and paths""")def__init__(self,filename:"char *"=None):r""" Create a new instance of :class:`configObj`"""_mapscript.configObj_swiginit(self,_mapscript.new_configObj(filename))__swig_destroy__=_mapscript.delete_configObj# Register configObj in _mapscript:_mapscript.configObj_swigregister(configObj)defmsLoadConfig(ms_config_file:"char const *")->"configObj *":return_mapscript.msLoadConfig(ms_config_file)defmsFreeConfig(config:"configObj")->"void":return_mapscript.msFreeConfig(config)defmsConfigGetEnv(config:"configObj",key:"char const *")->"char const *":return_mapscript.msConfigGetEnv(config,key)defmsConfigGetMap(config:"configObj",key:"char const *")->"char const *":return_mapscript.msConfigGetMap(config,key)defmsConfigGetPlugin(config:"configObj",key:"char const *")->"char const *":return_mapscript.msConfigGetPlugin(config,key)MS_DEFAULT_CGI_PARAMS=_mapscript.MS_DEFAULT_CGI_PARAMSMS_GET_REQUEST=_mapscript.MS_GET_REQUESTMS_POST_REQUEST=_mapscript.MS_POST_REQUESTclassOWSRequest(object):r"""Class for programming OWS services"""thisown=property(lambdax:x.this.own(),lambdax,v:x.this.own(v),doc="The membership flag")__repr__=_swig_reprNumParams:"int"=property(_mapscript.OWSRequest_NumParams_get,doc=r""" The number of querystring parameters""")type:"enum MS_REQUEST_TYPE"=property(_mapscript.OWSRequest_type_get,_mapscript.OWSRequest_type_set,doc=r""" A :ref:`request type constant<mapfile-constants-requesttype>`""")contenttype:"char *"=property(_mapscript.OWSRequest_contenttype_get,_mapscript.OWSRequest_contenttype_set,doc=r""" The content type of the request""")postrequest:"char *"=property(_mapscript.OWSRequest_postrequest_get,_mapscript.OWSRequest_postrequest_set,doc=r""" Any POST data request""")httpcookiedata:"char *"=property(_mapscript.OWSRequest_httpcookiedata_get,_mapscript.OWSRequest_httpcookiedata_set,doc=r""" Any cookie data associated with the request""")
[المستندات]def__init__(self):r""" Not associated with other mapscript classes. Serves as a message intermediary between an application and MapServer's OWS capabilities. Using it permits creation of lightweight WMS services. """_mapscript.OWSRequest_swiginit(self,_mapscript.new_OWSRequest())
__swig_destroy__=_mapscript.delete_OWSRequest
[المستندات]defloadParams(self)->"int":r""" Initializes the OWSRequest object from the cgi environment variables ``REQUEST_METHOD``, ``QUERY_STRING`` and ``HTTP_COOKIE``. Returns the number of name/value pairs collected. Warning: most errors will result in a process exit! """return_mapscript.OWSRequest_loadParams(self)
[المستندات]defloadParamsFromURL(self,url:"char const *")->"int":r""" Initializes the OWSRequest object from the provided URL which is treated like a ``QUERY_STRING``. Note that ``REQUEST_METHOD=GET`` and no post data is assumed in this case. """return_mapscript.OWSRequest_loadParamsFromURL(self,url)
[المستندات]defloadParamsFromPost(self,postData:"char *",url:"char const *")->"int":r""" Initializes the OWSRequest object with POST data, along with a the provided URL which is treated like a ``QUERY_STRING``. Note that ``REQUEST_METHOD=POST`` and the caller is responsible for setting the correct content type e.g. ``req.contenttype = "application/xml"`` """return_mapscript.OWSRequest_loadParamsFromPost(self,postData,url)
[المستندات]defsetParameter(self,name:"char *",value:"char *")->"void":r""" Set a request parameter. For example: request.setParameter('REQUEST', 'GetMap') request.setParameter('BBOX', '-107.0,40.0,-106.0,41.0') """return_mapscript.OWSRequest_setParameter(self,name,value)
[المستندات]defaddParameter(self,name:"char *",value:"char *")->"void":r""" Add a request parameter, even if the parameter key was previously set. This is useful when multiple parameters with the same key are required. For example: request.addParameter('SIZE', 'x(100)') request.addParameter('SIZE', 'y(100)') """return_mapscript.OWSRequest_addParameter(self,name,value)
[المستندات]defgetName(self,index:"int")->"char *":r""" Return the name of the parameter at ``index`` in the request's array of parameter names. """return_mapscript.OWSRequest_getName(self,index)
[المستندات]defgetValue(self,index:"int")->"char *":r""" Return the value of the parameter at ``index`` in the request's array of parameter values. """return_mapscript.OWSRequest_getValue(self,index)
[المستندات]defgetValueByName(self,name:"char const *")->"char *":r""" Return the value associated with the parameter ``name``"""return_mapscript.OWSRequest_getValueByName(self,name)
# Register OWSRequest in _mapscript:_mapscript.OWSRequest_swigregister(OWSRequest)defmsConnPoolCloseUnreferenced()->"void":r""" Some memory leaks can be avoided by closing any unreferenced connections from time to time. See https://github.com/mapserver/mapserver/issues/1661 """return_mapscript.msConnPoolCloseUnreferenced()defmsIO_resetHandlers()->"void":r""" Resets the default stdin and stdout handlers in place of buffer based handlers."""return_mapscript.msIO_resetHandlers()defmsIO_installStdoutToBuffer()->"void":r""" Installs a mapserver IO handler directing future stdout output to a memory buffer."""return_mapscript.msIO_installStdoutToBuffer()defmsIO_installStdinFromBuffer()->"void":r""" Installs a mapserver IO handler directing future stdin reading (i.e. post request capture) to come from a buffer. """return_mapscript.msIO_installStdinFromBuffer()defmsIO_stripStdoutBufferContentType()->"char const *":r""" Strip the Content-type header off the stdout buffer if it has one, and if a content type is found it is returned (otherwise NULL/None/etc). """return_mapscript.msIO_stripStdoutBufferContentType()defmsIO_stripStdoutBufferContentHeaders()->"void":r""" Strip all Content-* headers off the stdout buffer if it has any."""return_mapscript.msIO_stripStdoutBufferContentHeaders()defmsIO_getStdoutBufferString()->"char const *":r""" Fetch the current stdout buffer contents as a string. This method does not clear the buffer. """return_mapscript.msIO_getStdoutBufferString()defmsIO_getStdoutBufferBytes()->"gdBuffer":r""" Fetch the current stdout buffer contents as a binary buffer. The exact form of this buffer will vary by MapScript language (e/g. string in Python, byte[] array in Java and C#, unhandled in Perl). """return_mapscript.msIO_getStdoutBufferBytes()defmsIO_getAndStripStdoutBufferMimeHeaders()->"hashTableObj *":r""" Strip off all MIME headers and return them in a hashTableObj"""return_mapscript.msIO_getAndStripStdoutBufferMimeHeaders()deffromstring(data,mappath=None,configpath=None):"""Creates map objects from mapfile strings. Parameters ========== data : string Mapfile in a string. mappath : string Optional root map path, enabling relative paths in mapfile. Example ======= >>> mo = fromstring("MAP\nNAME 'test'\nEND") >>> mo.name 'test' """importreifre.search(r"^\s*MAP",data,re.I):# create a config object if a path is suppliedifconfigpath:config=configObj(configpath)else:config=NonereturnmsLoadMapFromString(data,mappath,config)elifre.search(r"^\s*LAYER",data,re.I):ob=layerObj()ob.updateFromString(data)returnobelifre.search(r"^\s*CLASS",data,re.I):ob=classObj()ob.updateFromString(data)returnobelifre.search(r"^\s*STYLE",data,re.I):ob=styleObj()ob.updateFromString(data)returnobelse:raiseValueError("No map, layer, class, or style found. Can not load from provided string")