1 Star 0 Fork 1

cnxd365 / PyMICAPS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
UV.py 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
# -*- coding: utf-8 -*-
#
# Author: Liu xianyao
# Email: flashlxy@qq.com
# Update: 2017-04-11
# Copyright: ©江西省气象台 2017
# Version: 2.0.20170411
from __future__ import print_function
from Projection import Projection
class UV:
def __init__(self, root):
leaf = root.find("UV")
if leaf is None:
return
self.stream = Projection.leaf_to_bool(leaf, 'Stream', False)
self.density = Projection.leaf_to_list(leaf, 'Density', [1, 1])
self.barbsgrid = Projection.leaf_to_list(leaf, 'BarbsGrid', [31, 31])
self.color = Projection.leaf_to_string(leaf, 'Color', 'k')
self.onspeed = Projection.leaf_to_bool(leaf, 'OnSpeed', False)
self.wholecilp = Projection.leaf_to_bool(leaf, 'WholeClip', False)
self.oncolor = Projection.leaf_to_bool(leaf, 'OnColor', False)
self.linewidth = Projection.leaf_to_float(leaf, 'LineWidth', 1.)
self.scale = Projection.leaf_to_int(leaf, 'Scale', 700)
self.markscalelength = Projection.leaf_to_float(leaf, 'MarkScaleLength', 12.)
self.barbs = Projection.leaf_to_bool(leaf, 'Barbs', False)
self.length = Projection.leaf_to_int(leaf, 'Length', 1)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/cnxd365/PyMICAPS.git
git@gitee.com:cnxd365/PyMICAPS.git
cnxd365
PyMICAPS
PyMICAPS
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891