📄 mapscript.py
字号:
def loadMapContext(*args): return _mapscript.mapObj_loadMapContext(*args) def moveLayerUp(*args): return _mapscript.mapObj_moveLayerUp(*args) def moveLayerDown(*args): return _mapscript.mapObj_moveLayerDown(*args) def getLayersDrawingOrder(*args): return _mapscript.mapObj_getLayersDrawingOrder(*args) def setLayersDrawingOrder(*args): return _mapscript.mapObj_setLayersDrawingOrder(*args) def setConfigOption(*args): return _mapscript.mapObj_setConfigOption(*args) def getConfigOption(*args): return _mapscript.mapObj_getConfigOption(*args) def applyConfigOptions(*args): return _mapscript.mapObj_applyConfigOptions(*args) def applySLD(*args): return _mapscript.mapObj_applySLD(*args) def applySLDURL(*args): return _mapscript.mapObj_applySLDURL(*args) def generateSLD(*args): return _mapscript.mapObj_generateSLD(*args) def processTemplate(*args): return _mapscript.mapObj_processTemplate(*args) def processLegendTemplate(*args): return _mapscript.mapObj_processLegendTemplate(*args) def processQueryTemplate(*args): return _mapscript.mapObj_processQueryTemplate(*args) def getOutputFormatByName(*args): return _mapscript.mapObj_getOutputFormatByName(*args) def appendOutputFormat(*args): return _mapscript.mapObj_appendOutputFormat(*args) def removeOutputFormat(*args): return _mapscript.mapObj_removeOutputFormat(*args) def loadOWSParameters(*args): return _mapscript.mapObj_loadOWSParameters(*args) def zoomPoint(*args): return _mapscript.mapObj_zoomPoint(*args) def zoomRectangle(*args): return _mapscript.mapObj_zoomRectangle(*args) def zoomScale(*args): return _mapscript.mapObj_zoomScale(*args) def getLayerOrder(*args): return _mapscript.mapObj_getLayerOrder(*args) def setLayerOrder(*args): return _mapscript.mapObj_setLayerOrder(*args) def getSize(*args): return _mapscript.mapObj_getSize(*args) def get_height(self): return self.getSize()[1] # <-- second member is the height def get_width(self): return self.getSize()[0] # <-- first member is the width def set_height(self, value): return self.setSize(self.getSize()[0], value) def set_width(self, value): return self.setSize(value, self.getSize()[1]) width = property(get_width, set_width) height = property(get_height, set_height)class mapObjPtr(mapObj): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = mapObj_mapscript.mapObj_swigregister(mapObjPtr)class SVGObj(object): def __repr__(self): return "<C SVGObj instance at %s>" % (self.this,) map = property(_mapscript.SVGObj_map_get, _mapscript.SVGObj_map_set) stream = property(_mapscript.SVGObj_stream_get, _mapscript.SVGObj_stream_set) filename = property(_mapscript.SVGObj_filename_get, _mapscript.SVGObj_filename_set) streamclosed = property(_mapscript.SVGObj_streamclosed_get, _mapscript.SVGObj_streamclosed_set) compressed = property(_mapscript.SVGObj_compressed_get, _mapscript.SVGObj_compressed_set) def __init__(self, *args): newobj = _mapscript.new_SVGObj(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_mapscript.delete_SVGObj): try: if self.thisown: destroy(self) except: passclass SVGObjPtr(SVGObj): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = SVGObj_mapscript.SVGObj_swigregister(SVGObjPtr)class imageObj(object): def __repr__(self): return "<C imageObj instance at %s>" % (self.this,) width = property(_mapscript.imageObj_width_get) height = property(_mapscript.imageObj_height_get) imagepath = property(_mapscript.imageObj_imagepath_get) imageurl = property(_mapscript.imageObj_imageurl_get) format = property(_mapscript.imageObj_format_get, _mapscript.imageObj_format_set) renderer = property(_mapscript.imageObj_renderer_get, _mapscript.imageObj_renderer_set) size = property(_mapscript.imageObj_size_get, _mapscript.imageObj_size_set) def __del__(self, destroy=_mapscript.delete_imageObj): try: if self.thisown: destroy(self) except: pass def save(*args): return _mapscript.imageObj_save(*args) def getBytes(*args): return _mapscript.imageObj_getBytes(*args) def __init__(self, *args): newobj = _mapscript.new_imageObj(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def write(*args): return _mapscript.imageObj_write(*args) def saveToString(*args): return _mapscript.imageObj_saveToString(*args)class imageObjPtr(imageObj): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = imageObj_mapscript.imageObj_swigregister(imageObjPtr)class layerVTable(object): def __repr__(self): return "<C layerVTable instance at %s>" % (self.this,) LayerInitItemInfo = property(_mapscript.layerVTable_LayerInitItemInfo_get, _mapscript.layerVTable_LayerInitItemInfo_set) LayerFreeItemInfo = property(_mapscript.layerVTable_LayerFreeItemInfo_get, _mapscript.layerVTable_LayerFreeItemInfo_set) LayerOpen = property(_mapscript.layerVTable_LayerOpen_get, _mapscript.layerVTable_LayerOpen_set) LayerIsOpen = property(_mapscript.layerVTable_LayerIsOpen_get, _mapscript.layerVTable_LayerIsOpen_set) LayerWhichShapes = property(_mapscript.layerVTable_LayerWhichShapes_get, _mapscript.layerVTable_LayerWhichShapes_set) LayerNextShape = property(_mapscript.layerVTable_LayerNextShape_get, _mapscript.layerVTable_LayerNextShape_set) LayerGetShape = property(_mapscript.layerVTable_LayerGetShape_get, _mapscript.layerVTable_LayerGetShape_set) LayerClose = property(_mapscript.layerVTable_LayerClose_get, _mapscript.layerVTable_LayerClose_set) LayerGetItems = property(_mapscript.layerVTable_LayerGetItems_get, _mapscript.layerVTable_LayerGetItems_set) LayerGetExtent = property(_mapscript.layerVTable_LayerGetExtent_get, _mapscript.layerVTable_LayerGetExtent_set) LayerGetAutoStyle = property(_mapscript.layerVTable_LayerGetAutoStyle_get, _mapscript.layerVTable_LayerGetAutoStyle_set) LayerCloseConnection = property(_mapscript.layerVTable_LayerCloseConnection_get, _mapscript.layerVTable_LayerCloseConnection_set) LayerSetTimeFilter = property(_mapscript.layerVTable_LayerSetTimeFilter_get, _mapscript.layerVTable_LayerSetTimeFilter_set) LayerApplyFilterToLayer = property(_mapscript.layerVTable_LayerApplyFilterToLayer_get, _mapscript.layerVTable_LayerApplyFilterToLayer_set) LayerCreateItems = property(_mapscript.layerVTable_LayerCreateItems_get, _mapscript.layerVTable_LayerCreateItems_set) LayerGetNumFeatures = property(_mapscript.layerVTable_LayerGetNumFeatures_get, _mapscript.layerVTable_LayerGetNumFeatures_set) def __init__(self, *args): newobj = _mapscript.new_layerVTable(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_mapscript.delete_layerVTable): try: if self.thisown: destroy(self) except: passclass layerVTablePtr(layerVTable): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = layerVTable_mapscript.layerVTable_swigregister(layerVTablePtr)msSaveImage = _mapscript.msSaveImagemsFreeImage = _mapscript.msFreeImagemsSetup = _mapscript.msSetupmsCleanup = _mapscript.msCleanupclass rectObj(object): def __repr__(self): return "<C rectObj instance at %s>" % (self.this,) minx = property(_mapscript.rectObj_minx_get, _mapscript.rectObj_minx_set) miny = property(_mapscript.rectObj_miny_get, _mapscript.rectObj_miny_set) maxx = property(_mapscript.rectObj_maxx_get, _mapscript.rectObj_maxx_set) maxy = property(_mapscript.rectObj_maxy_get, _mapscript.rectObj_maxy_set) def __init__(self, *args): newobj = _mapscript.new_rectObj(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_mapscript.delete_rectObj): try: if self.thisown: destroy(self) except: pass def project(*args): return _mapscript.rectObj_project(*args) def fit(*args): return _mapscript.rectObj_fit(*args) def draw(*args): return _mapscript.rectObj_draw(*args) def toPolygon(*args): return _mapscript.rectObj_toPolygon(*args) def toString(*args): return _mapscript.rectObj_toString(*args) def __str__(self): return self.toString() def __contains__(self, item): item_type = str(type(item)) if item_type == "<class 'mapscript.pointObj'>": if item.x >= self.minx and item.x <= self.maxx \ and item.y >= self.miny and item.y <= self.maxy: return True else: return False else: raise TypeError, \ '__contains__ does not yet handle %s' % (item_type) class rectObjPtr(rectObj): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = rectObj_mapscript.rectObj_swigregister(rectObjPtr)class vectorObj(object): def __repr__(self): return "<C vectorObj instance at %s>" % (self.this,) x = property(_mapscript.vectorObj_x_get, _mapscript.vectorObj_x_set) y = property(_mapscript.vectorObj_y_get, _mapscript.vectorObj_y_set) def __init__(self, *args): newobj = _mapscript.new_vectorObj(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_mapscript.delete_vectorObj): try: if self.thisown: destroy(self) except: passclass vectorObjPtr(vectorObj): def __init__(self, this): self.this = this if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = vectorObj_mapscript.vectorObj_swigregister(vectorObjPtr)class pointObj(object): def __repr__(self): return "<C pointObj instance at %s>" % (self.this,) x = property(_mapscript.pointObj_x_get, _mapscript.pointObj_x_set) y = property(_mapscript.pointObj_y_get, _mapscript.pointObj_y_set) def __init__(self, *args): newobj = _mapscript.new_pointObj(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_mapscript.delete_pointObj): try: if self.thisown: destroy(self) except: pass def project(*args): return _mapscript.pointObj_project(*args) def draw(*args): return _mapscript.pointObj_draw(*args) def distanceToPoint(*args): return _mapscript.pointObj_distanceToPoint(*args) def distanceToSegment(*args): return _mapscript.pointObj_distanceToSegment(*args) def distanceToShape(*args): return _mapscript.pointObj_distanceToShape(*args) def setXY(*args): return _mapscript.pointObj_setXY(*args) def setX
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -