def stationmodel(self, smdata, **kwargs): """ Plot station model data on the map. :param smdata: (*StationModelData*) Station model data. :param surface: (*boolean*) Is surface data or not. Default is True. :param size: (*float*) Size of the station model symbols. Default is 12. :param proj: (*ProjectionInfo*) Map projection of the data. Default is None. :param order: (*int*) Z-order of created layer for display. :returns: (*VectoryLayer*) Station model VectoryLayer. """ proj = kwargs.pop('proj', None) size = kwargs.pop('size', 12) surface = kwargs.pop('surface', True) ls = LegendManage.createSingleSymbolLegendScheme(ShapeTypes.Point, Color.blue, size) layer = DrawMeteoData.createStationModelLayer(smdata, ls, 'stationmodel', surface) if (proj != None): layer.setProjInfo(proj) # Add layer isadd = kwargs.pop('isadd', True) if isadd: zorder = kwargs.pop('zorder', None) select = kwargs.pop('select', True) self.add_layer(layer, zorder, select) self.axes.setDrawExtent(layer.getExtent().clone()) self.axes.setExtent(layer.getExtent().clone()) return MILayer(layer)
lb.setDrawFill(False) lb.setOutlineColor(Color.blue) mapFrame.addLayer(countryLayer) #---- Create MeteoDataInfo object mdi = MeteoDataInfo() #---- Open a MICAPS data file fn = os.path.join(dataDir, 'MICAPS/10101414.000') mdi.openMICAPSData(fn) #---- Get station model data smdata = mdi.getStationModelData() #---- Create station info layer from the station model data layer = DrawMeteoData.createStationModelLayer(smdata, 'StationModel') #---- Add layer mapFrame.addLayer(layer) #--- Move layer to bottom mapFrame.moveLayer(layer, 0) #---- Add title title = mapLayout.addText('MeteoInfo script demo', 350, 30, 'Arial', 16) #---- Set layout map print 'Set layout map...' mapLayout.getActiveLayoutMap().setWidth(580) mapLayout.getActiveLayoutMap().zoomToExtentLonLatEx(Extent(70, 140, 15, 55))