forked from flashlxy/PyMICAPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stations.py
30 lines (23 loc) · 1.11 KB
/
Stations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
# 站点类
# Author: Liu xianyao
# Email: flashlxy@qq.com
# Update: 2017-04-14
# Copyright: ©江西省气象台 2017
# Version: 1.1.20170414
from __future__ import print_function
from Micaps17Data import Micaps17Data
from Projection import Projection
class Stations:
def __init__(self, root):
leaf = root.find("Stations")
self.file = Projection.leaf_to_string(leaf, 'File')
self.visible = Projection.leaf_to_bool(leaf, 'Visible', False)
self.markstyle = Projection.leaf_to_list(leaf, 'MarkStyle', ['o', 'full'])
self.color = Projection.leaf_to_string(leaf, 'Color', 'k')
self.edgecolors = Projection.leaf_to_string(leaf, 'EdgeColors', 'k')
self.alpha = Projection.leaf_to_float(leaf, 'Alpha', 1.)
self.radius = Projection.leaf_to_float(leaf, 'Radius', 5)
self.font = Projection.leaf_to_list(leaf, 'Font', [18, 'myyh.ttc', 'bold', 'k'])
self.detax = Projection.leaf_to_float(leaf, 'Detax', 0.03)
self.micapsdata = Micaps17Data(self.file)