├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── 23041808.024 ├── Border.py ├── ClipBorder.py ├── Contour.py ├── File.py ├── FnTime.py ├── HeadDesc.py ├── LICENSE ├── Legend.py ├── Main.py ├── Map.py ├── Micaps11Data.py ├── Micaps17Data.py ├── Micaps3Data.py ├── Micaps4Data.py ├── MicapsData.py ├── MicapsFile.py ├── MlabGridData.py ├── Picture.py ├── PolygonEx.py ├── Products.py ├── Projection.py ├── README.md ├── SampleData ├── 17011418.000 ├── 17032908.060 ├── 17033108.240 ├── 17033115.000 ├── 17041020.000 ├── 17041720.048 ├── data.txt ├── jxstation.txt └── readme.txt ├── Stations.py ├── Title.py ├── UV.py ├── _config.yml ├── borders ├── GA.txt ├── JA.txt ├── JD.txt ├── JJ.txt ├── JY.txt ├── LC.txt ├── NC.txt ├── PX.txt ├── SR.txt ├── XD.txt ├── YD.txt ├── YN.txt └── jxqy1.txt ├── config.xml ├── images ├── 1.png ├── 10.png ├── 11.png ├── 17032520.001.png ├── 2.png ├── 3.png ├── 4.png ├── 7.png ├── 9.png ├── debug.png ├── jz.png ├── lcc.png ├── readme.txt ├── sh.png ├── sh1.png ├── wx.png ├── xz.png └── zfb.png ├── jxlogo.png ├── lib ├── natgrid-0.2.1-cp37-cp37m-win_amd64.whl ├── nclcmaps-master.zip └── readme.txt ├── maskout.py └── shapefile ├── bou1_4p.dbf ├── bou1_4p.shp ├── bou1_4p.shx ├── bou2_4l.dbf ├── bou2_4l.shp ├── bou2_4l.shx ├── bou2_4p.dbf ├── bou2_4p.shp ├── bou2_4p.shx └── readme.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: 当前文件", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "D:\\Anaconda3\\python.exe" 3 | } -------------------------------------------------------------------------------- /Border.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170409 8 | from __future__ import print_function 9 | import re 10 | from datetime import datetime 11 | from matplotlib.path import Path 12 | from ClipBorder import ClipBorder 13 | from Projection import Projection 14 | 15 | 16 | class Border: 17 | """ 18 | 标题描述类 19 | """ 20 | 21 | def __init__(self, leaf): 22 | self.file = Projection.leaf_to_string(leaf, "File") 23 | self.filetype = str.upper(Projection.leaf_to_string(leaf, "Type", "shp")) 24 | self.draw = Projection.leaf_to_bool(leaf, "Draw", False) 25 | self.encoding = Projection.leaf_to_string(leaf, "Encoding", "utf-8") 26 | self.path = ( 27 | ClipBorder.readPath(self.file, 0) if self.filetype != "SHP" else None 28 | ) 29 | self.polygon = str.upper(Projection.leaf_to_string(leaf, "Polygon", "on")) 30 | # self.draw = Projection.leaf_to_bool(leaf, "Draw", False) 31 | self.linewidth = Projection.leaf_to_float(leaf, "LineWidth", 1) 32 | self.linecolor = Projection.leaf_to_string(leaf, "LineColor", "k") 33 | 34 | @staticmethod 35 | def readPolygon(filename): 36 | """ 37 | 从特定格式的文件中获取path 38 | :param filename: 特定的数据文件全名 39 | :return: path对象的一个实例 40 | """ 41 | try: 42 | file_object = open(filename) 43 | all_the_text = file_object.read().strip() 44 | file_object.close() 45 | poses = re.split(r"[,]+|[\s]+", all_the_text) 46 | lon = [float(p) for p in poses[0::2]] 47 | lat = [float(p) for p in poses[1::2]] 48 | path = Path(zip(lon, lat)) 49 | return path 50 | except Exception as err: 51 | print("【{0}】{1}-{2}".format(filename, err, datetime.now())) 52 | return None 53 | -------------------------------------------------------------------------------- /ClipBorder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170409 8 | from __future__ import print_function 9 | 10 | from datetime import datetime 11 | 12 | from matplotlib.path import Path 13 | 14 | import maskout 15 | from Projection import Projection 16 | 17 | 18 | class ClipBorder: 19 | """ 20 | 边界裁切类 21 | """ 22 | 23 | def __init__(self, leaf): 24 | start_pos = 0 25 | filehead = Projection.leaf_to_string(leaf, "File") 26 | filetype = Projection.leaf_to_string(leaf, "Type", "shp") 27 | code = Projection.leaf_to_list(leaf, "Code", [360000]) 28 | drawswitch = str.upper(Projection.leaf_to_string(leaf, "Draw", "off")) 29 | self.encoding = Projection.leaf_to_string(leaf, "Encoding", "utf-8") 30 | self.path = self.getPath( 31 | filehead=filehead, 32 | code=code, 33 | filetype=filetype, 34 | start_pos=start_pos, 35 | encoding=self.encoding, 36 | ) 37 | self.draw = str.upper(Projection.leaf_to_string(leaf, "Draw", "off")) 38 | self.using = Projection.leaf_to_bool(leaf, "Using", True) 39 | self.linewidth = Projection.leaf_to_float(leaf, "LineWidth", 1) 40 | self.linecolor = ( 41 | Projection.leaf_to_string(leaf, "LineColor", "k") 42 | if drawswitch == "ON" 43 | else "none" 44 | ) 45 | 46 | @staticmethod 47 | def getPath(filehead, code, filetype, start_pos, encoding=None): 48 | """ 49 | 根据文件类型获取path对象 50 | :param start_pos: 正文开始的位置,对txt文件有效 51 | :param filehead: 文件名 52 | :param code: 闭合区域行政区号-对shp文件有效 53 | :param filetype: 文件类型 54 | :return: path对象的一个实例 55 | """ 56 | if encoding is None: 57 | encoding = "utf-8" 58 | if filetype == "shp": 59 | path = maskout.getPathFromShp(filehead, code, encoding=encoding) 60 | else: 61 | path = ClipBorder.readPath(filehead, start_pos) 62 | return path 63 | 64 | @staticmethod 65 | def readPath(filename, start_pos=13): 66 | """ 67 | 从类似第9类micaps数据中获取path 68 | :param start_pos: 69 | :param filename: 数据文件全名 70 | :return: path对象的一个实例 71 | """ 72 | try: 73 | file_object = open(filename) 74 | all_the_text = file_object.read() 75 | file_object.close() 76 | poses = all_the_text.strip().split() 77 | lon = [float(p) for p in poses[start_pos::2]] 78 | lat = [float(p) for p in poses[start_pos + 1 :: 2]] 79 | path = Path(zip(lon, lat)) 80 | return path 81 | except Exception as err: 82 | print("【{0}】{1}-{2}".format(filename, err, datetime.now())) 83 | return None 84 | -------------------------------------------------------------------------------- /Contour.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170406 8 | from __future__ import print_function 9 | from Projection import Projection 10 | 11 | 12 | class Contour: 13 | def __init__(self, root): 14 | p = root.find("Contour") 15 | 16 | # 是否用彩色圆点标注格点或站点 17 | self.scatter = Projection.leaf_to_bool(p, "Scatter", False) 18 | # 圆点的透明度 19 | self.alpha = Projection.leaf_to_float(p, "Alpha", 1) 20 | # 圆点半径 default is 10 21 | self.radius = Projection.leaf_to_float(p, "Radius", 10) 22 | 23 | # 第三类数据等值线步长 24 | self.step = Projection.leaf_to_float(p, "Step", 2.0) 25 | 26 | # 经纬方向上的插值格点数 27 | self.grid = Projection.leaf_to_list(p, "Grid", [195, 216]) 28 | if len(self.grid) != 2: 29 | self.grid = [195, 216] 30 | else: 31 | self.grid = [int(str(g)) for g in self.grid] 32 | 33 | # 等值线参数 34 | contourleaf = p.find("Contour") 35 | if contourleaf is None: 36 | self.contour = { 37 | "visible": False, 38 | "linewidth": 1.0, 39 | "linecolor": "k", 40 | "colorline": False, 41 | } 42 | else: 43 | self.contour = { 44 | "visible": Projection.leaf_to_bool( 45 | contourleaf, "Visible", False, "TRUE" 46 | ), 47 | "linewidth": Projection.leaf_to_float(contourleaf, "LineWidth", 1.0), 48 | "linecolor": Projection.leaf_to_string(contourleaf, "LineColor", "k"), 49 | "colorline": Projection.leaf_to_bool( 50 | contourleaf, "ColorLine", False, "TRUE" 51 | ), 52 | } 53 | 54 | # 是否显示色斑图 55 | self.contourfvisible = Projection.leaf_to_bool( 56 | p, "ContourfVisible", False, "TRUE" 57 | ) 58 | 59 | # 等值线标注参数 60 | leaf = p.find("ContourLabel") 61 | if leaf is None: 62 | self.contourlabel = { 63 | "visible": False, 64 | "fmt": "%1.0f", 65 | "fontsize": 12, 66 | "fontcolor": "k", 67 | "inlinespacing": 2, 68 | } 69 | else: 70 | self.contourlabel = { 71 | "visible": Projection.leaf_to_bool(leaf, "Visible", False, "TRUE"), 72 | "fmt": Projection.leaf_to_string(leaf, "Fmt", "%1.0f"), 73 | "fontsize": Projection.leaf_to_float(leaf, "FontSize", 12), 74 | "fontcolor": Projection.leaf_to_string(leaf, "FontColor", "k"), 75 | "inlinespacing": Projection.leaf_to_float(leaf, "InlineSpacing", 2), 76 | } 77 | -------------------------------------------------------------------------------- /File.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170406 8 | from __future__ import print_function 9 | from Micaps11Data import Micaps11Data 10 | from Micaps3Data import Micaps3Data 11 | from Micaps4Data import Micaps4Data 12 | from Projection import Projection 13 | 14 | 15 | class File: 16 | def __init__(self, root): 17 | leaf = root.find("File") 18 | if leaf is None: 19 | return 20 | self.type = Projection.leaf_to_string(leaf, "Type", "M4") 21 | self.filename = Projection.leaf_to_string(leaf, "FileName", "M4") 22 | if self.type == "M4": 23 | self.micapsdata = Micaps4Data(self.filename) 24 | elif self.type == "M3": 25 | self.micapsdata = Micaps3Data(self.filename) 26 | elif self.type == "M11": 27 | self.micapsdata = Micaps11Data(self.filename) 28 | else: 29 | return 30 | -------------------------------------------------------------------------------- /FnTime.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | ------------------------------------------------- 4 | File Name: FnTime 5 | Description : 6 | Author : Xianyao Liu 7 | date: 2019/3/16 8 | ------------------------------------------------- 9 | Change Activity: 10 | 2019/3/16 11 | ------------------------------------------------- 12 | """ 13 | import time 14 | from functools import wraps 15 | 16 | __author__ = 'Xianyao Liu' 17 | 18 | 19 | def fn_timer(func): 20 | @wraps(func) 21 | def function_timer(*args, **kwargs): 22 | t0 = time.time() 23 | result = func(*args, **kwargs) 24 | t1 = time.time() 25 | # print("Total time running %s: %s seconds" % (func.__name__, str(t1 - t0))) 26 | print("Total time running %s: %s seconds" % (func.__name__, str(t1 - t0))) 27 | return result 28 | 29 | return function_timer 30 | -------------------------------------------------------------------------------- /HeadDesc.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170406 8 | 9 | 10 | class HeadDesc: 11 | """ 12 | 标题描述类 13 | """ 14 | 15 | def __init__(self, txt, pos, font): 16 | self.text = txt 17 | self.pos = pos 18 | self.font = font 19 | -------------------------------------------------------------------------------- /Legend.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | from __future__ import print_function 9 | from Projection import Projection 10 | 11 | 12 | class Legend: 13 | def __init__(self, root): 14 | p = root.find("Legend") 15 | if p is None: 16 | print("没有图例节点") 17 | return 18 | # 图例图片文件路径,图例叠加到产品图上的位置,为空表示自行生成图例 19 | legend_pic = p.find("LegendPic").text 20 | self.islegendpic = False 21 | self.legendpic = "" 22 | self.legendpos = [0, 0] 23 | self.legendopacity = 1 24 | if not (legend_pic is None or legend_pic.strip() == ""): 25 | self.islegendpic = True 26 | legend_pics = legend_pic.strip().split(",") 27 | if 1 == len(legend_pics): 28 | self.legendpic = legend_pics[0].strip() 29 | elif 4 == len(legend_pics): 30 | self.legendpic = legend_pics[0].strip() 31 | self.legendpos = [ 32 | float(legend_pics[1].strip()), 33 | float(legend_pics[2].strip()), 34 | ] 35 | self.legendopacity = float(legend_pics[3].strip()) 36 | else: 37 | self.legendpic = legend_pics[0].strip() 38 | 39 | # 图例的延展类型:neither,min,max default is neither 40 | self.extend = Projection.leaf_to_string(p, "Extend", "neither") 41 | 42 | # 是否取MICAPS数据本身的图例值 43 | self.micapslegendvalue = Projection.leaf_to_bool( 44 | p, "MicapsLegendValue", True, "TRUE" 45 | ) 46 | 47 | # When micapslegendvalue is true, the setting is working. 48 | # if pin the legend values, [begin value, stop value, step] is working.default is None 49 | # else use the data self legend values 50 | self.pinlegendvalue = Projection.leaf_to_list(p, "PinLegendValue", None) 51 | self.valid(self.pinlegendvalue) 52 | 53 | # NCL colorbar 的别名 54 | self.micapslegendcolor = Projection.leaf_to_string( 55 | p, "MicapsLegendColor", "ncl_default" 56 | ) 57 | 58 | # 图例填充样式数组,一般和自定义的legend结合使用,如不够LegendValue数组的长度,则会用最后一个样式自动补齐 59 | self.hatches = Projection.leaf_to_list(p, "Hatches", [""]) 60 | self.validhatches(self.hatches) 61 | # 图例等级值 62 | self.legendvalue = Projection.leaf_to_list(p, "LegendValue", None) 63 | 64 | # 实际显示在图例上的值 65 | self.legendvaluealias = Projection.leaf_to_list(p, "LegendValueAlias", None) 66 | 67 | # 图例颜色值 68 | self.legendcolor = Projection.leaf_to_list(p, "LegendColor", None) 69 | 70 | # 图例抽稀间隔 71 | self.thinning = Projection.leaf_to_int(p, "Thinning", 1) 72 | 73 | # 图例字体 74 | self.font = Projection.leaf_to_dict(p, "Font", None) 75 | 76 | # 图例标题 77 | self.title = Projection.leaf_to_string(p, "Title", "") 78 | 79 | # 图例标题字体 80 | self.titlefont = Projection.leaf_to_dict(p, "TitleFont", None) 81 | 82 | # 图例标题位置 83 | self.titlepos = Projection.leaf_to_dict( 84 | p, 85 | "TitlePos", 86 | {"rotation": 90, "va": "top", "ha": "center", "ypercent": 0.5}, 87 | ) 88 | 89 | # ---------- 无投影时的图例配置 start -------- 90 | # 图例放置方式 91 | self.orientation = Projection.leaf_to_string(p, "Orientation", "vertical") 92 | 93 | # 图例离边框位置 94 | self.anchor = Projection.leaf_to_list(p, "Anchor", [0, 0]) 95 | 96 | # 图例收缩系数 97 | self.shrink = Projection.leaf_to_float(p, "Shrink", 1) 98 | 99 | self.fraction = Projection.leaf_to_float(p, "Fraction", 0.15) 100 | 101 | # ---------- 有投影时的图例配置 start -------- 102 | # 图例收缩系数 103 | self.size = Projection.leaf_to_string(leaf=p, code="Size", defvalue="5%") 104 | 105 | # 图例离边框位置 106 | self.pad = Projection.leaf_to_string(leaf=p, code="Pad", defvalue="2%") 107 | 108 | # 图例放置位置 109 | self.location = Projection.leaf_to_string( 110 | leaf=p, code="Location", defvalue="right" 111 | ) 112 | 113 | def valid(self, pin): 114 | if pin is not None and len(pin) == 3: 115 | if pin[1] < pin[0] or pin[2] < 0: 116 | self.pinlegendvalue = None 117 | else: 118 | self.pinlegendvalue = None 119 | 120 | def validhatches(self, hatches): 121 | hatches_list = ["", "/", "\\", "|", "-", "+", "x", "o", "O", ".", "*"] 122 | if hatches is not None: 123 | self.hatches = [a if a in hatches_list else "" for a in hatches] 124 | -------------------------------------------------------------------------------- /Main.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | 9 | import sys 10 | import math 11 | from itertools import takewhile 12 | from FnTime import fn_timer 13 | 14 | 15 | def parseInt(s): 16 | """ 17 | 全局函数 字符串转整数 18 | :param s: 字符串 19 | :return: 整数 20 | """ 21 | assert isinstance(s, str) 22 | return ( 23 | int("".join(list(takewhile(lambda x: x.isdigit(), s)))) 24 | if s[0].isdigit() 25 | else None 26 | ) 27 | 28 | 29 | def equal(value1, value2): 30 | return math.fabs(value1 - value2) < 10e-5 31 | 32 | 33 | @fn_timer 34 | def main(debug): 35 | """ 36 | 主程序 37 | :param debug: 38 | :return: 39 | """ 40 | if debug: 41 | xml = r"config.xml" 42 | else: 43 | if len(sys.argv) < 2: 44 | print("参数不够,至少需要一个xml文件名参数") 45 | sys.exit() 46 | xml = sys.argv[1] 47 | 48 | from Products import Products 49 | 50 | products = Products(xml) 51 | if products is not None: 52 | for micapsfile in products.micapsfiles: 53 | micapsfile.file.micapsdata.Draw(products, micapsfile, debug) 54 | # break 55 | 56 | 57 | if __name__ == "__main__": 58 | ISDEBUG = True 59 | main(ISDEBUG) 60 | -------------------------------------------------------------------------------- /Micaps11Data.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Micaps第11类数据 继承Micaps基类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2019-11-20 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 3.0.20191120 8 | 9 | import math 10 | import re 11 | import nclcmaps 12 | from datetime import datetime 13 | import matplotlib.pyplot as plt 14 | import numpy as np 15 | from MicapsData import Micaps 16 | 17 | 18 | class Micaps11Data(Micaps): 19 | def __init__(self, filename, encoding="GBK"): 20 | super().__init__(filename, encoding=encoding) 21 | self.U = None 22 | self.V = None 23 | self.linewidth = 1 24 | self.color = "k" 25 | self.density = [1, 1] 26 | self.barbsgrid = [31, 31] 27 | self.cmap = None 28 | self.stream = None 29 | self.barbs = None 30 | self.length = 5 31 | self.scale = 700 32 | self.colorlist = ["k", "b", "r", "g"] 33 | self.wholeclip = False 34 | self.ReadFromFile() 35 | 36 | def ReadFromFile(self): 37 | """ 38 | 读micaps第11类数据文件到内存 39 | :return: 40 | """ 41 | try: 42 | begin = 17 43 | all_the_text = self.Read(self.filename, self.encoding) 44 | if all_the_text is None: 45 | print("Micaps 11 file error: " + self.filename) 46 | return None 47 | contents = re.split(r"[\s]+", all_the_text) 48 | if len(contents) < begin: 49 | return 50 | self.dataflag = contents[0].strip() 51 | self.style = contents[1].strip() 52 | self.title = contents[2].strip() 53 | self.yy = int(contents[3].strip()) 54 | self.mm = int(contents[4].strip()) 55 | self.dd = int(contents[5].strip()) 56 | self.hh = int(contents[6].strip()) 57 | self.forehh = int(contents[7].strip()) 58 | self.level = contents[8].strip() 59 | 60 | self.deltalon = float(contents[9].strip()) 61 | self.deltalat = float(contents[10].strip()) 62 | self.beginlon = float(contents[11].strip()) 63 | self.endlon = float(contents[12].strip()) 64 | self.beginlat = float(contents[13].strip()) 65 | self.endlat = float(contents[14].strip()) 66 | 67 | self.sumlon = int(contents[15].strip()) 68 | self.sumlat = int(contents[16].strip()) 69 | 70 | self.x = np.arange( 71 | self.beginlon, self.endlon + self.deltalon, self.deltalon 72 | ) 73 | self.y = np.arange( 74 | self.beginlat, self.endlat + self.deltalat, self.deltalat 75 | ) 76 | self.X, self.Y = np.meshgrid(self.x, self.y) 77 | 78 | if self.dataflag == "diamond" and self.style == "11": 79 | self.U = np.zeros((self.sumlat, self.sumlon)) 80 | self.V = np.zeros((self.sumlat, self.sumlon)) 81 | self.Z = np.zeros((self.sumlat, self.sumlon)) 82 | 83 | for i in range(self.sumlon): 84 | for j in range(self.sumlat): 85 | self.U[j, i] = float(contents[begin + j * self.sumlon + i]) 86 | 87 | vbegin = begin + self.sumlat * self.sumlon 88 | for i in range(self.sumlon): 89 | for j in range(self.sumlat): 90 | self.V[j, i] = float(contents[vbegin + j * self.sumlon + i]) 91 | 92 | for i in range(self.sumlon): 93 | for j in range(self.sumlat): 94 | self.Z[j, i] = math.sqrt(self.U[j, i] ** 2 + self.V[j, i] ** 2) 95 | if self.deltalat < 0: 96 | self.TransposeYaxis() 97 | 98 | except Exception as err: 99 | print("【{0}】{1}-{2}".format(self.filename, err, datetime.now())) 100 | 101 | def TransposeYaxis(self): 102 | self.beginlat, self.endlat = self.endlat, self.beginlat 103 | self.deltalat = math.fabs(self.deltalat) 104 | self.y = np.arange(self.beginlat, self.endlat + self.deltalat, self.deltalat) 105 | self.X, self.Y = np.meshgrid(self.x, self.y) 106 | self.U = self.U[::-1, ::] 107 | self.V = self.V[::-1, ::] 108 | self.Z = self.Z[::-1, ::] 109 | 110 | def UpdateData(self, products, micapsfile): 111 | self.UpdateExtents(products) 112 | # micapsfile = products.micapsfiles[0] 113 | self.min = self.Z.min() 114 | self.max = self.Z.max() 115 | self.distance = micapsfile.contour.step 116 | self.min = math.floor(self.min / self.distance) * self.distance 117 | self.max = math.ceil(self.max / self.distance) * self.distance 118 | 119 | # 如果自定义了legend的最小、最大和步长值 则用自定义的值更新 120 | self.UpdatePinLegendValue(micapsfile) 121 | 122 | from Main import equal 123 | 124 | if micapsfile.uv.onspeed and not equal(self.Z.max(), 0): 125 | self.linewidth = 5 * self.Z / self.Z.max() 126 | else: 127 | self.linewidth = micapsfile.uv.linewidth 128 | self.density = micapsfile.uv.density 129 | self.barbsgrid = micapsfile.uv.barbsgrid 130 | 131 | if micapsfile.uv.oncolor: 132 | self.color = self.Z 133 | self.cmap = nclcmaps.cmaps(micapsfile.legend.micapslegendcolor) 134 | else: 135 | self.color = micapsfile.uv.color 136 | 137 | self.barbs = micapsfile.uv.barbs 138 | self.stream = micapsfile.uv.stream 139 | self.length = micapsfile.uv.length 140 | self.scale = micapsfile.uv.scale 141 | self.wholeclip = micapsfile.uv.wholecilp 142 | self.colorlist = micapsfile.legend.legendcolor 143 | 144 | def GetPatches(self, paths): 145 | ps = [] 146 | for path in paths: 147 | from matplotlib import patches 148 | 149 | ps.append( 150 | patches.PathPatch(path, linewidth=1, facecolor="none", edgecolor="k") 151 | ) 152 | return ps 153 | 154 | def ConvertPacth(self, ax, patch): 155 | path = patch.get_path() 156 | lon = [] 157 | lat = [] 158 | for points in path.vertices: 159 | x, y = points[0], points[1] 160 | xy_pixels = ax.transData.transform(np.vstack([x, y]).T) 161 | xpix, ypix = xy_pixels.T 162 | lon.append(xpix[0]) 163 | lat.append(ypix[0]) 164 | from matplotlib.path import Path 165 | 166 | apath = Path(list(zip(lon, lat))) 167 | from matplotlib import patches 168 | 169 | apatch = patches.PathPatch(apath, linewidth=1, facecolor="none", edgecolor="k") 170 | plt.gca().add_patch(apatch) 171 | return apatch 172 | 173 | def DrawUV(self, m, micapsfile, clipborder, patch): 174 | if m is plt: 175 | if self.stream: 176 | plot = m.streamplot( 177 | self.X, 178 | self.Y, 179 | self.U, 180 | self.V, 181 | density=self.density, 182 | linewidth=self.linewidth, 183 | color=self.color, 184 | cmap=self.cmap, 185 | ) 186 | if self.barbs: 187 | barbs = m.barbs( 188 | self.X, 189 | self.Y, 190 | self.U, 191 | self.V, 192 | length=self.length, 193 | barb_increments=dict(half=2, full=4, flag=20), 194 | sizes=dict(emptybarb=0), 195 | ) 196 | pass 197 | 198 | else: 199 | # transform vectors to projection grid. 200 | uproj, vproj, xx, yy = m.transform_vector( 201 | self.U, 202 | self.V, 203 | self.x, 204 | self.y, 205 | self.barbsgrid[0], 206 | self.barbsgrid[1], 207 | returnxy=True, 208 | masked=True, 209 | ) 210 | 211 | if isinstance(self.color, np.ndarray): 212 | self.color = self.colorlist 213 | 214 | if self.stream: 215 | # plot = m.streamplot(xx, yy, uproj, vproj # , latlon=True 216 | # # density=self.density, 217 | # # linewidth=self.linewidth, 218 | # # color=self.color 219 | # # cmap=self.cmap 220 | # ) 221 | # now plot. 222 | Q = m.quiver(xx, yy, uproj, vproj, color=self.color, scale=self.scale) 223 | # make quiver key. 224 | speed = micapsfile.uv.markscalelength 225 | qk = plt.quiverkey(Q, 0.1, 0.1, speed, "%.0f m/s" % speed, labelpos="W") 226 | if self.barbs: 227 | barbs = m.barbs( 228 | xx, 229 | yy, 230 | uproj, 231 | vproj, 232 | length=self.length, 233 | barb_increments=dict(half=2, full=4, flag=20), 234 | sizes=dict(emptybarb=0), 235 | barbcolor="k", 236 | flagcolor="r", 237 | linewidth=0.5, 238 | ) 239 | 240 | if clipborder.path is not None and clipborder.using: 241 | from matplotlib.patches import FancyArrowPatch 242 | from matplotlib.collections import PolyCollection 243 | from matplotlib.lines import Line2D 244 | 245 | for artist in plt.gca().get_children(): 246 | if self.wholeclip: 247 | # from matplotlib.patches import Polygon 248 | if not isinstance(artist, Line2D): 249 | artist.set_clip_path(patch) 250 | else: 251 | from matplotlib.collections import LineCollection 252 | 253 | if ( 254 | isinstance(artist, FancyArrowPatch) 255 | or isinstance(artist, PolyCollection) 256 | or isinstance(artist, LineCollection) 257 | ): 258 | artist.set_clip_path(patch) 259 | 260 | # if m is plt and self.stream: 261 | # for ax in fig.axes: 262 | # from matplotlib.patches import FancyArrowPatch 263 | # artists = ax.get_children() 264 | # for artist in artists: 265 | # if isinstance(artist, FancyArrowPatch): 266 | # artist.set_clip_path(patch) 267 | # plot.lines.set_clip_path(patch) 268 | # 269 | # if self.barbs or (m is not plt and self.stream): 270 | # for ax in fig.axes: 271 | # artists = ax.get_children() 272 | # for artist in artists: 273 | # from matplotlib.collections import PolyCollection 274 | # if isinstance(artist, PolyCollection): 275 | # artist.set_clip_path(patch) 276 | -------------------------------------------------------------------------------- /Micaps17Data.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Micaps第17类数据 继承Micaps基类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-14 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170414 8 | from __future__ import print_function 9 | import re 10 | from datetime import datetime 11 | 12 | import math 13 | 14 | from MicapsData import Micaps 15 | 16 | 17 | class Micaps17Data(Micaps): 18 | def __init__(self, filename, encoding="GBK"): 19 | super().__init__(filename, encoding=encoding) 20 | self.stationsum = None 21 | self.stations = [] 22 | self.ReadFromFile() 23 | 24 | def ReadFromFile(self): 25 | """ 26 | 读micaps第3类数据文件到内存 27 | :return: 28 | """ 29 | try: 30 | all_the_text = self.Read(self.filename, self.encoding) 31 | if all_the_text is None: 32 | print("Micaps 17 file error: " + self.filename) 33 | return None 34 | contents = re.split(r"[\s]+", all_the_text) 35 | if len(contents) < 4: 36 | return 37 | self.dataflag = contents[0].strip() 38 | self.style = contents[1].strip() 39 | self.title = contents[2].strip() 40 | self.stationsum = int(contents[3].strip()) 41 | 42 | if self.dataflag == "diamond" and self.style == "17": 43 | begin = 4 44 | step = 0 45 | for i in range(self.stationsum): 46 | k = step + begin + 7 * i 47 | code = contents[k + 0].strip() 48 | lat = self.ChangeLL(contents[k + 1].strip()) 49 | lon = self.ChangeLL(contents[k + 2].strip()) 50 | height = float(contents[k + 3].strip()) 51 | iclass = int(contents[k + 4].strip()) 52 | infosum = int(contents[k + 5].strip()) 53 | info = [] 54 | for j in range(infosum): 55 | info.append(contents[k + 6 + j].strip()) 56 | step += infosum - 1 57 | # self.stations.append( 58 | # {'code': code, 'lon': lon, 'lat': lat, 'height': height, 59 | # 'iclass': iclass, 'infosum': infosum, 'name': info[0] 60 | # } 61 | # ) 62 | self.stations.append( 63 | [code, lat, lon, height, iclass, infosum, info[0]] 64 | ) 65 | except Exception as err: 66 | print("【{0}】{1}-{2}".format(self.filename, err, datetime.now())) 67 | 68 | @staticmethod 69 | def ChangeLL(lonlat): 70 | if "." in lonlat: 71 | return float(lonlat) 72 | else: 73 | just = math.floor(float(lonlat) / 100) 74 | return just + (float(lonlat) / 100 - just) * 100 / 60.0 75 | -------------------------------------------------------------------------------- /Micaps3Data.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Micaps第3类数据 继承Micaps基类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2019-11-20 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 3.0.20191120 8 | 9 | import itertools 10 | import math 11 | import operator 12 | import re 13 | import numpy as np 14 | import PolygonEx 15 | from datetime import datetime 16 | 17 | from Main import equal 18 | from MicapsData import Micaps 19 | 20 | # from matplotlib.mlab import griddata 21 | from MlabGridData import griddata 22 | 23 | 24 | class Micaps3Data(Micaps): 25 | def __init__(self, filename, encoding="GBK"): 26 | super().__init__(filename, encoding=encoding) 27 | self.contoursum = None 28 | self.smoothindex = None 29 | self.boldvalue = None 30 | self.pointsincutborder = None 31 | self.elementsum = 1 32 | self.stationsum = None 33 | self.data = [] 34 | self.defaultvalue = 9999.0 35 | 36 | self.ReadFromFile() 37 | 38 | def EqualDefaultValue(self, value): 39 | return equal(self.defaultvalue, value) 40 | 41 | def valid(self, lon, lat, zvalue): 42 | if equal(lon, 0) or equal(lon, self.defaultvalue): 43 | return False 44 | if equal(lat, 0) or equal(lat, self.defaultvalue): 45 | return False 46 | if equal(zvalue, self.defaultvalue): 47 | return False 48 | return True 49 | 50 | def ReadFromFile(self): 51 | """ 52 | 读micaps第3类数据文件到内存 53 | :return: 54 | """ 55 | try: 56 | all_the_text = self.Read(self.filename, self.encoding) 57 | if all_the_text is None: 58 | print("Micaps 3 file error: " + self.filename) 59 | return None 60 | contents = re.split(r"[\s]+", all_the_text) 61 | if len(contents) < 14: 62 | return 63 | self.dataflag = contents[0].strip() 64 | self.style = contents[1].strip() 65 | self.title = contents[2].strip() 66 | self.yy = int(contents[3].strip()) 67 | self.mm = int(contents[4].strip()) 68 | self.dd = int(contents[5].strip()) 69 | self.hh = int(contents[6].strip()) 70 | self.level = contents[7].strip() 71 | 72 | self.contoursum = int(contents[8].strip()) 73 | self.smoothindex = float(contents[9].strip()) 74 | self.boldvalue = float(contents[10].strip()) 75 | self.pointsincutborder = int(contents[11].strip()) 76 | 77 | self.elementsum = int(contents[12].strip()) 78 | self.stationsum = int(contents[13].strip()) 79 | 80 | self.x = [] 81 | self.y = [] 82 | self.z = [] 83 | 84 | self.x1 = [] 85 | self.y1 = [] 86 | self.z1 = [] 87 | 88 | self.stationsum = int((len(contents) - 14) / 5) 89 | stations = [] 90 | if self.dataflag == "diamond" and self.style == "3": 91 | begin = 14 92 | for i in range(self.stationsum): 93 | code = contents[begin + 5 * i + 0].strip() 94 | lon = float(contents[begin + 5 * i + 1].strip()) 95 | lat = float(contents[begin + 5 * i + 2].strip()) 96 | height = float(contents[begin + 5 * i + 3].strip()) 97 | zvalue = float(contents[begin + 5 * i + 4].strip()) 98 | if self.valid(lon, lat, zvalue): 99 | stations.append( 100 | { 101 | "code": code, 102 | "lon": lon, 103 | "lat": lat, 104 | "height": height, 105 | "zvalue": zvalue, 106 | } 107 | ) 108 | 109 | if len(stations) > 0: 110 | self.CheckData(stations) 111 | 112 | for ele in stations: 113 | # code = ele['code'] 114 | lon = ele["lon"] 115 | lat = ele["lat"] 116 | # height = ele['height'] 117 | zvalue = ele["zvalue"] 118 | self.x.append(lon) 119 | self.y.append(lat) 120 | self.z.append(zvalue) 121 | self.x1.append(lon) 122 | self.y1.append(lat) 123 | self.z1.append(zvalue) 124 | 125 | self.beginlon = min(self.x) 126 | self.endlon = max(self.x) 127 | self.beginlat = min(self.y) 128 | self.endlat = max(self.y) 129 | # self.data.append((code, lon, lat, height, zvalue)) 130 | 131 | except Exception as err: 132 | print("【{0}】{1}-{2}".format(self.filename, err, datetime.now())) 133 | 134 | @staticmethod 135 | def AddPoints(x, y, z, path): 136 | # 增加轮廓外围插值点 137 | ext_polygon = PolygonEx.PolygonEx(x, y, z, 1.0, path) 138 | control_point = ext_polygon.get_extend_hull() 139 | for point in control_point: 140 | x.append(point[0]) 141 | y.append(point[1]) 142 | z.append(point[2]) 143 | 144 | def CreateArray(self): 145 | self.data = np.array( 146 | self.data, 147 | dtype=[ 148 | ("code", np.int32), 149 | ("lon", np.float32), 150 | ("lat", np.float32), 151 | ("height", np.float32), 152 | ("zvalue", np.float32), 153 | ], 154 | ) 155 | 156 | def UpdateData(self, products, micapsfile): 157 | self.UpdateExtents(products) 158 | 159 | extents = products.picture.extents 160 | xmax = extents.xmax 161 | xmin = extents.xmin 162 | ymax = extents.ymax 163 | ymin = extents.ymin 164 | 165 | path = products.map.clipborders[0].path 166 | 167 | if path is not None: 168 | self.AddPoints(self.x, self.y, self.z, path) 169 | 170 | # self.CreateArray() 171 | self.X = np.linspace(xmin, xmax, micapsfile.contour.grid[0]) 172 | self.Y = np.linspace(ymin, ymax, micapsfile.contour.grid[1]) 173 | # x = self.data['lon'] 174 | # y = self.data['lat'] 175 | # z = self.data['zvalue'] 176 | self.Z = griddata(self.x, self.y, self.z, self.X, self.Y, "nn") 177 | self.X, self.Y = np.meshgrid(self.X, self.Y) 178 | 179 | self.min = min(self.z) 180 | self.max = max(self.z) 181 | self.distance = micapsfile.contour.step 182 | self.min = math.floor(self.min / self.distance) * self.distance 183 | self.max = math.ceil(self.max / self.distance) * self.distance 184 | # 如果自定义了legend的最小、最大和步长值 则用自定义的值更新 185 | self.UpdatePinLegendValue(micapsfile) 186 | 187 | @staticmethod 188 | def CheckData(data): 189 | # 根据经纬度去重 190 | getvals = operator.itemgetter("lon", "lat") 191 | data.sort(key=getvals) 192 | result = [] 193 | for _, g in itertools.groupby(data, getvals): 194 | result.append(next(g)) 195 | data[:] = result 196 | -------------------------------------------------------------------------------- /Micaps4Data.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Micaps第4类数据 继承Micaps基类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | 9 | import numpy as np 10 | import re 11 | 12 | from datetime import datetime 13 | from MicapsData import Micaps 14 | 15 | 16 | class Micaps4Data(Micaps): 17 | def __init__(self, filename, encoding="GBK"): 18 | super().__init__(filename, encoding=encoding) 19 | self.empty = False 20 | self.ReadFromFile() 21 | 22 | def ReadFromFile(self): 23 | """ 24 | 读micaps第4类数据文件到内存 25 | :return: 26 | """ 27 | try: 28 | # file_object = codecs.open(self.filename, mode='r', encoding=self.encoding) 29 | # all_the_text = file_object.read().strip() 30 | # file_object.close() 31 | all_the_text = self.Read(self.filename, self.encoding) 32 | if all_the_text is None: 33 | self.empty = True 34 | print("Micaps 4 file error: " + self.filename) 35 | return None 36 | contents = re.split(r"[\s]+", all_the_text) 37 | if len(contents) < 23: 38 | return 39 | self.dataflag = contents[0].strip() 40 | self.style = contents[1].strip() 41 | self.title = contents[2].strip() 42 | self.yy = int(contents[3].strip()) 43 | self.mm = int(contents[4].strip()) 44 | self.dd = int(contents[5].strip()) 45 | self.hh = int(contents[6].strip()) 46 | self.forehh = int(contents[7].strip()) 47 | self.level = contents[8].strip() 48 | 49 | self.deltalon = float(contents[9].strip()) 50 | self.deltalat = float(contents[10].strip()) 51 | self.beginlon = float(contents[11].strip()) 52 | self.endlon = float(contents[12].strip()) 53 | self.beginlat = float(contents[13].strip()) 54 | self.endlat = float(contents[14].strip()) 55 | 56 | self.sumlon = int(contents[15].strip()) 57 | self.sumlat = int(contents[16].strip()) 58 | self.distance = float(contents[17].strip()) 59 | self.min = float(contents[18].strip()) 60 | self.max = float(contents[19].strip()) 61 | self.def1 = contents[20].strip() 62 | self.def2 = contents[21].strip() 63 | 64 | x = np.arange( 65 | self.beginlon, self.endlon + 0.9 * self.deltalon, self.deltalon 66 | ) 67 | y = np.arange( 68 | self.beginlat, self.endlat + 0.9 * self.deltalat, self.deltalat 69 | ) 70 | self.X, self.Y = np.meshgrid(x, y) 71 | 72 | if self.dataflag == "diamond" and self.style == "4": 73 | begin = 22 74 | self.Z = np.zeros((self.sumlat, self.sumlon)) 75 | if contents is not None: 76 | contents = np.array(contents[begin:]).astype(np.float64) 77 | self.Z = contents.reshape((self.sumlat, self.sumlon)) 78 | # self.Z = np.zeros((self.sumlat, self.sumlon)) 79 | 80 | # for i in range(self.sumlon): 81 | # for j in range(self.sumlat): 82 | # self.Z[j, i] = float(contents[begin + j * self.sumlon + i]) 83 | 84 | except Exception as err: 85 | print("【{0}】{1}-{2}".format(self.filename, err, datetime.now())) 86 | 87 | def UpdateData(self, products, micapsfile): 88 | self.UpdateExtents(products) 89 | # 如果自定义了legend的最小、最大和步长值 则用自定义的值更新 90 | self.UpdatePinLegendValue(micapsfile) 91 | 92 | @staticmethod 93 | def Write(filename, fdate, edate, flon, elon, flat, elat, xjj, yjj, nx, ny, zi): 94 | """ 95 | 把数据写入 micaps 第四类数据文件 96 | :param filename: 写入文件 97 | :param fdate: 起始日期 98 | :param edate: 结束日期 99 | :param flon: 起始经度 100 | :param elon: 结束经度 101 | :param flat: 起始纬度 102 | :param elat: 结束纬度 103 | :param xjj: 经度方向的步长 104 | :param yjj: 纬度方向的步长 105 | :param nx: 经度方向上的点数 106 | :param ny: 纬度方向上的点数 107 | :param zi: z值数组 108 | :return: 109 | """ 110 | content = "diamond 4 " + fdate + "-" + edate + "客观分析网格雨量 " 111 | content += ( 112 | fdate[0:4] 113 | + " " 114 | + fdate[4:6] 115 | + " " 116 | + fdate[6:8] 117 | + " " 118 | + fdate[8:10] 119 | + " 000 999 " 120 | ) 121 | content += ( 122 | " ".join( 123 | [ 124 | xjj, 125 | yjj, 126 | flon, 127 | elon, 128 | flat, 129 | elat, 130 | nx, 131 | ny, 132 | "10.0", 133 | "0", 134 | str(zi.max()), 135 | "0", 136 | "0", 137 | ] 138 | ) 139 | + "\n" 140 | ) 141 | for a in zi.tolist(): 142 | content += " ".join([Micaps4Data.FToS(b) for b in a]) + "\n" 143 | fp = open(filename, "w") 144 | fp.write(content) 145 | fp.close() 146 | 147 | @staticmethod 148 | def FToS(lat): 149 | """ 150 | 实数转字符串 151 | :param lat: 实数 152 | :return: 转换后的字符串 153 | """ 154 | if lat is None: 155 | s = "0" 156 | else: 157 | s = "%.2f" % lat 158 | return s 159 | -------------------------------------------------------------------------------- /MicapsData.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # MicapsData基类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2019-11-20 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 3.0.20191120 8 | from __future__ import print_function 9 | 10 | 11 | import chardet 12 | from matplotlib.font_manager import FontProperties 13 | from matplotlib.markers import MarkerStyle 14 | 15 | import MicapsFile 16 | from Map import Map 17 | from Picture import Picture 18 | 19 | # matplotlib.use('Agg') 20 | from pylab import * 21 | from matplotlib.transforms import Bbox 22 | import os 23 | import numpy as np 24 | import matplotlib.pyplot as plt 25 | import nclcmaps 26 | import math 27 | 28 | matplotlib.rcParams["figure.subplot.top"] = 1 29 | matplotlib.rcParams["figure.subplot.bottom"] = 0 30 | matplotlib.rcParams["figure.subplot.left"] = 0 31 | matplotlib.rcParams["figure.subplot.right"] = 1 32 | matplotlib.rcParams["font.size"] = 12 33 | matplotlib.rcParams["font.sans-serif"] = ["SimHei"] # 指定默认字体 SimHei 34 | matplotlib.rcParams["axes.unicode_minus"] = False # 解决保存图像是负号'-'显示为方块的问题 35 | matplotlib.rcParams["savefig.dpi"] = 72 36 | 37 | 38 | class Micaps: 39 | def __init__(self, filename, encoding="utf-8", **kwargs): 40 | self.filename = filename 41 | self.encoding = encoding 42 | self.dataflag = None 43 | self.style = None 44 | self.title = None 45 | self.yy = None 46 | self.mm = None 47 | self.dd = None 48 | self.hh = None 49 | self.forehh = None 50 | self.level = None 51 | self.deltalon = None 52 | self.deltalat = None 53 | self.beginlon = None 54 | self.endlon = None 55 | self.beginlat = None 56 | self.endlat = None 57 | self.sumlon = None 58 | self.sumlat = None 59 | self.distance = None 60 | self.min = None 61 | self.max = None 62 | self.def1 = None 63 | self.def2 = None 64 | self.X = None 65 | self.Y = None 66 | self.Z = None 67 | self.outPath = os.path.dirname(os.path.abspath(__file__)) 68 | 69 | self.SetCheckSize(self.filename, **kwargs) 70 | self.SetEncoding0() 71 | pass 72 | 73 | def SetCheckSize(self, filename, **kwargs): 74 | if "check_bytes" in kwargs.keys(): 75 | self.check_bytes = kwargs["check_bytes"] 76 | else: 77 | if os.path.isfile(filename): 78 | self.check_bytes = os.path.getsize(self.filename) 79 | else: 80 | self.check_bytes = 1024 81 | 82 | def SetEncoding(self): 83 | if os.path.isfile(self.filename): 84 | bigdata = open(self.filename, "rb") 85 | from cchardet import UniversalDetector 86 | 87 | detector = UniversalDetector() 88 | for line in bigdata.readlines(): 89 | detector.feed(line) 90 | if detector.done: 91 | break 92 | detector.close() 93 | bigdata.close() 94 | result = detector.result 95 | if result["confidence"] is not None and result["confidence"] > 0.6: 96 | self.encoding = result.get("encoding", self.encoding) 97 | 98 | def SetEncoding0(self): 99 | # 二进制方式读取,获取字节数据,检测类型 100 | with open(self.filename, "rb") as f: 101 | data = f.read() 102 | result = chardet.detect(data) 103 | if result["confidence"] is not None and result["confidence"] > 0.8: 104 | self.encoding = result.get("encoding", self.encoding) 105 | 106 | @staticmethod 107 | def UpdatePath(path, projection): 108 | """ 109 | 根据投影对象更新path 110 | :param path: 路径对象 111 | :param projection: 投影类型 112 | :return: 113 | """ 114 | if path is None: 115 | return 116 | for point in path.vertices: 117 | point[0], point[1] = projection(point[0], point[1]) 118 | 119 | @staticmethod 120 | def Update(products, projection): 121 | """ 122 | 根据投影类型和更新产品对象中的path对象 123 | :param products: 产品参数 124 | :param projection: 投影类型 125 | :return: 126 | """ 127 | 128 | Micaps.UpdatePath(products.map.clipborders[0].path, projection) 129 | 130 | for area in products.map.borders: 131 | if area.path is not None: 132 | Micaps.UpdatePath(area.path, projection) 133 | 134 | @staticmethod 135 | def UpdateXY(projection, x, y): 136 | return projection(x, y) 137 | 138 | @staticmethod 139 | def StandardPinLegendValue(pin): 140 | distance = pin[2] 141 | minvalue = math.floor(pin[0] / distance) * distance 142 | maxvalue = math.ceil(pin[1] / distance) * distance 143 | return minvalue, maxvalue, distance 144 | 145 | def UpdateExtents(self, products): 146 | """ 147 | 更新产品参数的extents 148 | :param products: 产品参数对象 149 | :return: 150 | """ 151 | if products.picture.extents is None: 152 | maxlon = max(self.endlon, self.beginlon) 153 | minlon = min(self.endlon, self.beginlon) 154 | maxlat = max(self.endlat, self.beginlat) 155 | minlat = min(self.endlat, self.beginlat) 156 | margin = products.picture.margin 157 | xmax = maxlon + margin[2] if maxlon + margin[2] <= 180 else 180 158 | xmin = minlon - margin[0] if minlon - margin[0] >= -180 else -180 159 | ymax = maxlat + margin[1] if maxlat + margin[1] <= 90 else 90 160 | ymin = minlat - margin[3] if minlat - margin[3] >= -90 else -90 161 | products.picture.extents = Bbox.from_extents(xmin, ymin, xmax, ymax) 162 | else: 163 | extents = products.picture.extents 164 | if isinstance(extents, list): 165 | products.picture.extents = Bbox.from_extents( 166 | extents[0], extents[1], extents[2], extents[3] 167 | ) 168 | 169 | def UpdatePinLegendValue(self, micapsfile): 170 | pin = micapsfile.legend.pinlegendvalue 171 | if pin is not None: 172 | self.min, self.max, self.distance = self.StandardPinLegendValue(pin) 173 | 174 | def UpdateData(self, products, micapsfile): 175 | """ 176 | 要被重载的函数,用来更新产品中的一系列参数 177 | :param micapsfile: 产品中包含的一个micapsfile 178 | :param products:产品参数 179 | :return: 180 | """ 181 | return 182 | 183 | def GetExtend(self): 184 | if self.title.find("降水") >= 0 or self.title.find("雨") >= 0: 185 | extend = "max" 186 | else: 187 | extend = "neither" 188 | return extend 189 | 190 | def DrawUV(self, m, micapsfile, clipborder, patch): 191 | return 192 | 193 | def DrawCommon(self, products, debug=True): 194 | # 图例的延展类型 195 | # extend = self.GetExtend() 196 | # 更新绘图矩形区域 197 | # self.UpdateExtents(products) 198 | micapsfile = products.micapsfiles[0] 199 | 200 | def Clip(self, clipborder, fig, patch): 201 | if clipborder.path is not None and clipborder.using: 202 | for ax in fig.axes: 203 | if not isinstance(ax, Axes): 204 | # from matplotlib.patches import FancyArrowPatch 205 | artists = ax.get_children() 206 | for artist in artists: 207 | # if isinstance(artist, FancyArrowPatch): 208 | artist.set_clip_path(patch) 209 | 210 | @classmethod 211 | def Read(cls, filename, encoding): 212 | encodings = [encoding, "utf-8", "gb18030", "GBK"] 213 | for encoding in encodings: 214 | all_the_text = None 215 | try: 216 | with open(filename, "r", encoding=encoding) as f: 217 | all_the_text = f.read().replace(",", "").strip() 218 | break 219 | except Exception: 220 | pass 221 | if all_the_text is None: 222 | print("Micaps file error: " + filename) 223 | return None 224 | return all_the_text 225 | 226 | def Draw(self, products, micapsfile, debug=True): 227 | """ 228 | 根据产品参数绘制图像 229 | :param micapsfile: 指定绘制产品中包含的一个micapsfile 230 | :param debug: 调试状态 231 | :param products: 产品参数 232 | :return: 233 | """ 234 | self.UpdateData(products, micapsfile) 235 | extents = products.picture.extents 236 | xmax = extents.xmax 237 | xmin = extents.xmin 238 | ymax = extents.ymax 239 | ymin = extents.ymin 240 | 241 | # 设置绘图画板的宽和高 单位:英寸 242 | h = products.picture.height 243 | if products.map.projection.name == "sall": # 等经纬度投影时不用配置本身的宽度,直接根据宽高比得到 244 | w = ( 245 | h 246 | * np.math.fabs((xmax - xmin) / (ymax - ymin)) 247 | * products.picture.widthshrink 248 | ) 249 | else: 250 | w = products.picture.width 251 | 252 | # 创建画布 253 | fig = plt.figure( 254 | figsize=(w, h), dpi=products.picture.dpi, facecolor="white" 255 | ) # 必须在前面 256 | ax = fig.add_subplot(111) 257 | ax.spines["bottom"].set_linewidth(products.map.projection.axisthick) 258 | ax.spines["left"].set_linewidth(products.map.projection.axisthick) 259 | ax.spines["right"].set_linewidth(products.map.projection.axisthick) 260 | ax.spines["top"].set_linewidth(products.map.projection.axisthick) 261 | # 设置绘图区域 262 | plt.xlim(xmin, xmax) 263 | plt.ylim(ymin, ymax) 264 | 265 | # 背景透明 266 | fig.patch.set_alpha(products.picture.opacity) 267 | 268 | # 坐标系统尽可能靠近绘图区边界 269 | fig.tight_layout(pad=products.picture.pad) 270 | 271 | clipborder = products.map.clipborders[0] 272 | 273 | # 获得产品投影 274 | from Projection import Projection 275 | 276 | m = Projection.GetProjection(products) 277 | 278 | if m is not plt: 279 | # 用投影更新经纬度数据 280 | self.X, self.Y = Micaps.UpdateXY(m, self.X, self.Y) 281 | # 用投影更新产品参数中涉及经纬度的数据 282 | Micaps.Update(products, m) 283 | # 画世界底图 284 | Map.DrawWorld(products, m) 285 | 286 | # 绘制裁切区域边界 287 | patch = Map.DrawClipBorders(products.map.clipborders) 288 | 289 | # draw parallels and meridians. 290 | Map.DrawGridLine(products, m) 291 | 292 | cmap = nclcmaps.cmaps( 293 | micapsfile.legend.micapslegendcolor 294 | ) # cm.jet temp_diff_18lev 295 | vmax = math.ceil(self.max) 296 | vmin = math.floor(self.min) 297 | levels = arange(vmin - self.distance, vmax + self.distance + 0.1, self.distance) 298 | 299 | if micapsfile.legend.micapslegendvalue: 300 | level = levels 301 | else: 302 | level = micapsfile.legend.legendvalue 303 | 304 | # 绘制等值线 ------ 等值线和标注是一体的 305 | c = micapsfile.contour 306 | 307 | Map.DrawContourAndMark( 308 | contour=c, 309 | x=self.X, 310 | y=self.Y, 311 | z=self.Z, 312 | level=level, 313 | clipborder=clipborder, 314 | patch=patch, 315 | m=m, 316 | ) 317 | 318 | cf = micapsfile.contour 319 | cbar = micapsfile.legend 320 | extend = micapsfile.legend.extend 321 | # 绘制色斑图 ------ 色版图、图例、裁切是一体的 322 | Map.DrawContourfAndLegend( 323 | contourf=cf, 324 | legend=cbar, 325 | clipborder=clipborder, 326 | patch=patch, 327 | cmap=cmap, 328 | levels=levels, 329 | extend=extend, 330 | extents=extents, 331 | x=self.X, 332 | y=self.Y, 333 | z=self.Z, 334 | m=m, 335 | ) 336 | 337 | # 绘制描述文本 338 | MicapsFile.MicapsFile.DrawTitle(m, micapsfile.title, self.title) 339 | 340 | self.DrawUV(m, micapsfile, clipborder, patch) 341 | 342 | # 绘制地图 343 | Map.DrawBorders(m, products) 344 | 345 | # 绘制散点 346 | if micapsfile.contour.scatter: 347 | if hasattr(self, "x1"): 348 | m.scatter( 349 | self.x1, 350 | self.y1, 351 | s=micapsfile.contour.radius, 352 | c=self.z1, 353 | alpha=micapsfile.contour.alpha, 354 | edgecolors="b", 355 | ) 356 | else: 357 | m.scatter( 358 | self.X, 359 | self.Y, 360 | s=micapsfile.contour.radius, 361 | c=self.Z, 362 | alpha=micapsfile.contour.alpha, 363 | edgecolors="b", 364 | ) 365 | 366 | # 绘制站点 367 | stations = products.map.stations 368 | if stations.visible: 369 | # 'code': code, 'lon': lon, 'lat': lat, 'height': height, 370 | # 'iclass': iclass, 'infosum': infosum, 'name': info[0] 371 | # stations_tuple = tuple(stations.micapsdata.stations) 372 | # (code, lat, lon, height, iclass, infosum, info[0]) 373 | # stations_array = np.array(stations.micapsdata.stations, dtype=[ 374 | # ('code', 'U'), 375 | # ('lat', np.float32), 376 | # ('lon', np.float32), 377 | # ('height', np.float32), 378 | # ('iclass', 'i'), 379 | # ('infosum', 'i'), 380 | # ('info', 'U') 381 | # ]) 382 | 383 | # stations_array = [list(ele) for ele in zip(*stations.micapsdata.stations)] 384 | stations_array = list(zip(*stations.micapsdata.stations)) 385 | # 画站点mark 386 | if m is not plt: 387 | stations_array[2], stations_array[1] = Micaps.UpdateXY( 388 | m, stations_array[2], stations_array[1] 389 | ) 390 | marker = MarkerStyle(stations.markstyle[0], stations.markstyle[1]) 391 | m.scatter( 392 | stations_array[2], 393 | stations_array[1], 394 | marker=marker, 395 | s=stations.radius, 396 | c=stations.color, 397 | alpha=stations.alpha, 398 | edgecolors=stations.edgecolors, 399 | ) 400 | 401 | # 画站点文本 402 | 403 | fontfile = r"C:\WINDOWS\Fonts\{0}".format(stations.font[1]) 404 | if not os.path.exists(fontfile): 405 | font = FontProperties(size=stations.font[0], weight=stations.font[2]) 406 | else: 407 | font = FontProperties( 408 | fname=fontfile, size=stations.font[0], weight=stations.font[2] 409 | ) 410 | for sta in stations.micapsdata.stations: 411 | if m is not plt: 412 | lon, lat = Micaps.UpdateXY(m, sta[2], sta[1]) 413 | lon1, _ = Micaps.UpdateXY(m, sta[2] + stations.detax, sta[1]) 414 | deta = lon1 - lon 415 | else: 416 | lon, lat = sta[2], sta[1] 417 | deta = stations.detax 418 | plt.text( 419 | lon + deta, 420 | lat, 421 | sta[6], 422 | fontproperties=font, 423 | rotation=0, 424 | color=stations.font[3], 425 | ha="left", 426 | va="center", 427 | ) 428 | 429 | # 接近收尾 430 | 431 | # self.Clip(clipborder, fig, patch) 432 | 433 | # 存图 434 | Picture.savePicture(fig, products.picture.picfile) 435 | 436 | print(products.picture.picfile + "存图成功!") 437 | if debug: 438 | plt.show() 439 | 440 | # def GetColors(self, legend, z): 441 | # if legend.micapslegendvalue: 442 | # pass 443 | # else: 444 | # for i in range(len(z)): 445 | # if z[i] 446 | -------------------------------------------------------------------------------- /MicapsFile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170406 8 | from __future__ import print_function 9 | import os 10 | from matplotlib.font_manager import FontProperties 11 | import matplotlib.pyplot as plt 12 | from Contour import Contour 13 | from File import File 14 | from Legend import Legend 15 | from Title import Title 16 | from UV import UV 17 | 18 | 19 | class MicapsFile: 20 | def __init__(self, leaf): 21 | self.file = File(leaf) 22 | self.legend = Legend(leaf) 23 | self.contour = Contour(leaf) 24 | self.title = Title(leaf) 25 | self.uv = UV(leaf) 26 | 27 | @staticmethod 28 | def DrawTitle(m, title, headtxt): 29 | if m is plt: 30 | if title.mtitleposition is None: 31 | for desc in title.descs: 32 | fontfile = r"C:\WINDOWS\Fonts\{0}".format(desc.font["family"]) 33 | if not os.path.exists(fontfile): 34 | font = FontProperties( 35 | size=desc.font["fontsize"], weight=desc.font["weight"] 36 | ) 37 | else: 38 | font = FontProperties( 39 | fname=fontfile, 40 | size=desc.font["fontsize"], 41 | weight=desc.font["weight"], 42 | ) 43 | plt.text( 44 | desc.pos[0], 45 | desc.pos[1], 46 | desc.text, 47 | # size=desc.font['fontsize'], weight=desc.font['weight'], 48 | color=desc.font["color"], 49 | fontdict=desc.font, 50 | fontproperties=font, 51 | rotation=0, 52 | ha="left", 53 | va="top", 54 | ) 55 | else: 56 | if title.mtitleposition == [0, 0]: 57 | plt.title(headtxt, fontdict={"fontsize": 14}) 58 | else: 59 | plt.text( 60 | title.mtitleposition[0], 61 | title.mtitleposition[1], 62 | headtxt, 63 | size=14, 64 | weight="bold", 65 | # color='blue', 66 | # fontdict=desc.font, 67 | # fontproperties=font, 68 | rotation=0, 69 | ha="left", 70 | va="top", 71 | ) 72 | else: 73 | plt.title(headtxt) 74 | -------------------------------------------------------------------------------- /MlabGridData.py: -------------------------------------------------------------------------------- 1 | import matplotlib.cbook as cbook 2 | import numpy as np 3 | 4 | 5 | @cbook.deprecated("2.2", alternative="scipy.interpolate.griddata") 6 | def griddata(x, y, z, xi, yi, interp="nn"): 7 | """ 8 | Interpolates from a nonuniformly spaced grid to some other grid. 9 | Fits a surface of the form z = f(`x`, `y`) to the data in the 10 | (usually) nonuniformly spaced vectors (`x`, `y`, `z`), then 11 | interpolates this surface at the points specified by 12 | (`xi`, `yi`) to produce `zi`. 13 | Parameters 14 | ---------- 15 | x, y, z : 1d array_like 16 | Coordinates of grid points to interpolate from. 17 | xi, yi : 1d or 2d array_like 18 | Coordinates of grid points to interpolate to. 19 | interp : string key from {'nn', 'linear'} 20 | Interpolation algorithm, either 'nn' for natural neighbor, or 21 | 'linear' for linear interpolation. 22 | Returns 23 | ------- 24 | 2d float array 25 | Array of values interpolated at (`xi`, `yi`) points. Array 26 | will be masked is any of (`xi`, `yi`) are outside the convex 27 | hull of (`x`, `y`). 28 | Notes 29 | ----- 30 | If `interp` is 'nn' (the default), uses natural neighbor 31 | interpolation based on Delaunay triangulation. This option is 32 | only available if the mpl_toolkits.natgrid module is installed. 33 | This can be downloaded from https://github.com/matplotlib/natgrid. 34 | The (`xi`, `yi`) grid must be regular and monotonically increasing 35 | in this case. 36 | If `interp` is 'linear', linear interpolation is used via 37 | matplotlib.tri.LinearTriInterpolator. 38 | Instead of using `griddata`, more flexible functionality and other 39 | interpolation options are available using a 40 | matplotlib.tri.Triangulation and a matplotlib.tri.TriInterpolator. 41 | """ 42 | # Check input arguments. 43 | x = np.asanyarray(x, dtype=np.float64) 44 | y = np.asanyarray(y, dtype=np.float64) 45 | z = np.asanyarray(z, dtype=np.float64) 46 | if x.shape != y.shape or x.shape != z.shape or x.ndim != 1: 47 | raise ValueError("x, y and z must be equal-length 1-D arrays") 48 | 49 | xi = np.asanyarray(xi, dtype=np.float64) 50 | yi = np.asanyarray(yi, dtype=np.float64) 51 | if xi.ndim != yi.ndim: 52 | raise ValueError("xi and yi must be arrays with the same number of " 53 | "dimensions (1 or 2)") 54 | if xi.ndim == 2 and xi.shape != yi.shape: 55 | raise ValueError("if xi and yi are 2D arrays, they must have the same " 56 | "shape") 57 | if xi.ndim == 1: 58 | xi, yi = np.meshgrid(xi, yi) 59 | 60 | if interp == "nn": 61 | use_nn_interpolation = True 62 | elif interp == "linear": 63 | use_nn_interpolation = False 64 | else: 65 | raise ValueError("interp keyword must be one of 'linear' (for linear " 66 | "interpolation) or 'nn' (for natural neighbor " 67 | "interpolation). Default is 'nn'.") 68 | 69 | # Remove masked points. 70 | mask = np.ma.getmask(z) 71 | if mask is not np.ma.nomask: 72 | x = x.compress(~mask) 73 | y = y.compress(~mask) 74 | z = z.compressed() 75 | 76 | if use_nn_interpolation: 77 | try: 78 | from mpl_toolkits.natgrid import _natgrid 79 | except ImportError: 80 | raise RuntimeError( 81 | "To use interp='nn' (Natural Neighbor interpolation) in " 82 | "griddata, natgrid must be installed. Either install it " 83 | "from http://github.com/matplotlib/natgrid or use " 84 | "interp='linear' instead.") 85 | 86 | if xi.ndim == 2: 87 | # natgrid expects 1D xi and yi arrays. 88 | xi = xi[0, :] 89 | yi = yi[:, 0] 90 | 91 | # Override default natgrid internal parameters. 92 | _natgrid.seti(b"ext", 0) 93 | _natgrid.setr(b"nul", np.nan) 94 | 95 | if np.min(np.diff(xi)) < 0 or np.min(np.diff(yi)) < 0: 96 | raise ValueError("Output grid defined by xi,yi must be monotone " 97 | "increasing") 98 | 99 | # Allocate array for output (buffer will be overwritten by natgridd) 100 | zi = np.empty((yi.shape[0], xi.shape[0]), np.float64) 101 | 102 | # Natgrid requires each array to be contiguous rather than e.g. a view 103 | # that is a non-contiguous slice of another array. Use numpy.require 104 | # to deal with this, which will copy if necessary. 105 | x = np.require(x, requirements=["C"]) 106 | y = np.require(y, requirements=["C"]) 107 | z = np.require(z, requirements=["C"]) 108 | xi = np.require(xi, requirements=["C"]) 109 | yi = np.require(yi, requirements=["C"]) 110 | _natgrid.natgridd(x, y, z, xi, yi, zi) 111 | 112 | # Mask points on grid outside convex hull of input data. 113 | if np.any(np.isnan(zi)): 114 | zi = np.ma.masked_where(np.isnan(zi), zi) 115 | return zi 116 | else: 117 | # Linear interpolation performed using a matplotlib.tri.Triangulation 118 | # and a matplotlib.tri.LinearTriInterpolator. 119 | from matplotlib.tri import Triangulation, LinearTriInterpolator 120 | triang = Triangulation(x, y) 121 | interpolator = LinearTriInterpolator(triang, z) 122 | return interpolator(xi, yi) 123 | -------------------------------------------------------------------------------- /Picture.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | from __future__ import print_function 9 | import os 10 | from matplotlib.transforms import Bbox 11 | from Projection import Projection 12 | 13 | 14 | class Picture: 15 | def __init__(self, root, clipborders): 16 | p = root.find("Picture") 17 | # 生成的图片宽度 18 | self.width = Projection.leaf_to_float(p, "PicWidth", 10) 19 | 20 | # 生成的图片高度 21 | self.height = Projection.leaf_to_float(p, "PicHeight", 10) 22 | 23 | # dpi 24 | self.dpi = Projection.leaf_to_int(p, "Dpi", 72) 25 | 26 | # 高宽比 27 | self.widthshrink = Projection.leaf_to_float(p, "WidthShrink", 1.0) 28 | 29 | # 绘图区外延 30 | self.margin = Projection.leaf_to_list(p, "Margin", [0, 0, 0, 0]) 31 | 32 | # 绘图区内边距 33 | self.pad = Projection.leaf_to_float(p, "Pad", 0.0) 34 | 35 | # 绘图区域 36 | 37 | extents = p.find("Extents").text 38 | if extents is None or extents == "": 39 | if ( 40 | len(clipborders) < 1 41 | or clipborders[0].path is None 42 | or (not clipborders[0].using) 43 | ): 44 | self.extents = None 45 | else: 46 | jxextend = clipborders[0].path.get_extents() 47 | delta = self.margin 48 | xmax = jxextend.xmax + delta[2] 49 | xmin = jxextend.xmin - delta[0] 50 | ymax = jxextend.ymax + delta[1] 51 | ymin = jxextend.ymin - delta[3] 52 | self.extents = Bbox.from_extents(xmin, ymin, xmax, ymax) 53 | else: 54 | self.extents = Projection.leaf_to_list(p, "Extents", None) 55 | 56 | # 画布透明度 57 | self.opacity = Projection.leaf_to_float(p, "Opacity", 1) 58 | if self.opacity < 0 or self.opacity > 1: 59 | self.opacity = 1 60 | 61 | # 生成的图片文件存放路径 62 | self.picfile = Projection.leaf_to_string(p, "PicFile", "mytest.png") 63 | self.checkFilename() 64 | 65 | return 66 | 67 | @staticmethod 68 | def savePicture(fig, filename): 69 | # 存图 70 | fig.savefig(filename, format="png", transparent=False) 71 | # return 72 | 73 | def checkFilename(self): 74 | """ 75 | 创建数据文件夹 76 | :return: 77 | """ 78 | try: 79 | path = os.path.dirname(self.picfile) 80 | if not os.path.isdir(path): 81 | os.makedirs(path) 82 | except: 83 | self.picfile = "mytest.png" 84 | -------------------------------------------------------------------------------- /PolygonEx.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # !/usr/bin/env python 3 | # ############################################## 4 | # Name: PolygonEx.py 5 | # Purpose: 获得凸型轮廓扩大选区的最外围点 6 | # Author: liuxianyao 7 | # Created: 04/11/2015 8 | # ############################################## 9 | import scipy 10 | import scipy.linalg 11 | import scipy.integrate 12 | import scipy.spatial 13 | import scipy.spatial._procrustes 14 | import scipy.special._ufuncs_cxx 15 | import scipy.optimize._lbfgsb 16 | import scipy.linalg.cython_blas 17 | import scipy.linalg.cython_lapack 18 | import numpy as np 19 | from sympy import Symbol, nsolve 20 | 21 | 22 | class PolygonEx: 23 | def __init__(self, lons, lats, zvalues, d, path): 24 | """ 25 | :param lons: x方向坐标数组 26 | :param lats: y方向坐标数组 27 | :param zvalues: 坐标数组对应的点值 28 | :param d: 扩大选取的距离 29 | :param path: 切图所用的path 30 | """ 31 | self.lons = lons 32 | self.lats = lats 33 | self.zvalues = zvalues 34 | self.d = d 35 | self.path = path 36 | 37 | def point_in_path(self, point): 38 | return self.path.contains_point((point[0], point[1])) 39 | 40 | def get_extend_hull(self): 41 | ext_points = [] 42 | # 点集转换为numpy数组 43 | points = np.array([self.lons, self.lats]).T 44 | if len(points) < 3: 45 | return ext_points 46 | # 获取点集的凸多边形轮廓 47 | hull = scipy.spatial.ConvexHull(points) 48 | 49 | for simplex in hull.simplices: 50 | # 设置初值 以获得两个解 51 | if simplex[1] == 0: 52 | continue 53 | pairs = [True, False] 54 | for pair in pairs: 55 | # print(pair) 56 | extend_point = self.equations(points[simplex], pair) 57 | # 在边界内的点排除 58 | if extend_point and not self.point_in_path(extend_point): 59 | ext_points.append( 60 | [extend_point[0], extend_point[1], self.zvalues[simplex[0]]] 61 | ) 62 | return ext_points 63 | 64 | def equations(self, point_pairs, is_less): 65 | """ 66 | 以一条线段作为直角三角形的一条边,从这条线段的起点向该线段引一条距离为d的垂线, 67 | 用垂线的另一点和该线段组成一个直角三角形,这个垂线上的另一点即为要扩展的轮廓的一点 68 | 用以下两个方程组成二元二次方程组,求解可获得这点坐标 69 | ① 直角,向量法.(x-x1)(x2-x1)+(y-y1)(y2-y1)=0 70 | ② L,两点距离公式.(x-x1)²+(y-y1)²=l² 71 | 解二元二次方程 72 | :param point_pairs:直角三角形的一条直角边 73 | :param is_less:初值的x坐标值是否大于直角边起点的x坐标值 74 | :return:返回一个解(x,y) 75 | :rtype: object 76 | """ 77 | try: 78 | x1 = point_pairs[0][0] 79 | y1 = point_pairs[0][1] 80 | x2 = point_pairs[1][0] 81 | y2 = point_pairs[1][1] 82 | deta = 0.05 83 | if is_less: 84 | init_pairs = [x1 - deta, y1] 85 | else: 86 | init_pairs = [x1 + deta, y1] 87 | 88 | x = Symbol("x") 89 | y = Symbol("y") 90 | func = [ 91 | (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1), 92 | (x - x1) ** 2 + (y - y1) ** 2 - self.d**2, 93 | ] 94 | return nsolve(func, [x, y], init_pairs) 95 | except Exception as err: 96 | return None 97 | -------------------------------------------------------------------------------- /Products.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 产品参数类 关联模块Main,maskout和类Micaps3Data,Micaps4Data,Projection, HeadDesc 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | import os 9 | from datetime import datetime 10 | from xml.etree import ElementTree 11 | 12 | from Map import Map 13 | from MicapsFile import MicapsFile 14 | from Picture import Picture 15 | 16 | 17 | class Products: 18 | """ 19 | 画图参数的封装类 20 | 用法: 21 | 22 | """ 23 | 24 | def __init__(self, xmlfile): 25 | self.xmlfile = xmlfile 26 | if not os.path.exists(self.xmlfile): 27 | return 28 | try: 29 | tree = ElementTree.parse(self.xmlfile) 30 | p = tree.getroot() 31 | 32 | # 地图 33 | self.map = Map(p) 34 | 35 | # get picture para class 36 | self.picture = Picture(p, self.map.clipborders) 37 | 38 | # Get the micaps files list 39 | self.micapsfiles = [] 40 | # 3.9以上版本 .getchildren() 方法被清除 41 | # micapsfiles = p.find("MicapsFiles").getchildren() 42 | micapsfiles = list(p.find("MicapsFiles")) 43 | for micapsfile in micapsfiles: 44 | self.micapsfiles.append(MicapsFile(micapsfile)) 45 | 46 | except Exception as err: 47 | print("【{0}】{1}-{2}".format(self.xmlfile, err, datetime.now())) 48 | return None 49 | -------------------------------------------------------------------------------- /Projection.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 投影类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 3.0.20191120 8 | from __future__ import print_function 9 | from __future__ import print_function 10 | from mpl_toolkits.basemap import Basemap 11 | from Main import parseInt 12 | from pylab import * 13 | import matplotlib.pyplot as plt 14 | 15 | 16 | class Projection: 17 | def __init__(self, root): 18 | leaf = root.find("Projection") 19 | if leaf is None: 20 | self.name = "sall" 21 | self.name = self.leaf_to_string(leaf, "Name", "sall") 22 | self.lon_0 = self.leaf_to_float(leaf, "Lon_0") 23 | self.lat_0 = self.leaf_to_float(leaf, "Lat_0") 24 | self.lat_ts = self.leaf_to_float(leaf, "Lat_ts") 25 | self.boundinglat = self.leaf_to_float(leaf, "BoundingLat") 26 | self.llcrnrlat = self.leaf_to_float(leaf, "LlcrnrLat") 27 | self.llcrnrlon = self.leaf_to_float(leaf, "LlcrnrLon") 28 | self.urcrnrlat = self.leaf_to_float(leaf, "UrcrnrLat") 29 | self.urcrnrlon = self.leaf_to_float(leaf, "UrcrnrLon") 30 | 31 | if self.lon_0 is None or self.lat_0 is None: 32 | self.lon_0 = None 33 | self.lat_0 = None 34 | if ( 35 | self.llcrnrlat is None 36 | or self.llcrnrlon is None 37 | or self.urcrnrlat is None 38 | or self.urcrnrlon is None 39 | ): 40 | self.llcrnrlat = None 41 | self.llcrnrlon = None 42 | self.urcrnrlat = None 43 | self.urcrnrlon = None 44 | 45 | self.coastlines = self.leaf_to_bool(leaf=leaf, code="Coastlines") 46 | self.countries = self.leaf_to_bool(leaf=leaf, code="Countries") 47 | 48 | subleaf = leaf.find("Lsmask") 49 | if subleaf is None: 50 | self.lsmask = { 51 | "visible": False, 52 | "land_color": "#BF9E30", 53 | "ocean_color": "#689CD2", 54 | } 55 | else: 56 | self.lsmask = { 57 | "visible": self.leaf_to_bool(leaf=subleaf, code="Visible"), 58 | "land_color": self.leaf_to_string(subleaf, "Land_color", "#BF9E30"), 59 | "ocean_color": self.leaf_to_string(subleaf, "Ocean_color", "#689CD2"), 60 | } 61 | self.axis = Projection.leaf_to_string(leaf=leaf, code="Axis", defvalue="off") 62 | if self.axis not in ["on", "off"]: 63 | self.axis = "off" 64 | self.axisthick = self.leaf_to_float(leaf, "AxisThick", 1.0) 65 | self.axisfmt = Projection.leaf_to_list( 66 | leaf=leaf, code="AxisFmt", defvalue=["%d°E", "%d°N"] 67 | ) 68 | self.latlabels = Projection.leaf_to_list( 69 | leaf=leaf, code="LatLabels", defvalue=[0, 0, 0, 0] 70 | ) 71 | self.lonlabels = Projection.leaf_to_list( 72 | leaf=leaf, code="LonLabels", defvalue=[0, 0, 0, 0] 73 | ) 74 | 75 | @staticmethod 76 | def ValidExtents(extents): 77 | for extent in extents: 78 | if extent is None: 79 | return False 80 | return True 81 | 82 | @staticmethod 83 | def GetProjection(products): 84 | """ 85 | 根据获得产品参数获得投影后的画布对象 86 | :param products: 产品参数 87 | :return: 画布对象 88 | """ 89 | 90 | xmax = products.picture.extents.xmax 91 | xmin = products.picture.extents.xmin 92 | ymax = products.picture.extents.ymax 93 | ymin = products.picture.extents.ymin 94 | lon_0 = xmin + (xmax - xmin) / 2 95 | lat_0 = ymin + (ymax - ymin) / 2 96 | 97 | projection = products.map.projection 98 | pjname = projection.name 99 | 100 | if Projection.ValidExtents((projection.lon_0, projection.lon_0)): 101 | lon_0 = projection.lon_0 102 | lat_0 = projection.lat_0 103 | 104 | if Projection.ValidExtents( 105 | ( 106 | projection.llcrnrlat, 107 | projection.llcrnrlat, 108 | projection.urcrnrlat, 109 | projection.urcrnrlon, 110 | ) 111 | ): 112 | xmax = projection.urcrnrlon 113 | xmin = projection.llcrnrlon 114 | ymax = projection.urcrnrlat 115 | ymin = projection.llcrnrlat 116 | 117 | lat_ts = projection.lat_ts 118 | if lat_ts is None: 119 | lat_ts = lat_0 120 | 121 | boundinglat = projection.boundinglat 122 | if boundinglat is None: 123 | boundinglat = 0 124 | 125 | if pjname == "sall": 126 | m = plt 127 | elif pjname == "cyl": 128 | m = Basemap( 129 | projection="cyl", 130 | llcrnrlat=ymin, 131 | urcrnrlat=ymax, 132 | llcrnrlon=xmin, 133 | urcrnrlon=xmax, 134 | lon_0=lon_0, 135 | lat_0=lat_0, 136 | ) 137 | elif pjname == "mill": 138 | m = Basemap( 139 | projection="mill", 140 | llcrnrlon=xmin, 141 | llcrnrlat=ymin, 142 | urcrnrlon=xmax, 143 | urcrnrlat=ymax, 144 | ) 145 | elif pjname == "gnom": 146 | m = Basemap( 147 | projection="gnom", 148 | llcrnrlon=xmin, 149 | llcrnrlat=ymin, 150 | urcrnrlon=xmax, 151 | urcrnrlat=ymax, 152 | lat_0=lat_0, 153 | lon_0=lon_0, 154 | ) 155 | elif pjname == "ortho": 156 | m = Basemap(projection="ortho", lat_0=lat_0, lon_0=lon_0, resolution="l") 157 | elif pjname == "hammer": 158 | m = Basemap(projection="hammer", lon_0=lon_0) 159 | elif pjname == "kav7": 160 | m = Basemap(projection="kav7", lon_0=lon_0, resolution=None) 161 | elif pjname == "merc": 162 | ymin = ymin if ymin >= -80 else -80 163 | ymax = ymax if ymax <= 80 else 80 164 | lat_ts = lat_ts if lat_ts < 90 else 80.0 165 | m = Basemap( 166 | llcrnrlon=xmin, 167 | llcrnrlat=ymin, 168 | urcrnrlon=xmax, 169 | urcrnrlat=ymax, 170 | rsphere=(6378137.00, 6356752.3142), 171 | resolution="l", 172 | projection="merc", 173 | lat_0=lat_0, 174 | lon_0=lon_0, 175 | lat_ts=lat_ts, 176 | ) 177 | elif pjname == "lcc": 178 | # lat_1=lat_0, lat_2=60, lat_0=lat_0, lon_0=lon_0 width=12000000, height=9000000, 179 | # lon_0 = 120. 180 | # lat_0 = 90. 181 | # ymin = 5.13 182 | # ymax = 53.51 183 | # xmin = 85.86 184 | # xmax = 174.69 185 | m = Basemap( 186 | projection="lcc", 187 | # width=w, height=h, 188 | llcrnrlon=xmin, 189 | llcrnrlat=ymin, 190 | urcrnrlon=xmax, 191 | urcrnrlat=ymax, 192 | rsphere=(6378137.00, 6356752.3142), 193 | resolution="l", 194 | area_thresh=1000.0, 195 | lat_2=60, 196 | lat_1=30, 197 | lon_0=lon_0, 198 | lat_0=lat_0, 199 | ) 200 | elif pjname == "stere": 201 | # lon_0 = 116. 202 | # lat_0 = 90. 203 | # ymin = 5.13 204 | # ymax = 53.51 205 | # xmin = 85.86 206 | # xmax = 174.69 207 | m = Basemap( 208 | projection="stere", 209 | lon_0=lon_0, 210 | lat_0=lat_0, 211 | lat_ts=lat_ts, 212 | llcrnrlat=ymin, 213 | urcrnrlat=ymax, 214 | llcrnrlon=xmin, 215 | urcrnrlon=xmax, 216 | # boundinglat=ymin, 217 | # width=w, height=h, 218 | rsphere=6371200.0, 219 | resolution="l", 220 | area_thresh=10000, 221 | ) 222 | elif pjname == "npstere": 223 | m = Basemap( 224 | projection="npstere", 225 | lon_0=lon_0, 226 | lat_0=lat_0, 227 | lat_ts=lat_ts, 228 | boundinglat=boundinglat, 229 | # llcrnrlat=ymin, urcrnrlat=ymax, 230 | # llcrnrlon=xmin, urcrnrlon=xmax, 231 | # width=12000000, height=8000000, 232 | rsphere=6371200.0, 233 | area_thresh=10000, 234 | ) 235 | else: 236 | m = plt 237 | return m 238 | 239 | @staticmethod 240 | def leaf_to_float(leaf, code, defvalue=None): 241 | # 242 | try: 243 | tpos = leaf.find(code) 244 | if tpos is None or tpos.text.strip() == "": 245 | return defvalue 246 | else: 247 | return float(tpos.text.strip()) 248 | except: 249 | return defvalue 250 | 251 | @staticmethod 252 | def leaf_to_string(leaf, code, defvalue=None): 253 | # 254 | try: 255 | tpos = leaf.find(code) 256 | if tpos is None or tpos.text.strip() == "": 257 | return defvalue 258 | else: 259 | return tpos.text.strip() 260 | except Exception as err: 261 | return defvalue 262 | 263 | @staticmethod 264 | def leaf_to_bool(leaf, code, defvalue=False, ok="ON"): 265 | try: 266 | tpos = leaf.find(code) 267 | if tpos is None or tpos.text.strip() == "": 268 | return defvalue 269 | else: 270 | return str.upper(tpos.text.strip()) == ok 271 | except Exception as err: 272 | return defvalue 273 | 274 | @staticmethod 275 | def leaf_to_int(leaf, code, defvalue=None): 276 | # 277 | try: 278 | tpos = leaf.find(code) 279 | if tpos is None or tpos.text.strip() == "": 280 | return defvalue 281 | else: 282 | return parseInt(tpos.text.strip()) 283 | except Exception as err: 284 | return defvalue 285 | 286 | @staticmethod 287 | def leaf_to_list(leaf, code, defvalue=None): 288 | # 289 | try: 290 | tpos = leaf.find(code) 291 | if tpos is None or tpos.text.strip() == "": 292 | return defvalue 293 | else: 294 | labels = eval("[{0}]".format(tpos.text.strip())) 295 | return labels 296 | except Exception as err: 297 | return defvalue 298 | 299 | @staticmethod 300 | def leaf_to_dict(leaf, code, defvalue=None): 301 | # 302 | try: 303 | tpos = leaf.find(code) 304 | if tpos is None or tpos.text.strip() == "": 305 | return defvalue 306 | else: 307 | labels = eval("{0}".format(tpos.text.strip())) 308 | return labels 309 | except Exception as err: 310 | return defvalue 311 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## PyMICAPS(原名:MicapsDataDraw)更新到 Python3.7 python2.7 版见分支 v2.2-py2.7-20191119 2 | 3 | #### 一个超级实用生产图片工具,用 matplotlib 和 basemap 绘制 micaps 数据 4 | 5 | 利用配置文件config.xml定制参数,结合micaps具体数据, 6 | 7 | 可实现多种 micaps 数据类型的单独绘制或叠加绘制(in the future) 8 | 9 | 并自动输出相应图像到指定文件。 10 | 11 | ###### Author:Xianyao Liu | Version:3.0.20191120 | E-mail:flashlxy@qq.com | Language:Python3.7 12 | 13 | ## 更新日志 14 | 15 | 2023-04-18 升级python3.7中的matplotlib和pyshp到最新版 16 | 17 | 2019-11-20 升级到python3.7 18 | 19 | 2019-11-19 准备升级到python3.7 20 | 21 | 2018-07-09 更改工程名称为PyMicaps 22 | 23 | 2018-03-25 修复一个扩大多边形区域类PolygonEx.py中的bug 24 | 25 | 2018-03-21 修复一个在无投影下绘制shp文件的bug 26 | 27 | 2017-04-19 裁切区对流线和风矢也有效,修复1个自定义绘图区的BUG 28 | 29 | 2017-04-18 修复在投影下绘制第11类数据当纬度步长为负数时出不了图的BUG 30 | 31 | 2017-04-15 修复等值线标注在裁切区外还显示的BUG, 32 | 33 | 增加一种快捷包含shp文件中所有闭合区域作为裁切区的配置参数。 34 | 35 | 2017-04-14 增加Micaps第17类数据的绘制。 36 | 37 | 2017-04-13 增加Micaps第11类数据的绘制,修复数个小BUG,优化配置文件逻辑。 38 | 39 | 统一边界txt文件的格式为: 40 | 41 | 经度 纬度 经度 纬度 经度 纬度 ...... 42 | 43 | 或 44 | 45 | 经度 纬度 46 | 经度 纬度 47 | 经度 纬度 48 | ...... 49 | 50 | ## 主要功能 51 | 52 | #### 1、支持 Micaps 第 3、4、11、17 类数据的绘制 53 | 54 | 目前实现了某类数据的单独绘制,多类数据叠加在不久的将来实现。 55 | 56 | #### 2、支持多种投影 57 | 58 | sall:无投影,lcc:兰波托投影,mill,ortho,stere:极射赤面投影, 59 | 60 | npstere:北半球极射赤面投影, 61 | 62 | hammer,kav7,merc:麦卡托投影,gnom, cyl:等经纬度投影。 63 | 64 | #### 3、支持底图叠加 65 | 66 | 用一个或多个shp格式或者定制的txt文件叠加到底图。 67 | 68 | #### 4、支持任意区域完美白化 69 | 70 | 用shp或者定制的txt文件所形成的单个或多个闭合区域切图(也叫白化),轻松实现分省绘图。 71 | 72 | #### 5、支持灵活配置色标 73 | 74 | 可以自己定义色标,同时支持 75 | 76 | [NCL 色标](http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml) 77 | 78 | #### 6、高度可定制化 79 | 80 | 包括但不限于绘图区域、标题内容、样式、位置;色标选择、位置、放置方式; 81 | 82 | 色版图、等值线、标注、格点着色的显隐等都实现了高度自定义。 83 | 84 | ## 程序运行 85 | 86 | python main.py config.xml 87 | 88 | ## 项目参考的代码及的用到的一些库 89 | 90 | #### 代码[完美白化](http://bbs.06climate.com/forum.php?mod=viewthread&tid=42437) 91 | 92 | 气象家园帖子作者的片段代码 93 | 94 | #### 第三方库[nclcmaps](http://bbs.06climate.com/forum.php?mod=viewthread&tid=43521) 95 | 96 | 作者的一个支持NCL colorbar的python库。 97 | 98 | matplotlib==3.0.3 99 | 安装方法: 100 | conda安装 conda install matplotlib==3.0.3 101 | pip安装 pip install matplotlib==3.0.3 102 | 103 | basemap 104 | 105 | numpy 106 | 107 | natgrid 108 | 安装包见.\lib\natgrid-0.2.1-cp37-cp37m-win_amd64.whl 109 | 安装方法: 110 | pip install natgrid-0.2.1-cp37-cp37m-win_amd64.whl 111 | 112 | scipy 113 | 114 | sympy 115 | 116 | pyshp=1.2.10 117 | 118 | nclcmaps 119 | 安装包见.\lib\nclcmaps-master.zip 120 | 安装方法:解压后在当前目录运行python setup.py install 121 | 122 | cchardet 123 | 124 | 欢迎大家star和fork,一并感谢2位作者! 125 | 126 | ## 示例数据结合适当配置文件输出的图片 127 | 128 | Micaps第三类数据-等经纬度投影: 129 | 130 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/xz.png) 131 | 132 | Micaps第11类数据 等经纬度和兰波托投影、自定义区域、中国区作为裁切区(流线风场也有效) 133 | 134 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/10.png) 135 | 136 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/11.png) 137 | 138 | Micaps第11类数据-等经纬度投影: 139 | 140 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/9.png) 141 | 142 | Micaps第11类数据-ortho投影: 143 | 144 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/7.png) 145 | 146 | Micaps第四类数据ortho投影: 147 | 148 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/3.png) 149 | 150 | Micaps第四类 数据无投影: 151 | 152 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/2.png) 153 | 154 | Micaps第四类 数据Lambert投影: 155 | 156 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/1.png) 157 | 158 | Micaps第三类数据-等经纬度投影: 159 | 160 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/4.png) 161 | 162 | Micaps第三类数据-Lambert投影: 163 | 164 | ![](https://github.com/flashlxy/MicapsDataDraw/raw/master/images/lcc.png) 165 | -------------------------------------------------------------------------------- /SampleData/17011418.000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17011418.000 -------------------------------------------------------------------------------- /SampleData/17032908.060: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17032908.060 -------------------------------------------------------------------------------- /SampleData/17033108.240: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17033108.240 -------------------------------------------------------------------------------- /SampleData/17033115.000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17033115.000 -------------------------------------------------------------------------------- /SampleData/17041020.000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17041020.000 -------------------------------------------------------------------------------- /SampleData/17041720.048: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/17041720.048 -------------------------------------------------------------------------------- /SampleData/data.txt: -------------------------------------------------------------------------------- 1 | diamond 3 ZDZData 2 | 17 01 01 00 -1 3 | 0 4 | 1 25 0 5 | 1 375 6 | 54398 116.62 40.13 1 11.5 7 | 54399 116.3 40 1 24.3 8 | 54406 115.97 40.45 1 2.4 9 | 54410 116.1 40.6 1 1.5 10 | 54412 116.6 40.7 1 0 11 | 54416 116.87 40.38 1 3.4 12 | 54419 116.63 40.37 1 3.6 13 | 54421 117.1 40.7 1 0.5 14 | 54424 117.12 40.17 1 4.4 15 | 54431 116.63 39.92 1 34 16 | 54433 116.5 40 1 22.8 17 | 54499 116.22 40.22 1 18 18 | 54501 115.7 40 1 11.4 19 | 54505 116.12 39.92 1 31.4 20 | 54511 116.47 39.8 1 24.7 21 | 54513 116.2 39.9 1 28.8 22 | 54514 116.3 39.9 1 26.6 23 | 54594 116.35 39.72 1 52.1 24 | 54596 116.13 39.68 1 31.6 25 | 54597 115.7 39.7 1 20.2 26 | A1001 116.3906 39.9 1 18.4 27 | A1003 116.4433 39.9314 1 17.6 28 | A1006 116.3544 39.9331 1 16.6 29 | A1007 116.3967 39.9819 1 12 30 | A1008 116.4614 39.9756 1 17.3 31 | A1009 116.475 39.8531 1 39.9 32 | A1010 116.3058 39.8619 1 30.7 33 | A1013 116.3144 39.9444 1 18.7 34 | A1014 116.4283 39.9053 1 22.2 35 | A1015 116.3506 39.8714 1 17.8 36 | A1016 116.4047 39.8844 1 20 37 | A1017 116.3906 40.0225 1 13.2 38 | A1018 116.4819 39.9444 1 23.6 39 | A1019 116.2117 39.9156 1 18.8 40 | A1020 116.3889 39.8719 1 18.1 41 | A1021 116.2814 39.8067 1 38.4 42 | A1022 116.1661 39.8789 1 26.5 43 | A1023 116.3983 39.83 1 31 44 | A1024 116.2911 39.9453 1 18.3 45 | A1029 116.3058 39.9139 1 18.5 46 | A1030 116.4278 39.8731 1 30.9 47 | A1031 116.1714 39.9642 1 31.8 48 | A1032 116.195 39.9967 1 30.3 49 | A1033 116.1811 40.1358 1 4.2 50 | A1034 116.3211 40.0153 1 17.3 51 | A1035 116.3422 39.8158 1 23.7 52 | A1036 116.1575 39.9333 1 31.2 53 | A1037 116.1592 39.8089 1 32.8 54 | A1038 116.4808 39.9075 1 33.9 55 | A1039 116.6217 39.9719 1 22.5 56 | A1040 116.4408 40.0272 1 9.7 57 | A1041 116.5911 39.8306 1 32 58 | A1042 116.4094 39.9683 1 13.3 59 | A1043 116.2356 39.9042 1 28.2 60 | A1045 116.2664 40.0039 1 18.4 61 | A1046 116.3414 39.8461 1 17.3 62 | A1047 116.3914 39.8564 1 17.7 63 | A1048 116.4806 39.9256 1 28.9 64 | A1049 116.35 39.9069 1 15 65 | A1050 116.0903 40.08 1 26.2 66 | A1051 116.0986 40.1114 1 17.8 67 | A1052 116.5486 39.9075 1 31.7 68 | A1053 116.2719 39.8669 1 32.3 69 | A1054 116.235 40.0656 1 25.7 70 | A1060 116.3842 39.9067 1 17.5 71 | A1061 116.3333 39.9844 1 18.2 72 | A1065 116.2769 39.9089 1 23.9 73 | A1066 116.1139 39.8572 1 27.8 74 | A1067 116.0717 39.8689 1 29.4 75 | A1068 116.2103 39.9681 1 0.1 76 | A1069 116.2039 40.0375 1 26.6 77 | A1070 116.2164 39.8456 1 29 78 | A1072 116.5264 39.8761 1 19.2 79 | A1073 116.5556 40.0033 1 23.8 80 | A1074 116.3214 39.9472 1 17.8 81 | A1076 116.3944 39.9156 1 18.9 82 | A1078 116.1939 39.8719 1 27.8 83 | A1079 116.1983 39.8792 1 32.9 84 | A1080 116.1244 39.9308 1 26.5 85 | A1081 116.12 39.9667 1 32.6 86 | A1085 116.5244 40.0581 1 15.5 87 | A1086 116.5056 40.0236 1 17.9 88 | A1087 116.51 39.9681 1 21.7 89 | A1088 116.4753 39.8319 1 29 90 | A1089 116.4972 39.8714 1 30 91 | A1090 116.5453 39.9319 1 35.4 92 | A1091 116.5614 39.8842 1 27.7 93 | A1092 116.6133 39.9089 1 25.4 94 | A1093 116.6217 39.9361 1 30.6 95 | A1094 116.5628 39.9486 1 42.3 96 | A1095 116.3508 39.81 1 21.7 97 | A1099 116.3902778 39.9905556 1 9999 98 | A1102 116.1981 39.8906 1 40 99 | A1103 116.1011 39.5237 1 29.7 100 | A1201 116.7764 39.6769 1 0.1 101 | A1202 116.7144 39.8478 1 28.7 102 | A1203 116.5553 39.7472 1 32.2 103 | A1204 116.8636 39.8381 1 13.9 104 | A1205 116.7511 39.9236 1 20.6 105 | A1208 116.6978 39.6867 1 33.4 106 | A1209 116.7689 39.7717 1 16 107 | A1212 116.6094 39.8375 1 35.6 108 | A1213 116.6861 39.9072 1 26.7 109 | A1214 116.6789 39.9572 1 29 110 | A1215 116.7236 39.7581 1 20.1 111 | A1216 116.72361 39.75806 1 9999 112 | A1218 116.7875 39.8428 1 17.5 113 | A1219 116.6281 39.8428 1 33.9 114 | A1251 116.6464 39.6192 1 19.9 115 | A1252 116.3211 39.5222 1 38.3 116 | A1253 116.5031 39.6933 1 36.2 117 | A1254 116.325 39.6028 1 65.3 118 | A1255 116.5106 39.6156 1 37.5 119 | A1256 116.5681 39.6978 1 31.6 120 | A1257 116.4425 39.7631 1 20.4 121 | A1258 116.4086 39.6283 1 37.1 122 | A1259 116.4144 39.5414 1 40.1 123 | A1260 116.3281 39.7878 1 33.1 124 | A1261 116.2508 39.6636 1 48.2 125 | A1265 116.3475 39.4578 1 31.4 126 | A1266 116.3272 39.55 1 49.2 127 | A1267 116.2431 39.5925 1 46.2 128 | A1268 116.4364 39.81 1 50.5 129 | A1270 116.2528 39.7353 1 30.8 130 | A1309 115.7289 39.5794 1 22.2 131 | A1310 115.8828 39.8203 1 25.8 132 | A1311 115.8911 39.6194 1 31.1 133 | A1312 115.5247 39.7822 1 12.4 134 | A1313 115.9069 39.6697 1 41.9 135 | A1314 116.1289 39.7433 1 34.8 136 | A1315 115.8319 39.7678 1 21.5 137 | A1316 116.11 39.6072 1 29 138 | A1317 115.6681 39.8528 1 14.9 139 | A1318 115.6025 39.635 1 6.6 140 | A1319 116.0333 39.7761 1 37.9 141 | A1320 115.7708 39.885 1 7.8 142 | A1321 116.0083 39.705 1 33.1 143 | A1322 115.8206 39.5519 1 33.9 144 | A1323 116.1106 39.6467 1 33 145 | A1324 116.1906 39.6903 1 48 146 | A1327 115.8747 39.5828 1 35.3 147 | A1328 115.715 39.8356 1 11.6 148 | A1329 115.5808 39.8128 1 15.8 149 | A1330 115.8419 39.6331 1 41.6 150 | A1331 116.0244 39.6097 1 37.5 151 | A1332 115.8594 39.7903 1 14.3 152 | A1333 115.8558 39.6892 1 35.7 153 | A1334 116.0131 39.8292 1 26.7 154 | A1335 115.9133 39.7314 1 27.7 155 | A1336 115.8369 39.7206 1 27.5 156 | A1337 115.8264 39.6069 1 39.4 157 | A1338 115.7053 39.875 1 11.3 158 | A1339 116.1383 39.6772 1 38.7 159 | A1344 115.9853 39.6567 1 31 160 | A1345 116.0808 39.6831 1 33.2 161 | A1346 115.9219 39.805 1 16.4 162 | A1351 115.4961 40.0489 1 9.4 163 | A1352 116.0233 40.0681 1 12.2 164 | A1353 115.6203 39.9428 1 12.7 165 | A1354 116.105 39.9378 1 32.5 166 | A1355 115.7672 39.995 1 3.1 167 | A1356 116.0228 39.8772 1 26.8 168 | A1357 115.945 39.9728 1 13.7 169 | A1358 115.8778 40.0319 1 6.7 170 | A1359 115.5003 39.9394 1 4.2 171 | A1360 115.5839 39.8672 1 9.8 172 | A1361 116.0531 39.9842 1 20.2 173 | A1362 115.7136 40.07 1 7.2 174 | A1363 116.1311 40.0144 1 20.9 175 | A1364 115.8603 40.13 1 14.5 176 | A1365 115.8936 40.0731 1 7.5 177 | A1366 115.6394 39.9958 1 22.8 178 | A1367 115.7836 39.94 1 13.3 179 | A1368 115.5661 39.8831 1 1.5 180 | A1369 115.9994 39.9753 1 14.8 181 | A1370 115.815 40.1269 1 7.9 182 | A1371 116.085 40.0089 1 34.4 183 | A1372 115.59 39.9025 1 0 184 | A1373 115.76 40.0364 1 9999 185 | A1374 115.6472 39.9206 1 11 186 | A1375 115.5719 39.9872 1 6.8 187 | A1376 115.7483 40.0908 1 0 188 | A1377 115.6828 39.9464 1 14.6 189 | A1378 116.0489 39.9058 1 21.3 190 | A1379 115.9064 39.9517 1 10.5 191 | A1380 116.0889 39.9739 1 29.5 192 | A1381 116.1094 39.9142 1 26.5 193 | A1401 116.3836 40.1831 1 11.8 194 | A1402 116.3028 40.3678 1 7.4 195 | A1403 116.0672 40.2883 1 6.1 196 | A1404 116.03 40.1983 1 9.8 197 | A1405 116.3322 40.2267 1 20.7 198 | A1406 116.1778 40.2567 1 22.6 199 | A1407 116.2453 40.2939 1 13.3 200 | A1408 116.4531 40.2208 1 21.3 201 | A1409 116.2856 40.1472 1 14.8 202 | A1410 115.9756 40.1019 1 6.1 203 | A1411 116.2658 40.2436 1 16.2 204 | A1415 116.3458 40.1733 1 14.2 205 | A1416 116.4192 40.1172 1 9.5 206 | A1417 115.9461 40.2136 1 5.5 207 | A1418 116.1561 40.1944 1 19.9 208 | A1419 116.2417 40.275 1 12.7 209 | A1421 116.3578 40.2022 1 12.4 210 | A1422 116.07 40.1719 1 19.4 211 | A1423 116.4206 40.3103 1 15.5 212 | A1424 116.3294 40.1269 1 14.9 213 | A1425 116.0081 40.1603 1 11.4 214 | A1426 115.875 40.1556 1 15 215 | A1427 116.0006 40.2003 1 10 216 | A1428 116.2392 40.1194 1 11.9 217 | A1429 115.9436 40.155 1 5.9 218 | A1430 116.1536 40.3236 1 9.8 219 | A1431 116.06 40.22 1 13.9 220 | A1432 116.2069 40.3181 1 11.4 221 | A1433 116.4217 40.275 1 19.8 222 | A1434 116.3225 40.3086 1 19.6 223 | A1435 116.4375 40.23 1 20.7 224 | A1436 116.215 40.365 1 14 225 | A1437 116.3228 40.26 1 12.3 226 | A1438 116.1003 40.2436 1 11.6 227 | A1439 116.3338889 40.07305556 1 9999 228 | A1440 116.3911111 40.065 1 9999 229 | A1441 116.3319 40.1911 1 16.4 230 | A1442 116.2119 40.2219 1 0.7 231 | A1443 116.1489 40.1469 1 32.2 232 | A1444 116.3339 40.0731 1 15.2 233 | A1445 116.3911 40.065 1 13.5 234 | A1451 115.8939 40.4558 1 1.7 235 | A1452 116.4061 40.5297 1 0.3 236 | A1453 115.6078 40.2347 1 1.9 237 | A1454 116.005 40.5461 1 1.2 238 | A1455 116.2225 40.4361 1 10.7 239 | A1456 116.4869 40.5969 1 0 240 | A1457 116.1775 40.6531 1 0.2 241 | A1458 115.8647 40.4417 1 0.5 242 | A1459 116.0683 40.4442 1 8 243 | A1460 116.1689 40.5242 1 5.1 244 | A1461 115.8886 40.5442 1 0 245 | A1462 116.3239 40.6931 1 0.4 246 | A1463 116.1983 40.5814 1 1.7 247 | A1464 115.7822 40.4517 1 3.1 248 | A1465 116.2631 40.705 1 0 249 | A1466 116.0642 40.5311 1 0.8 250 | A1468 115.9975 40.3572 1 9.1 251 | A1469 115.8139 40.5044 1 1.3 252 | A1470 115.8497 40.4078 1 1 253 | A1471 115.9397 40.5197 1 0.4 254 | A1473 116.3197 40.63 1 0.2 255 | A1474 116.4281 40.7517 1 0.8 256 | A1475 116.3439 40.5381 1 3.3 257 | A1476 116.2383 40.4156 1 14.8 258 | A1477 116.4811 40.6683 1 0 259 | A1478 116.0931 40.4061 1 14.8 260 | A1479 116.0094 40.4881 1 3.3 261 | A1480 116.4203 40.5547 1 0.3 262 | A1481 115.9008 40.4122 1 3.2 263 | A1482 115.9719 40.4772 1 1.4 264 | A1483 116.2539 40.4397 1 6.9 265 | A1484 116.3581 40.5217 1 2.4 266 | A1485 116.1814 40.4269 1 11.7 267 | A1486 116.0889 40.5947 1 1.1 268 | A1487 115.8694 40.4669 1 1.2 269 | A1488 116.0967 40.5078 1 2.7 270 | A1489 115.7825 40.5203 1 0.5 271 | A1490 115.8014 40.5414 1 9999 272 | A1491 115.8292 40.5542 1 9999 273 | A1492 115.8194 40.5433 1 9999 274 | A1496 115.5742 40.312 1 9999 275 | A1501 117.3286 40.1819 1 3 276 | A1502 116.9975 40.0439 1 8.6 277 | A1503 117.0425 40.3017 1 4.9 278 | A1504 117.2217 40.1453 1 3.4 279 | A1505 117.1678 40.1983 1 3.6 280 | A1506 117.2331 40.2056 1 2.7 281 | A1507 117.1619 40.3506 1 2.1 282 | A1508 116.9364 40.2044 1 6.7 283 | A1509 117.1492 40.1275 1 4.6 284 | A1510 117.2106 40.2503 1 2.7 285 | A1511 117.2275 40.3331 1 2.5 286 | A1513 116.9964 40.1169 1 10.7 287 | A1514 117.1428 40.0761 1 5.5 288 | A1515 117.2928 40.2164 1 2 289 | A1517 117.1675 40.2994 1 2.6 290 | A1518 117.0364 40.1583 1 6.9 291 | A1519 117.1064 40.2572 1 3 292 | A1520 117.3233 40.2411 1 1.3 293 | A1521 117.2725 40.2781 1 1.8 294 | A1522 116.9831 40.2561 1 4.4 295 | A1523 117.2303 40.3558 1 1.9 296 | A1524 117.0214 40.3186 1 4.4 297 | A1525 117.1581 40.2272 1 2.6 298 | A1526 117.1089 40.2214 1 3.3 299 | A1527 117.355 40.2183 1 1.4 300 | A1530 117.0886 40.1208 1 7.2 301 | A1531 117.0319 40.2178 1 6.2 302 | A1551 116.6592 40.1667 1 14.6 303 | A1552 116.6864 40.1817 1 11.3 304 | A1553 116.9147 40.0867 1 14.5 305 | A1554 116.8511 40.2314 1 5.7 306 | A1555 116.8072 40.1386 1 10.8 307 | A1556 116.6375 40.0758 1 15.6 308 | A1557 116.7228 40.1972 1 10.2 309 | A1558 116.5897 40.1208 1 11.1 310 | A1559 116.75 40.0869 1 16.5 311 | A1560 116.5372 40.1111 1 15.2 312 | A1561 116.5794 40.1817 1 6.4 313 | A1562 116.5072 40.2097 1 6.2 314 | A1563 116.8622 40.2644 1 4.8 315 | A1568 116.5714 40.0581 1 10.1 316 | A1569 116.6508 40.2061 1 6.9 317 | A1570 116.6508 40.2439 1 6.2 318 | A1571 116.7053 40.1331 1 13.2 319 | A1572 116.6622 40.1225 1 13.4 320 | A1573 116.7675 40.2436 1 6.6 321 | A1574 116.8208 40.0658 1 15.6 322 | A1575 116.9131 40.1503 1 11.7 323 | A1601 116.6786 40.2947 1 4.2 324 | A1602 116.4539 40.3597 1 6.6 325 | A1603 116.6842 40.3906 1 2.4 326 | A1604 116.6575 40.6033 1 0.3 327 | A1605 116.7606 40.7994 1 0 328 | A1606 116.4611 40.4139 1 5 329 | A1607 116.5647 40.6933 1 0.1 330 | A1608 116.55 40.2847 1 9 331 | A1609 116.6206 40.3022 1 2.9 332 | A1610 116.6153 40.9011 1 0 333 | A1617 116.4869 40.8025 1 0 334 | A1618 116.5567 40.3931 1 8.5 335 | A1619 116.6025 40.5831 1 0.3 336 | A1620 116.7047 40.845 1 0 337 | A1621 116.6306 40.3203 1 2.8 338 | A1622 116.3367 40.4072 1 3 339 | A1623 116.5325 40.4694 1 6.9 340 | A1625 116.64861 40.40028 1 9999 341 | A1626 116.6992 40.3264 1 3.9 342 | A1627 116.7617 40.7597 1 0 343 | A1628 116.6472 40.9444 1 0 344 | A1629 116.5211 40.8408 1 0 345 | A1630 116.6558 40.4925 1 0.9 346 | A1631 116.6011 40.4672 1 1.7 347 | A1632 116.6683 40.3956 1 2.7 348 | A1633 116.6228 40.2711 1 3.6 349 | A1651 117.1211 40.5364 1 0.2 350 | A1652 116.9706 40.5647 1 0.6 351 | A1653 117.3289 40.6419 1 0 352 | A1654 117.1156 40.4 1 1.8 353 | A1655 116.8481 40.4744 1 4.5 354 | A1656 116.8697 40.6192 1 9.5 355 | A1657 116.9614 40.2928 1 5.7 356 | A1658 116.675 40.5528 1 0.3 357 | A1659 116.7542 40.6506 1 0 358 | A1660 116.8056 40.5614 1 1.3 359 | A1661 116.8569 40.7617 1 0.1 360 | A1662 117.1744 40.5081 1 0.6 361 | A1663 116.9903 40.435 1 4.2 362 | A1664 117.1578 40.6853 1 0.4 363 | A1665 117.3553 40.5983 1 0 364 | A1666 116.7375 40.4617 1 2.3 365 | A1667 116.7636 40.5556 1 1.1 366 | A1669 116.8039 40.7256 1 0 367 | A1670 116.9417 40.3806 1 5.7 368 | A1671 116.8836 42.6531 1 6.3 369 | A1672 116.8406 40.6022 1 3.7 370 | A1673 116.7989 40.605 1 0.2 371 | A1674 116.9919 40.6239 1 3.8 372 | A1675 116.8211 40.3308 1 6 373 | A1676 116.8083 40.3792 1 6.2 374 | A1677 116.7831 40.3519 1 6.7 375 | T0001 116.18 40.09 1 9999 376 | T0002 116.3 40.01 1 9999 377 | T0003 116.12 40.05 1 9999 378 | T0004 116.26 40.03 1 9999 379 | T0005 116.09 40.07 1 9999 380 | T0006 116 39.99 1 9999 381 | -------------------------------------------------------------------------------- /SampleData/jxstation.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/SampleData/jxstation.txt -------------------------------------------------------------------------------- /SampleData/readme.txt: -------------------------------------------------------------------------------- 1 | sample data 2 | -------------------------------------------------------------------------------- /Stations.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 站点类 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-14 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170414 8 | from __future__ import print_function 9 | from Micaps17Data import Micaps17Data 10 | from Projection import Projection 11 | 12 | 13 | class Stations: 14 | def __init__(self, root): 15 | leaf = root.find("Stations") 16 | 17 | self.file = Projection.leaf_to_string(leaf, "File") 18 | self.visible = Projection.leaf_to_bool(leaf, "Visible", False) 19 | self.markstyle = Projection.leaf_to_list(leaf, "MarkStyle", ["o", "full"]) 20 | self.color = Projection.leaf_to_string(leaf, "Color", "k") 21 | self.edgecolors = Projection.leaf_to_string(leaf, "EdgeColors", "k") 22 | 23 | self.alpha = Projection.leaf_to_float(leaf, "Alpha", 1.0) 24 | self.radius = Projection.leaf_to_float(leaf, "Radius", 5) 25 | self.font = Projection.leaf_to_list(leaf, "Font", [18, "myyh.ttc", "bold", "k"]) 26 | self.detax = Projection.leaf_to_float(leaf, "Detax", 0.03) 27 | self.micapsdata = Micaps17Data(self.file) 28 | -------------------------------------------------------------------------------- /Title.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-06 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 1.1.20170406 8 | from __future__ import print_function 9 | from HeadDesc import HeadDesc 10 | from Main import parseInt 11 | from Projection import Projection 12 | 13 | 14 | class Title: 15 | def __init__(self, root): 16 | p = root.find("Title") 17 | 18 | # 是否按Micaps数据的标题写产品描述 19 | self.mtitleposition = Projection.leaf_to_list(p, "MTitlePosition", None) 20 | 21 | # 产品图片文字描述(可能多个) 22 | descs = list(p.find("Descs")) 23 | self.descs = [] 24 | for desc in descs: 25 | txt = Projection.leaf_to_string(desc, "Text", "测试数据") 26 | pos = Projection.leaf_to_list(desc, "Position", [113.2, 30.5]) 27 | fonts = desc.find("Font").text.strip().split(",") 28 | font = { 29 | "family": "monospace", 30 | "weight": "bold", 31 | "fontsize": 12, 32 | "color": "k", 33 | } 34 | if len(fonts) == 4: 35 | font["fontsize"] = parseInt(fonts[0].strip()) 36 | font["family"] = fonts[1] 37 | font["weight"] = fonts[2] 38 | font["color"] = fonts[3] 39 | self.descs.append(HeadDesc(txt, pos, font)) 40 | -------------------------------------------------------------------------------- /UV.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Author: Liu xianyao 4 | # Email: flashlxy@qq.com 5 | # Update: 2017-04-11 6 | # Copyright: ©江西省气象台 2017 7 | # Version: 2.0.20170411 8 | from __future__ import print_function 9 | from Projection import Projection 10 | 11 | 12 | class UV: 13 | def __init__(self, root): 14 | leaf = root.find("UV") 15 | if leaf is None: 16 | return 17 | 18 | self.stream = Projection.leaf_to_bool(leaf, "Stream", False) 19 | self.density = Projection.leaf_to_list(leaf, "Density", [1, 1]) 20 | self.barbsgrid = Projection.leaf_to_list(leaf, "BarbsGrid", [31, 31]) 21 | self.color = Projection.leaf_to_string(leaf, "Color", "k") 22 | self.onspeed = Projection.leaf_to_bool(leaf, "OnSpeed", False) 23 | self.wholecilp = Projection.leaf_to_bool(leaf, "WholeClip", False) 24 | self.oncolor = Projection.leaf_to_bool(leaf, "OnColor", False) 25 | self.linewidth = Projection.leaf_to_float(leaf, "LineWidth", 1.0) 26 | self.scale = Projection.leaf_to_int(leaf, "Scale", 700) 27 | self.markscalelength = Projection.leaf_to_float(leaf, "MarkScaleLength", 12.0) 28 | 29 | self.barbs = Projection.leaf_to_bool(leaf, "Barbs", False) 30 | self.length = Projection.leaf_to_int(leaf, "Length", 1) 31 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /borders/JA.txt: -------------------------------------------------------------------------------- 1 | 115.631578 27.484354 115.616844 27.504513 115.613597 27.51869 115.598593 27.526621 115.612501 27.544373 115.615161 27.573269 115.610471 27.577417 115.623742 27.597871 115.624194 27.606512 115.631199 27.617696 115.643756 27.624423 115.658529 27.642999 115.669213 27.650398 115.670561 27.656639 115.682491 27.657534 115.702045 27.684774 115.719917 27.699079 115.73201 27.715526 115.741709 27.735278 115.734698 27.756867 115.736915 27.763681 115.732744 27.768256 115.726765 27.767121 115.703187 27.777233 115.696559 27.791836 115.684734 27.798531 115.679681 27.815879 115.663916 27.834198 115.650768 27.826839 115.643246 27.829871 115.636694 27.827546 115.61884 27.834118 115.592474 27.850822 115.584717 27.869519 115.572829 27.866082 115.558014 27.871669 115.548261 27.877861 115.538902 27.890535 115.530784 27.891291 115.51716 27.902462 115.523136 27.91341 115.520874 27.922356 115.535974 27.931126 115.541547 27.938366 115.544032 27.949601 115.541012 27.955392 115.530842 27.95277 115.517469 27.954045 115.49117 27.962821 115.482382 27.954402 115.470171 27.951961 115.481023 27.940576 115.477727 27.932171 115.466298 27.926912 115.446487 27.939432 115.449974 27.964434 115.435558 27.967603 115.431832 27.962945 115.433227 27.952624 115.420723 27.96124 115.399629 27.949939 115.400256 27.941305 115.414809 27.935632 115.415665 27.931531 115.410461 27.917373 115.393177 27.906896 115.390721 27.898209 115.400643 27.889088 115.412247 27.886329 115.413921 27.879434 115.403032 27.875141 115.39731 27.876584 115.39432 27.866854 115.388709 27.871286 115.367494 27.867402 115.366594 27.851785 115.358357 27.838571 115.33775 27.824703 115.325237 27.803904 115.295954 27.777845 115.286784 27.773204 115.211632 27.757284 115.184223 27.740946 115.172366 27.739026 115.16279 27.722443 115.155373 27.716239 115.142452 27.716432 115.145376 27.732919 115.142796 27.737043 115.133611 27.740089 115.13286 27.743819 115.127758 27.743138 115.119633 27.735471 115.114753 27.721634 115.092879 27.710146 115.088225 27.71152 115.085554 27.723311 115.069888 27.732691 115.064296 27.732356 115.030548 27.716824 115.033045 27.702933 115.022167 27.69485 115.021747 27.673851 115.02674 27.669513 115.024598 27.658973 115.015489 27.656916 115.004195 27.661353 114.986789 27.680501 114.982448 27.680938 114.967197 27.667464 114.976586 27.662599 114.976814 27.656251 114.96054 27.645727 114.95018 27.646083 114.935832 27.639486 114.932132 27.635796 114.932926 27.630088 114.919752 27.620956 114.895092 27.614162 114.894022 27.607078 114.886135 27.597255 114.87092 27.597828 114.859358 27.591218 114.845775 27.596527 114.834498 27.5961 114.827425 27.603948 114.824885 27.613868 114.783779 27.626313 114.767878 27.611743 114.761354 27.613424 114.748971 27.60877 114.748373 27.600363 114.743495 27.595663 114.73691 27.606465 114.716273 27.605244 114.709358 27.597461 114.686143 27.594498 114.675288 27.583764 114.674202 27.574077 114.667216 27.569589 114.658425 27.547981 114.641288 27.536134 114.630001 27.541353 114.624219 27.562352 114.614875 27.561096 114.608235 27.555473 114.600093 27.561938 114.601069 27.567504 114.597133 27.571116 114.550458 27.570557 114.542184 27.579974 114.537205 27.601859 114.514141 27.608821 114.506919 27.603253 114.51032 27.595083 114.508829 27.588573 114.490317 27.582072 114.472499 27.563666 114.468626 27.568059 114.44064 27.56901 114.43127 27.564816 114.423542 27.553831 114.381814 27.556439 114.374385 27.551811 114.355468 27.570333 114.341646 27.560733 114.339998 27.565612 114.31534 27.58143 114.291487 27.584306 114.273814 27.577068 114.262118 27.567651 114.235895 27.557892 114.22564 27.533032 114.209027 27.528615 114.205702 27.511601 114.210803 27.499862 114.200924 27.479162 114.187753 27.466678 114.184354 27.45509 114.174717 27.445872 114.163166 27.444981 114.15009 27.436649 114.131163 27.435346 114.119278 27.442678 114.092401 27.434305 114.077936 27.439781 114.067451 27.436633 114.046422 27.439309 114.039962 27.43424 114.033952 27.412682 114.029546 27.40898 114.032805 27.40141 114.027497 27.397077 114.023705 27.385984 114.04654 27.387033 114.059694 27.38052 114.056021 27.375124 114.061181 27.367872 114.080349 27.357906 114.077514 27.353781 114.078984 27.342815 114.089198 27.33843 114.120356 27.334151 114.116024 27.321881 114.117667 27.317899 114.133997 27.312555 114.14315 27.319398 114.14727 27.318459 114.145363 27.306046 114.156003 27.288102 114.155014 27.271318 114.164386 27.259022 114.16417 27.248713 114.129212 27.224608 114.119819 27.230013 114.104877 27.218549 114.10086 27.212641 114.104477 27.2033 114.097796 27.196936 114.092523 27.174859 114.082486 27.160399 114.055976 27.163929 114.041874 27.153991 114.019873 27.128865 114.010404 27.101082 114.002263 27.091816 114.004171 27.064089 113.98892 27.051598 113.985862 27.042365 113.973128 27.039585 113.970541 27.036114 113.965335 27.022805 113.969653 27.007696 113.967747 27.004871 113.954917 27.004243 113.937073 26.984452 113.927942 26.965887 113.932934 26.952924 113.910187 26.934343 113.907532 26.924053 113.909529 26.916776 113.896856 26.901823 113.895053 26.886391 113.897798 26.874523 113.891355 26.867441 113.88036 26.86261 113.865463 26.839971 113.864405 26.832979 113.841167 26.809857 113.843339 26.801946 113.852472 26.794109 113.860036 26.775512 113.862905 26.720862 113.869084 26.705749 113.86697 26.670294 113.874466 26.659284 113.883603 26.662822 113.887904 26.660702 113.891344 26.642137 113.906371 26.635875 113.912919 26.621756 113.945483 26.618536 113.959713 26.619476 113.969087 26.624371 113.976753 26.622644 113.979923 26.618542 113.983359 26.622343 114.00279 26.621944 114.024116 26.605852 114.022055 26.597743 114.026189 26.593644 114.039603 26.591578 114.065831 26.579906 114.091203 26.583713 114.108256 26.582595 114.112709 26.578761 114.113334 26.568702 114.102766 26.554419 114.10401 26.547385 114.086314 26.52196 114.090635 26.508434 114.078775 26.493155 114.07995 26.485097 114.100552 26.486151 114.106814 26.480481 114.092935 26.445551 114.095174 26.41749 114.091955 26.412216 114.083025 26.409963 114.078248 26.415591 114.070645 26.41312 114.056452 26.396847 114.049524 26.396062 114.042777 26.383245 114.037044 26.382634 114.038345 26.375276 114.046194 26.367278 114.046286 26.351539 114.056688 26.343456 114.042987 26.332725 114.045821 26.313666 114.033703 26.304597 114.028059 26.294722 114.029551 26.281986 114.035785 26.272413 113.995534 26.252983 113.985358 26.243918 113.987376 26.234882 113.97804 26.225381 113.97917 26.212052 113.973813 26.205944 113.954373 26.195538 113.952703 26.19022 113.958374 26.18362 113.958206 26.177663 113.951091 26.169446 113.966986 26.156667 113.975288 26.160953 113.988438 26.159148 113.986359 26.167267 114.012271 26.187047 114.015144 26.185904 114.019829 26.190371 114.034409 26.186115 114.042914 26.194486 114.050959 26.187418 114.064152 26.187344 114.06099 26.176268 114.062958 26.169216 114.067059 26.168491 114.068799 26.17313 114.075636 26.175444 114.093114 26.17218 114.100523 26.1825 114.106832 26.184629 114.106797 26.190865 114.11163 26.195366 114.142608 26.204728 114.148405 26.209554 114.159748 26.210365 114.184526 26.222241 114.187945 26.220961 114.193192 26.202859 114.223273 26.209284 114.227599 26.196318 114.23884 26.18778 114.224947 26.17469 114.225858 26.170152 114.231819 26.165935 114.242115 26.166429 114.243911 26.160256 114.196317 26.127259 114.174258 26.128217 114.163205 26.121714 114.115184 26.106604 114.112124 26.103905 114.113922 26.101456 114.125386 26.096264 114.127437 26.092265 114.113358 26.075752 114.106513 26.07803 114.09212 26.072297 114.076422 26.084286 114.050367 26.082486 114.053826 26.07523 114.045859 26.071815 114.042363 26.050698 114.03448 26.037874 114.014345 26.020487 114.016165 26.00657 114.020815 26.007646 114.026575 25.999523 114.034247 25.997736 114.033902 25.985164 114.027192 25.978382 114.045542 25.992675 114.064397 25.997567 114.080906 25.992414 114.090139 25.998706 114.112038 25.998015 114.128661 26.010931 114.137218 26.007793 114.155383 26.015987 114.158058 26.024487 114.167838 26.031179 114.196682 26.035022 114.227806 26.02505 114.237501 26.032986 114.26415 26.032392 114.27631 26.03558 114.283937 26.041404 114.288333 26.037678 114.299617 26.040585 114.298089 26.05171 114.301223 26.058593 114.312312 26.064715 114.318742 26.073137 114.340095 26.082029 114.342403 26.088488 114.351054 26.094611 114.3634 26.097197 114.381502 26.122757 114.39797 26.118159 114.408362 26.119484 114.418643 26.112849 114.432881 26.113509 114.430905 26.104924 114.435301 26.087739 114.45009 26.114703 114.463022 26.120473 114.459285 26.148918 114.462274 26.151974 114.470088 26.150514 114.48206 26.155108 114.495411 26.170865 114.508822 26.177605 114.526605 26.198561 114.529559 26.214442 114.5353 26.222748 114.539525 26.225335 114.547833 26.219341 114.551999 26.219793 114.558792 26.232036 114.586942 26.242418 114.600945 26.23853 114.605065 26.231043 114.613953 26.229487 114.616482 26.222434 114.613244 26.205097 114.627186 26.209086 114.653824 26.200118 114.674098 26.201266 114.673802 26.190781 114.692171 26.187882 114.701708 26.178756 114.710384 26.177191 114.715605 26.170526 114.724884 26.172316 114.73252 26.180466 114.734631 26.190524 114.74624 26.192129 114.76951 26.181454 114.775184 26.193436 114.781646 26.198301 114.788919 26.192977 114.795648 26.194553 114.805113 26.189226 114.823947 26.188734 114.832245 26.196555 114.841447 26.195755 114.844156 26.200181 114.849195 26.199155 114.858012 26.20548 114.868686 26.199516 114.866966 26.191261 114.880344 26.190936 114.885702 26.192698 114.886295 26.199396 114.894866 26.209154 114.909528 26.207735 114.911203 26.215219 114.91709 26.217637 114.940042 26.213194 114.943945 26.205977 114.953085 26.207897 114.970446 26.204077 114.980671 26.207696 114.991196 26.202035 115.003869 26.20398 115.01514 26.194745 115.017436 26.174751 115.02816 26.181127 115.036052 26.165171 115.050423 26.164771 115.068527 26.150152 115.084701 26.150867 115.101677 26.160445 115.107824 26.171089 115.105402 26.178113 115.090455 26.186496 115.086614 26.194023 115.076942 26.194429 115.07166 26.199501 115.048607 26.201745 115.057981 26.209412 115.053731 26.217688 115.058065 26.225663 115.089668 26.248457 115.085573 26.262617 115.097574 26.27321 115.077801 26.292961 115.076989 26.308277 115.08093 26.317327 115.075156 26.329344 115.033093 26.365122 115.042028 26.371003 115.049411 26.384014 115.045752 26.396504 115.053526 26.40738 115.054861 26.421012 115.061337 26.425758 115.060496 26.435339 115.067413 26.453039 115.116633 26.506301 115.170829 26.528123 115.197886 26.528247 115.221969 26.51974 115.234755 26.523874 115.237686 26.529032 115.236396 26.538135 115.229108 26.544128 115.241894 26.564792 115.263676 26.580247 115.274366 26.607999 115.287823 26.614023 115.294416 26.629354 115.309907 26.638109 115.312373 26.643527 115.309663 26.661927 115.335343 26.669208 115.342801 26.680016 115.356456 26.67799 115.356989 26.672663 115.363875 26.669152 115.364055 26.662113 115.391216 26.65594 115.408197 26.666639 115.42097 26.666675 115.433436 26.676281 115.434349 26.682672 115.454108 26.693981 115.461907 26.69067 115.469795 26.679648 115.479585 26.678564 115.495237 26.687543 115.50846 26.683139 115.516614 26.696765 115.533251 26.701356 115.541236 26.693774 115.543918 26.662576 115.553211 26.65523 115.568624 26.650533 115.592025 26.656611 115.600673 26.666184 115.650524 26.667059 115.656476 26.659572 115.675033 26.654816 115.692375 26.662943 115.694247 26.67257 115.705297 26.678882 115.707487 26.688552 115.721681 26.69532 115.708199 26.706892 115.710801 26.711911 115.723359 26.714507 115.731132 26.711736 115.738145 26.716971 115.731057 26.764385 115.727074 26.766316 115.719007 26.760782 115.711828 26.760301 115.693878 26.771382 115.687406 26.77166 115.681494 26.779119 115.683324 26.783046 115.693932 26.786988 115.693112 26.795874 115.699714 26.807901 115.692766 26.811883 115.697573 26.821446 115.69451 26.829367 115.711789 26.847363 115.712006 26.855792 115.714622 26.858744 115.724593 26.856441 115.735494 26.845051 115.758044 26.836382 115.767369 26.819796 115.791898 26.810365 115.796301 26.830785 115.811064 26.86171 115.832524 26.86739 115.841884 26.903149 115.871165 26.915338 115.889052 26.930492 115.910697 26.957291 115.921774 26.96259 115.93535 26.961576 115.9418 26.971282 115.937344 26.978253 115.920208 26.990976 115.903453 26.985611 115.897524 26.986644 115.890302 26.996592 115.868581 27.00994 115.869813 27.026538 115.859542 27.038458 115.85209 27.054268 115.854645 27.07406 115.832297 27.087884 115.823447 27.115484 115.798817 27.121581 115.780126 27.116306 115.760989 27.115832 115.73463 27.106407 115.718774 27.108461 115.712189 27.113565 115.702199 27.133422 115.692323 27.137569 115.684682 27.146298 115.679468 27.166472 115.669696 27.176888 115.671327 27.1845 115.663751 27.19585 115.646258 27.194218 115.636602 27.218993 115.632567 27.250938 115.653456 27.263832 115.671285 27.268258 115.679988 27.276565 115.701438 27.277582 115.69994 27.291599 115.692325 27.297166 115.688168 27.307726 115.688357 27.32926 115.683132 27.343204 115.688572 27.367927 115.707433 27.374606 115.700451 27.397498 115.702089 27.40754 115.722301 27.424847 115.728045 27.439956 115.733453 27.44517 115.71519 27.460884 115.709187 27.461375 115.697647 27.456731 115.695762 27.453117 115.684957 27.451491 115.6597 27.456069 115.636593 27.475322 115.631578 27.484354 -------------------------------------------------------------------------------- /borders/JD.txt: -------------------------------------------------------------------------------- 1 | 117.506453 29.109508 117.49576 29.119297 117.488442 29.138848 117.504156 29.149722 117.503694 29.1642 117.499397 29.169025 117.482073 29.16626 117.469437 29.157086 117.459398 29.1624 117.451553 29.162487 117.44467 29.143179 117.438768 29.13985 117.433573 29.14078 117.428278 29.147544 117.413544 29.150676 117.393831 29.161614 117.391611 29.166896 117.394695 29.174268 117.390884 29.186844 117.379077 29.196265 117.391205 29.212077 117.394594 29.223629 117.392419 29.236833 117.414453 29.255909 117.423189 29.252929 117.434322 29.259187 117.438538 29.266168 117.450977 29.270783 117.461203 29.284083 117.436832 29.312554 117.447094 29.327473 117.472254 29.340619 117.486632 29.343486 117.499415 29.355019 117.493799 29.363828 117.499118 29.381428 117.491694 29.406224 117.516726 29.41049 117.543934 29.434166 117.549788 29.448525 117.559089 29.45964 117.581631 29.464382 117.593186 29.477699 117.604085 29.476652 117.611186 29.481883 117.620865 29.498361 117.645391 29.513209 117.651665 29.52118 117.674043 29.533006 117.690959 29.534457 117.705459 29.547798 117.717085 29.553537 117.704899 29.560731 117.69665 29.560234 117.694214 29.566414 117.689991 29.567884 117.689365 29.596106 117.684856 29.600386 117.675016 29.599932 117.668415 29.616441 117.64863 29.618548 117.603582 29.588771 117.596271 29.590033 117.58857 29.598145 117.564537 29.595906 117.560686 29.600101 117.553186 29.60077 117.544824 29.609381 117.542356 29.618253 117.534607 29.621966 117.523282 29.634898 117.523383 29.640575 117.537588 29.656343 117.537356 29.663046 117.528988 29.672781 117.519618 29.675923 117.500524 29.667797 117.479805 29.671339 117.481444 29.687733 117.465324 29.692791 117.457285 29.700566 117.464346 29.723253 117.459766 29.73081 117.466626 29.739372 117.460568 29.744528 117.46275 29.753832 117.455364 29.760632 117.454284 29.766653 117.444085 29.765763 117.436119 29.770882 117.429202 29.780862 117.428551 29.789572 117.419139 29.79669 117.416069 29.806818 117.424199 29.81397 117.424104 29.82533 117.436438 29.846771 117.431711 29.855173 117.417816 29.855545 117.397136 29.850628 117.391555 29.830625 117.378439 29.820119 117.37103 29.818824 117.355666 29.831781 117.355317 29.839698 117.349554 29.841112 117.353481 29.849043 117.345465 29.862497 117.328167 29.85099 117.325708 29.844608 117.311459 29.846201 117.298208 29.841829 117.301722 29.832822 117.297794 29.825596 117.294743 29.82922 117.285891 29.830339 117.275963 29.839685 117.264718 29.840173 117.257834 29.843778 117.250598 29.855426 117.260912 29.865224 117.272961 29.887853 117.272355 29.896192 117.260645 29.918302 117.234849 29.924361 117.21459 29.937458 117.205268 29.930894 117.189377 29.929278 117.181236 29.924923 117.16946 29.927189 117.149802 29.918929 117.135657 29.907236 117.132619 29.897185 117.142125 29.883678 117.136653 29.869684 117.11225 29.859571 117.100808 29.845848 117.08562 29.842445 117.078276 29.832206 117.084132 29.827007 117.103193 29.820164 117.116779 29.804672 117.130404 29.805891 117.143767 29.784668 117.140656 29.779463 117.125334 29.770657 117.12015 29.761687 117.112032 29.757622 117.127909 29.732409 117.120464 29.713769 117.107106 29.71485 117.098454 29.708178 117.096995 29.704246 117.100781 29.697451 117.088452 29.684497 117.093109 29.669656 117.085885 29.662258 117.083637 29.650994 117.079394 29.647469 117.066411 29.650194 117.056069 29.635515 117.05544 29.627616 117.042555 29.623122 117.036166 29.609387 117.047709 29.582274 117.052613 29.560542 117.049463 29.551831 117.060362 29.541883 117.055136 29.515737 117.058183 29.50593 117.053416 29.499298 117.059259 29.491969 117.050697 29.475546 117.053098 29.44899 117.059369 29.443778 117.077778 29.440923 117.079874 29.430252 117.077134 29.420489 117.068266 29.419242 117.074049 29.409986 117.074886 29.394257 117.066208 29.397625 117.056978 29.390439 117.057026 29.373223 117.049164 29.371645 117.044856 29.363824 117.062668 29.354729 117.064916 29.344288 117.07993 29.3399 117.078555 29.333609 117.085969 29.314078 117.066044 29.311944 117.060152 29.308222 117.049178 29.309619 117.040246 29.297075 117.034004 29.293961 117.030055 29.284583 117.020122 29.291104 117.013362 29.287815 117.019038 29.268213 117.027027 29.258409 117.019464 29.248517 117.023269 29.235309 117.016642 29.231696 117.028228 29.206562 117.029567 29.195707 117.03602 29.191647 117.039228 29.18391 117.036415 29.170147 117.065091 29.155252 117.075716 29.142003 117.077188 29.133683 117.089286 29.126059 117.090981 29.114766 117.080384 29.105283 117.069167 29.101387 117.060344 29.086312 117.053595 29.081655 117.05868 29.056424 117.034872 29.031546 117.036252 29.025946 117.043458 29.023767 117.046372 29.013881 117.027412 29.007504 117.01855 29.008656 117.017179 28.999275 117.021985 28.990152 117.010068 28.975255 117.015186 28.966608 117.014359 28.956806 117.000553 28.949393 116.987623 28.951241 116.969615 28.912031 116.970372 28.890218 116.98641 28.884846 116.98493 28.873174 117.000287 28.874424 117.014623 28.866325 117.017827 28.858984 117.03505 28.842393 117.039162 28.834212 117.037428 28.826664 117.050646 28.819366 117.053654 28.80765 117.078078 28.818668 117.085424 28.818294 117.097415 28.80588 117.11532 28.807035 117.1284 28.802774 117.131864 28.798871 117.131064 28.787633 117.147023 28.806567 117.152584 28.786783 117.158993 28.783868 117.16511 28.787609 117.18248 28.776376 117.182286 28.760669 117.188044 28.752301 117.199686 28.745294 117.210376 28.743227 117.249098 28.749999 117.254467 28.74311 117.246346 28.738537 117.247676 28.732123 117.260811 28.724151 117.271686 28.731517 117.280509 28.733042 117.291973 28.742866 117.292325 28.750888 117.307309 28.758633 117.309177 28.764955 117.320594 28.77672 117.349409 28.779304 117.370754 28.773489 117.382017 28.779612 117.3944 28.78016 117.40542 28.791364 117.41258 28.811745 117.402569 28.823743 117.408444 28.831399 117.42424 28.826283 117.437615 28.83678 117.452373 28.83963 117.459738 28.846174 117.467365 28.847553 117.482005 28.843673 117.492407 28.837173 117.493904 28.832116 117.503788 28.834904 117.515517 28.832388 117.521906 28.824688 117.523665 28.811072 117.538136 28.816111 117.551165 28.816067 117.551092 28.844729 117.547258 28.849879 117.55942 28.869648 117.56023 28.892122 117.568966 28.904498 117.565213 28.906797 117.555559 28.903083 117.548485 28.904556 117.540428 28.919724 117.52278 28.915394 117.518146 28.933264 117.502361 28.939763 117.500088 28.94553 117.482836 28.959746 117.480814 28.9657 117.465556 28.977015 117.476167 28.982177 117.486627 28.981586 117.495788 28.987019 117.498901 28.992825 117.498986 29.008901 117.493621 29.019652 117.496919 29.041735 117.511791 29.056839 117.520791 29.054645 117.530201 29.05871 117.521964 29.065862 117.514185 29.085578 117.506063 29.093021 117.514419 29.104509 117.506453 29.109508 -------------------------------------------------------------------------------- /borders/JJ.txt: -------------------------------------------------------------------------------- 1 | 116.522712 29.617221 116.551662 29.604324 116.552469 29.606924 116.565517 29.600765 116.581817 29.600928 116.58971 29.585621 116.597266 29.582168 116.603531 29.584167 116.624505 29.575339 116.627321 29.582369 116.652517 29.59177 116.656271 29.61619 116.664356 29.615539 116.677663 29.603191 116.690781 29.606479 116.693466 29.611404 116.689876 29.620203 116.659031 29.644279 116.657265 29.649266 116.660663 29.658665 116.667329 29.664961 116.683929 29.675767 116.697291 29.678305 116.698884 29.682095 116.678292 29.693229 116.65657 29.694143 116.65659 29.701471 116.664649 29.70847 116.674526 29.704657 116.677172 29.713722 116.683169 29.719548 116.682718 29.729138 116.692687 29.743781 116.715636 29.748618 116.720684 29.765168 116.734027 29.777004 116.747672 29.782138 116.751344 29.798828 116.770885 29.810887 116.789347 29.797901 116.793201 29.798657 116.800948 29.805998 116.81071 29.808108 116.813795 29.820589 116.826048 29.821223 116.831207 29.824648 116.834576 29.829961 116.83056 29.840061 116.853609 29.855493 116.862282 29.869278 116.869689 29.87379 116.874822 29.884542 116.891324 29.899004 116.894609 29.912879 116.903615 29.917704 116.900014 29.941717 116.910508 29.951487 116.90543 29.972825 116.893726 29.974518 116.890544 29.98029 116.884207 29.979599 116.878038 29.987919 116.852162 29.975264 116.836613 29.976482 116.83339 29.98238 116.836821 30.003101 116.823554 30.008252 116.813164 30.0025 116.804415 30.003036 116.796217 30.022886 116.78609 30.035646 116.777161 30.04096 116.773098 30.053164 116.768483 30.055655 116.762409 30.053946 116.755939 30.062218 116.729675 30.059173 116.684112 30.078379 116.663194 30.080703 116.636293 30.079124 116.616171 30.069398 116.599824 30.05328 116.583208 30.025819 116.569316 29.947891 116.554334 29.912951 116.536238 29.904904 116.474279 29.901701 116.443805 29.882502 116.348346 29.840434 116.320886 29.81809 116.270207 29.787934 116.253132 29.797894 116.239726 29.818741 116.224988 29.82974 116.197456 29.834438 116.156558 29.833961 116.094832 29.80452 116.05495 29.765548 116.013116 29.749669 115.983578 29.732867 115.960369 29.727284 115.942589 29.727008 115.902252 29.733641 115.849239 29.75109 115.769776 29.800213 115.713832 29.842981 115.690326 29.857224 115.674666 29.857098 115.602154 29.84127 115.562521 29.841269 115.517499 29.845708 115.514317 29.839612 115.507185 29.837985 115.49722 29.823403 115.492045 29.82238 115.48812 29.815894 115.479528 29.814032 115.483495 29.796356 115.481717 29.782998 115.476346 29.77562 115.482255 29.763676 115.477963 29.74382 115.467588 29.740421 115.460264 29.731815 115.450449 29.727996 115.42982 29.71028 115.421168 29.686299 115.416377 29.684184 115.402674 29.687196 115.368215 29.658301 115.335715 29.65243 115.323203 29.641665 115.312492 29.643556 115.29312 29.625706 115.275487 29.630535 115.270455 29.647782 115.281315 29.655077 115.271677 29.662747 115.255953 29.66164 115.246301 29.657534 115.170524 29.662272 115.151311 29.668232 115.138057 29.680983 115.126796 29.680301 115.121984 29.673831 115.115891 29.672825 115.115376 29.667532 115.125629 29.65914 115.145654 29.658233 115.149237 29.651701 115.148374 29.643289 115.139659 29.638569 115.142546 29.628168 115.142225 29.618198 115.13709 29.610432 115.139656 29.596248 115.166097 29.608604 115.180116 29.605607 115.185106 29.600099 115.18441 29.596812 115.166543 29.591324 115.160205 29.581098 115.164858 29.573075 115.157722 29.540731 115.161309 29.528779 115.158668 29.522668 115.16532 29.513344 115.144813 29.517581 115.13288 29.514984 115.109932 29.525866 115.097046 29.525206 115.080408 29.533096 115.081098 29.537471 115.087882 29.538914 115.107841 29.555803 115.099909 29.566781 115.039715 29.553106 115.024108 29.563183 115.020129 29.570182 115.006082 29.576928 115.003065 29.57041 114.990986 29.575195 114.978348 29.55877 114.963489 29.559805 114.953755 29.547205 114.955264 29.531339 114.980139 29.526984 114.979975 29.523715 114.970867 29.517797 114.96628 29.506239 114.946698 29.501879 114.929633 29.504587 114.927942 29.519502 114.933588 29.526488 114.930917 29.527986 114.923488 29.522672 114.921576 29.514848 114.907532 29.513107 114.914566 29.528292 114.911711 29.534273 114.907437 29.533055 114.900865 29.523368 114.897067 29.502345 114.883347 29.497316 114.878945 29.488495 114.867668 29.481392 114.871179 29.475511 114.877235 29.478081 114.883162 29.473644 114.891089 29.442105 114.896793 29.442533 114.924607 29.459769 114.929505 29.470002 114.922059 29.468909 114.913471 29.475625 114.92775 29.491918 114.943552 29.492931 114.945016 29.486888 114.94138 29.481833 114.944782 29.475435 114.942193 29.473207 114.953186 29.470195 114.935694 29.449593 114.937882 29.441545 114.926936 29.444963 114.92127 29.44196 114.919935 29.431454 114.90715 29.409304 114.889447 29.398089 114.883695 29.397155 114.884894 29.405393 114.873615 29.410841 114.832432 29.3959 114.813066 29.382564 114.795839 29.389395 114.78963 29.3887 114.779734 29.380251 114.772243 29.380423 114.765739 29.368011 114.746933 29.371632 114.746937 29.394374 114.739032 29.399413 114.71674 29.400342 114.690152 29.392679 114.678192 29.398785 114.673152 29.393778 114.648927 29.384351 114.623519 29.384014 114.609562 29.365453 114.576035 29.350678 114.561568 29.347704 114.550182 29.337106 114.512585 29.329502 114.502733 29.335837 114.497081 29.332591 114.484992 29.335063 114.468078 29.329043 114.44542 29.347496 114.426896 29.340792 114.406383 29.342962 114.380485 29.328161 114.367776 29.332004 114.357504 29.32811 114.34119 29.339998 114.330779 29.362892 114.317179 29.371109 114.289356 29.358865 114.281316 29.359218 114.265374 29.349812 114.268194 29.326745 114.257138 29.31276 114.257741 29.30777 114.265458 29.303554 114.268032 29.296997 114.26066 29.28751 114.261521 29.275513 114.252479 29.272697 114.260551 29.253082 114.258767 29.240309 114.247951 29.238237 114.236892 29.243225 114.211292 29.230281 114.197539 29.228559 114.186888 29.219213 114.174065 29.222742 114.15033 29.216504 114.136384 29.221381 114.128454 29.217293 114.113327 29.219825 114.108098 29.216289 114.097473 29.21738 114.069768 29.210276 114.064588 29.18793 114.059162 29.181489 114.048172 29.176774 114.043247 29.158547 114.012487 29.143942 114.004951 29.135779 113.993481 29.132101 113.989046 29.120705 113.977002 29.106933 113.973138 29.104413 113.962464 29.106038 113.959315 29.103121 113.956343 29.081936 113.958791 29.074616 113.948649 29.052997 113.953984 29.045952 113.953325 29.02201 113.967886 29.005264 113.962115 28.985113 113.973261 28.950231 113.981415 28.943667 113.991583 28.955103 114.012486 28.962911 114.011388 28.924645 114.021049 28.924108 114.025877 28.920383 114.034257 28.898532 114.048627 28.913243 114.055033 28.914333 114.069412 28.905674 114.073673 28.893196 114.063126 28.878114 114.068875 28.862373 114.066239 28.855407 114.069808 28.851562 114.075772 28.852748 114.083079 28.840314 114.101106 28.839085 114.131313 28.84963 114.135494 28.847984 114.138641 28.835893 114.144468 28.832543 114.157646 28.841985 114.161127 28.822878 114.158492 28.807603 114.147412 28.796712 114.143885 28.785972 114.160003 28.776924 114.170365 28.781749 114.171761 28.793428 114.202617 28.812058 114.21096 28.826412 114.223073 28.836382 114.231025 28.828018 114.230722 28.817008 114.237054 28.807456 114.247932 28.808748 114.2533 28.815715 114.263832 28.813794 114.274418 28.791327 114.278983 28.771126 114.286982 28.763753 114.296775 28.762584 114.317655 28.743362 114.320514 28.733746 114.336416 28.72686 114.356012 28.710364 114.371761 28.708045 114.376822 28.720496 114.397032 28.710492 114.416693 28.71193 114.430736 28.721693 114.471953 28.703152 114.474093 28.708175 114.46638 28.733229 114.477848 28.740765 114.490561 28.759707 114.495132 28.761999 114.507364 28.76002 114.516682 28.76363 114.524397 28.760159 114.537321 28.765842 114.545308 28.764185 114.554739 28.772697 114.572137 28.77085 114.575619 28.777467 114.586312 28.768212 114.59032 28.738626 114.599616 28.729112 114.621326 28.716933 114.630216 28.701228 114.648465 28.697981 114.654842 28.691765 114.671378 28.692889 114.681278 28.696964 114.712306 28.691428 114.724401 28.697461 114.743559 28.693236 114.748237 28.706036 114.762998 28.711605 114.769195 28.719449 114.779683 28.718027 114.795095 28.728657 114.807349 28.732701 114.810436 28.741479 114.802455 28.759191 114.818536 28.775456 114.82448 28.775243 114.831186 28.769066 114.848287 28.746438 114.872416 28.761443 114.886195 28.758625 114.897114 28.769135 114.905756 28.788451 114.924961 28.810988 114.914893 28.834829 114.916116 28.859772 114.928073 28.873401 114.948671 28.877437 114.962327 28.887114 114.964741 28.895909 114.95652 28.907836 114.955955 28.915739 114.959562 28.921636 114.955739 28.929203 114.978337 28.94999 114.970372 28.97537 114.99096 28.990528 114.986389 28.995892 114.987079 29.000531 114.994582 29.003945 115.002621 29.013412 115.047095 29.018639 115.05499 29.025383 115.057756 29.03751 115.079289 29.040044 115.082362 29.046328 115.104956 29.057007 115.117792 29.057969 115.157356 29.081196 115.209314 29.09255 115.222975 29.100794 115.255201 29.095768 115.292419 29.105614 115.301373 29.101782 115.31066 29.105224 115.328008 29.104947 115.39692 29.083223 115.401178 29.080632 115.400836 29.073612 115.417983 29.069261 115.431936 29.072461 115.446556 29.069271 115.454181 29.063949 115.444262 29.047919 115.455246 29.036663 115.477093 29.030252 115.476559 29.018883 115.482069 29.012071 115.49013 29.01585 115.500762 29.013236 115.5124 29.020425 115.532686 29.01883 115.545698 29.010292 115.552244 29.001489 115.552984 28.994327 115.569137 28.980044 115.59399 28.974312 115.603054 28.976643 115.611505 28.966372 115.627701 28.96641 115.637388 28.955269 115.669003 28.957208 115.685055 28.95191 115.687774 28.947813 115.677925 28.940477 115.683454 28.929997 115.701342 28.929233 115.72702 28.922345 115.731138 28.924354 115.733226 28.935592 115.743827 28.935074 115.747144 28.924481 115.757392 28.916563 115.762719 28.90202 115.769296 28.89812 115.783939 28.906886 115.789831 28.904436 115.805632 28.905729 115.822419 28.915758 115.821887 28.932687 115.830207 28.939381 115.832733 28.947209 115.823714 28.983513 115.827473 28.984241 115.831852 28.975268 115.842798 28.97254 115.847256 28.977344 115.855614 28.973668 115.866189 28.974858 115.874982 28.990557 115.880242 28.989031 115.888132 28.998764 115.890947 29.010624 115.888767 29.014866 115.897585 29.018174 115.89952 29.031654 115.908317 29.038979 115.915364 29.040144 115.928194 29.059518 115.955972 29.076142 115.946474 29.082653 115.945572 29.092362 115.981139 29.094712 115.995639 29.090843 116.001099 29.095795 116.005357 29.111198 116.011966 29.115227 116.024923 29.109003 116.028373 29.097151 116.031224 29.096741 116.059425 29.111377 116.066728 29.120431 116.083605 29.121087 116.095389 29.125736 116.094974 29.129521 116.117222 29.146994 116.146863 29.159736 116.16765 29.160315 116.19935 29.133702 116.21787 29.132892 116.227631 29.14218 116.241827 29.172053 116.252436 29.176666 116.285291 29.179678 116.296604 29.172697 116.301416 29.152375 116.300131 29.133262 116.313141 29.109805 116.340356 29.089006 116.366214 29.076697 116.383795 29.073566 116.396272 29.058555 116.406524 29.057166 116.407682 29.064081 116.437354 29.090631 116.43521 29.128018 116.443871 29.145819 116.454324 29.157573 116.493858 29.189481 116.500375 29.190869 116.511129 29.185838 116.527959 29.185687 116.577948 29.199319 116.588321 29.207858 116.608051 29.24221 116.607827 29.250458 116.599897 29.25534 116.586897 29.287722 116.577589 29.29372 116.565376 29.324374 116.554856 29.332841 116.545741 29.349266 116.545148 29.363381 116.558083 29.361522 116.563202 29.368523 116.555111 29.377007 116.558727 29.390775 116.545437 29.409568 116.545818 29.424618 116.54204 29.427974 116.52878 29.428765 116.523232 29.435429 116.528341 29.445337 116.530844 29.465141 116.542119 29.465553 116.548725 29.48156 116.540225 29.489346 116.52979 29.4933 116.524757 29.500016 116.54222 29.536821 116.537657 29.554247 116.539428 29.55905 116.512801 29.564663 116.499512 29.57903 116.516 29.59644 116.522712 29.617221 -------------------------------------------------------------------------------- /borders/LC.txt: -------------------------------------------------------------------------------- 1 | 117.131435 27.410022 117.1392 27.428631 117.134307 27.439379 117.138708 27.44571 117.132394 27.458356 117.12494 27.458177 117.11656 27.465146 117.118085 27.4823 117.111118 27.490859 117.119874 27.497971 117.108855 27.520039 117.108745 27.546275 117.097545 27.553425 117.096527 27.562681 117.086775 27.572261 117.061451 27.548289 117.057467 27.555221 117.047644 27.55384 117.025995 27.563857 117.023233 27.569721 117.029324 27.589668 117.037506 27.598118 117.020523 27.610481 117.02339 27.619117 117.009855 27.632327 117.014474 27.637029 117.013915 27.642753 117.023441 27.642378 117.030074 27.648562 117.029141 27.660659 117.032537 27.666299 117.047321 27.676055 117.060588 27.677304 117.071729 27.671355 117.085279 27.656742 117.085271 27.648035 117.100572 27.633889 117.105325 27.633066 117.116014 27.638301 117.120718 27.656963 117.120433 27.660858 117.110514 27.665479 117.106346 27.673871 117.106825 27.679094 117.11716 27.691009 117.147469 27.697245 117.181346 27.683288 117.196148 27.690039 117.205926 27.68296 117.211359 27.685127 117.209444 27.712304 117.21267 27.721757 117.234193 27.72553 117.250405 27.724481 117.257858 27.734422 117.269494 27.733947 117.274633 27.746471 117.286318 27.755701 117.282904 27.765945 117.284354 27.773482 117.30126 27.769622 117.306216 27.774676 117.30987 27.792675 117.3042 27.805764 117.309698 27.838499 117.289074 27.856712 117.29103 27.871186 117.281417 27.876346 117.256936 27.874489 117.240642 27.894928 117.221848 27.900381 117.212541 27.889709 117.204476 27.886643 117.191892 27.896637 117.179202 27.896455 117.176836 27.903463 117.168673 27.907212 117.160651 27.897993 117.154129 27.895814 117.136481 27.915103 117.13066 27.9173 117.11642 27.906562 117.11307 27.886414 117.105038 27.885121 117.094321 27.901721 117.0887 27.895811 117.087786 27.888452 117.062233 27.866359 117.054663 27.852496 117.03862 27.852803 117.029043 27.85721 117.029262 27.875361 117.016727 27.884952 117.018831 27.890042 117.016096 27.9003 117.037671 27.93673 117.05163 27.93889 117.054507 27.947179 117.051313 27.961984 117.056782 27.969974 117.055649 27.97668 117.043858 27.982323 117.032338 27.983023 117.012165 27.997434 117.008971 28.00607 116.98667 28.021861 116.976185 28.044046 116.953657 28.0511 116.944692 28.04869 116.947536 28.053761 116.939657 28.073278 116.939839 28.098971 116.928332 28.10349 116.919866 28.088092 116.920682 28.076728 116.899693 28.073919 116.88796 28.088328 116.865457 28.091584 116.862373 28.097036 116.845266 28.104092 116.840836 28.110349 116.831319 28.111681 116.818549 28.101629 116.81408 28.101784 116.812509 28.116821 116.805097 28.1205 116.802178 28.130258 116.807638 28.151919 116.818396 28.158988 116.819093 28.173157 116.805844 28.17514 116.791832 28.18459 116.757104 28.173841 116.752636 28.186257 116.738419 28.18389 116.733278 28.187868 116.732583 28.192727 116.74097 28.21019 116.729353 28.212207 116.715835 28.207135 116.700902 28.218083 116.698926 28.230747 116.707544 28.245659 116.738318 28.26723 116.753583 28.270578 116.770529 28.261114 116.787952 28.264099 116.808091 28.255536 116.810956 28.257247 116.810573 28.265055 116.820141 28.268936 116.813395 28.275655 116.823084 28.279268 116.821227 28.288234 116.826103 28.296945 116.818736 28.310067 116.804973 28.31486 116.806862 28.332438 116.7971 28.345277 116.796987 28.351038 116.789616 28.357891 116.786066 28.37371 116.783392 28.376222 116.76971 28.375382 116.764349 28.379112 116.754649 28.404206 116.743283 28.414868 116.733716 28.409553 116.722752 28.391748 116.698649 28.384683 116.681219 28.389853 116.667725 28.382201 116.651573 28.379887 116.639773 28.391345 116.612521 28.397127 116.593266 28.38887 116.576299 28.408517 116.581053 28.419626 116.590336 28.429178 116.588691 28.441175 116.596484 28.443567 116.592716 28.449191 116.597631 28.456483 116.594981 28.461406 116.597933 28.47357 116.58083 28.495151 116.565862 28.499213 116.559846 28.485917 116.562409 28.485189 116.56163 28.476176 116.565468 28.475195 116.564128 28.451293 116.571035 28.449817 116.572049 28.445961 116.567687 28.439486 116.570747 28.437173 116.569703 28.429287 116.565862 28.426875 116.566096 28.417611 116.563024 28.414959 116.566349 28.412645 116.542832 28.399167 116.524205 28.380964 116.522907 28.370206 116.514332 28.358904 116.514128 28.315977 116.484923 28.298976 116.487553 28.288796 116.469357 28.252071 116.460599 28.25714 116.446764 28.251914 116.422143 28.255663 116.400003 28.2455 116.391648 28.248799 116.387766 28.24066 116.38337 28.239463 116.383103 28.227248 116.373659 28.224298 116.377679 28.216786 116.368983 28.210648 116.3631 28.214081 116.365395 28.223572 116.360308 28.233294 116.328738 28.250443 116.319255 28.244066 116.31614 28.220434 116.298954 28.231076 116.258115 28.211562 116.23876 28.188102 116.241218 28.181592 116.23438 28.163177 116.214389 28.181674 116.182846 28.187022 116.170038 28.199347 116.170287 28.211848 116.164693 28.220622 116.122588 28.242936 116.113054 28.225534 116.107177 28.221063 116.10562 28.211031 116.089405 28.184461 116.091509 28.177718 116.083337 28.164471 116.092538 28.15395 116.124906 28.147035 116.123469 28.139112 116.142708 28.14068 116.156329 28.134876 116.155317 28.121491 116.146811 28.116836 116.141437 28.10662 116.153198 28.078885 116.148045 28.076888 116.14016 28.079892 116.145187 28.054677 116.138675 28.046851 116.131165 28.048695 116.126779 28.045603 116.123088 28.035593 116.127182 28.026931 116.125983 28.013393 116.113641 28.002571 116.1151 27.998076 116.107802 27.987713 116.095831 27.982447 116.093175 27.967755 116.085941 27.963868 116.085586 27.952882 116.077034 27.951195 116.072246 27.936588 116.047887 27.930532 116.033473 27.914449 116.010663 27.903631 116.000405 27.906168 115.986275 27.901624 115.974677 27.90177 115.967036 27.896962 115.951392 27.900189 115.928078 27.889356 115.913928 27.887835 115.907524 27.872009 115.892688 27.86064 115.872141 27.860673 115.866053 27.837591 115.871468 27.81057 115.865893 27.803117 115.865872 27.788001 115.854852 27.770139 115.858386 27.75853 115.84922 27.736142 115.843173 27.731431 115.835495 27.734642 115.813873 27.734238 115.78726 27.744822 115.766031 27.743986 115.742037 27.735559 115.721441 27.700919 115.702045 27.684774 115.686567 27.661652 115.681835 27.657195 115.670561 27.656639 115.669213 27.650398 115.658529 27.642999 115.643756 27.624423 115.629811 27.615877 115.624194 27.606512 115.623742 27.597871 115.610471 27.577417 115.615161 27.573269 115.612158 27.543185 115.598385 27.529031 115.601042 27.523499 115.613597 27.51869 115.615981 27.50648 115.625575 27.494644 115.627277 27.487224 115.657546 27.457322 115.680582 27.451202 115.695762 27.453117 115.697647 27.456731 115.709187 27.461375 115.71519 27.460884 115.733453 27.44517 115.728045 27.439956 115.722301 27.424847 115.702089 27.40754 115.700451 27.397498 115.707433 27.374606 115.688572 27.367927 115.683132 27.343204 115.688357 27.32926 115.688168 27.307726 115.692325 27.297166 115.69994 27.291599 115.701438 27.277582 115.679988 27.276565 115.671285 27.268258 115.653456 27.263832 115.632422 27.250368 115.636602 27.218993 115.646258 27.194218 115.663751 27.19585 115.671327 27.1845 115.669696 27.176888 115.679468 27.166472 115.684682 27.146298 115.692323 27.137569 115.702199 27.133422 115.714965 27.110826 115.723435 27.106533 115.73463 27.106407 115.760989 27.115832 115.780126 27.116306 115.798817 27.121581 115.823447 27.115484 115.832297 27.087884 115.854645 27.07406 115.85209 27.054268 115.859542 27.038458 115.869813 27.026538 115.868581 27.00994 115.890302 26.996592 115.897524 26.986644 115.903453 26.985611 115.920208 26.990976 115.937344 26.978253 115.9418 26.971282 115.950257 26.978185 115.952863 26.990478 115.963405 26.995616 115.967234 27.006436 115.973045 27.004822 115.981815 27.015606 115.991914 27.037271 116.007349 27.050471 116.020537 27.072705 116.010446 27.084206 116.012955 27.102838 116.017737 27.109779 116.01398 27.118247 116.027447 27.121806 116.029374 27.132066 116.066168 27.140775 116.07574 27.149364 116.095577 27.144264 116.104117 27.146673 116.11898 27.137146 116.129525 27.140338 116.131687 27.121075 116.128033 27.112892 116.136756 27.100486 116.150811 27.09473 116.147383 27.077623 116.157465 27.052368 116.18413 27.056919 116.191704 27.052097 116.195609 27.029133 116.193575 27.013453 116.179322 26.993406 116.178372 26.985035 116.162598 26.976046 116.154179 26.949492 116.15841 26.940976 116.157485 26.924513 116.165097 26.905213 116.178122 26.9033 116.170722 26.887929 116.175703 26.879343 116.172642 26.874891 116.164286 26.872796 116.152032 26.845921 116.14506 26.838188 116.145466 26.827648 116.153866 26.823916 116.159627 26.809281 116.149474 26.796675 116.151774 26.790173 116.145438 26.763402 116.13827 26.757309 116.13745 26.747487 116.130598 26.743111 116.125152 26.733209 116.140747 26.715652 116.15026 26.72011 116.154648 26.717746 116.162815 26.703586 116.178232 26.707578 116.192805 26.702301 116.19725 26.687303 116.205568 26.680155 116.202513 26.672297 116.226062 26.673243 116.22951 26.661772 116.233835 26.658742 116.253469 26.659293 116.262937 26.665093 116.278845 26.662211 116.283104 26.653234 116.277492 26.644764 116.271448 26.644114 116.255363 26.631853 116.247805 26.631494 116.242726 26.624018 116.263939 26.610502 116.276049 26.588144 116.270915 26.573744 116.253467 26.564326 116.245728 26.554503 116.279576 26.536679 116.28002 26.531628 116.302234 26.514812 116.313368 26.50106 116.317661 26.507984 116.321959 26.506076 116.327985 26.511614 116.345582 26.516475 116.359288 26.514169 116.367565 26.516239 116.372456 26.512717 116.381993 26.515138 116.39097 26.52606 116.383294 26.540511 116.385087 26.545821 116.40368 26.55869 116.415808 26.557037 116.430125 26.565711 116.440041 26.565861 116.456071 26.587952 116.458498 26.604611 116.470788 26.603111 116.478657 26.596773 116.480299 26.589331 116.504795 26.574794 116.50984 26.556035 116.513195 26.554692 116.520421 26.555239 116.545452 26.567428 116.547441 26.574275 116.566045 26.584367 116.560366 26.591937 116.5691 26.608621 116.569721 26.636423 116.578176 26.643816 116.580384 26.655151 116.576557 26.657032 116.563818 26.649217 116.556097 26.65375 116.556311 26.662117 116.539795 26.67226 116.538399 26.67796 116.521553 26.696215 116.522328 26.71508 116.516224 26.717932 116.52657 26.728671 116.539118 26.732831 116.54275 26.745779 116.565073 26.759893 116.570018 26.766459 116.558954 26.792268 116.553206 26.796529 116.549004 26.81314 116.556782 26.844001 116.565179 26.849554 116.57264 26.865191 116.582879 26.864624 116.600249 26.888577 116.615321 26.899749 116.616617 26.90792 116.628515 26.921235 116.627059 26.928277 116.657903 26.950433 116.662493 26.964024 116.660574 26.968516 116.677192 26.971511 116.691916 26.98577 116.707502 26.994728 116.729642 26.996757 116.738611 27.001643 116.748607 26.999976 116.751634 26.991863 116.764127 26.984346 116.767799 26.989383 116.767137 26.997419 116.773356 27.00546 116.788934 27.004628 116.801719 27.014097 116.819182 27.01408 116.830609 27.025088 116.840097 27.024391 116.848871 27.014123 116.86862 27.014546 116.875658 27.026882 116.88352 27.027 116.90463 27.042796 116.917527 27.037589 116.925485 27.042627 116.931058 27.029852 116.94697 27.019357 116.948804 27.031932 116.960668 27.04382 116.960192 27.050818 116.969635 27.059771 116.983528 27.063925 117.020577 27.093173 117.037808 27.092847 117.059446 27.10599 117.050512 27.139556 117.052015 27.154377 117.063384 27.162633 117.075913 27.180908 117.090959 27.188701 117.103596 27.211683 117.10729 27.213988 117.111279 27.209647 117.122767 27.214093 117.127459 27.223111 117.145445 27.235719 117.156323 27.247423 117.15424 27.252559 117.177574 27.278788 117.173952 27.284141 117.180175 27.2959 117.170264 27.310199 117.144047 27.305893 117.143545 27.313861 117.149021 27.322328 117.14667 27.328716 117.11801 27.332159 117.107575 27.342767 117.11069 27.374869 117.105645 27.385377 117.112098 27.388654 117.113826 27.399857 117.131435 27.410022 -------------------------------------------------------------------------------- /borders/NC.txt: -------------------------------------------------------------------------------- 1 | 116.506443 28.310533 116.514788 28.317554 116.514332 28.358904 116.522907 28.370206 116.524205 28.380964 116.542832 28.399167 116.566349 28.412645 116.563024 28.414959 116.566096 28.417611 116.565862 28.426875 116.569703 28.429287 116.570747 28.437173 116.567687 28.439486 116.572049 28.445961 116.571035 28.449817 116.564128 28.451293 116.565468 28.475195 116.56163 28.476176 116.559852 28.487955 116.568572 28.502789 116.558399 28.514015 116.560537 28.518446 116.545838 28.523029 116.525861 28.547584 116.509426 28.554938 116.50385 28.5653 116.485994 28.580524 116.471574 28.602695 116.471837 28.615331 116.461265 28.631865 116.470858 28.639674 116.467935 28.681571 116.464716 28.689712 116.44903 28.689136 116.452883 28.700854 116.445055 28.714579 116.417848 28.729503 116.39574 28.733858 116.387298 28.745601 116.387457 28.754733 116.383787 28.75785 116.357938 28.759416 116.324102 28.743201 116.328702 28.74993 116.329243 28.762032 116.325083 28.772824 116.314218 28.780214 116.312037 28.787977 116.305187 28.79268 116.293514 28.794199 116.283382 28.807683 116.263401 28.806397 116.250816 28.81057 116.247004 28.816608 116.252835 28.831322 116.259257 28.837389 116.254326 28.851814 116.24263 28.858341 116.242399 28.861433 116.254982 28.877443 116.2579 28.879515 116.262362 28.876206 116.296372 28.873867 116.303893 28.876038 116.309978 28.872514 116.314097 28.87555 116.324976 28.874204 116.353841 28.882 116.369101 28.900204 116.380608 28.92677 116.398702 28.954543 116.405531 28.985223 116.412051 28.995852 116.412561 29.029898 116.416144 29.037154 116.409558 29.053653 116.406128 29.057817 116.396272 29.058555 116.383795 29.073566 116.366214 29.076697 116.329494 29.095145 116.313141 29.109805 116.300131 29.133262 116.301416 29.152375 116.296604 29.172697 116.285291 29.179678 116.252436 29.176666 116.241827 29.172053 116.227631 29.14218 116.21787 29.132892 116.19935 29.133702 116.16765 29.160315 116.146863 29.159736 116.117222 29.146994 116.094974 29.129521 116.095389 29.125736 116.083605 29.121087 116.066728 29.120431 116.059425 29.111377 116.031224 29.096741 116.028373 29.097151 116.024923 29.109003 116.011966 29.115227 116.005357 29.111198 116.001099 29.095795 115.995639 29.090843 115.981139 29.094712 115.945572 29.092362 115.946474 29.082653 115.955972 29.076142 115.928194 29.059518 115.915364 29.040144 115.908317 29.038979 115.89952 29.031654 115.897585 29.018174 115.888767 29.014866 115.890947 29.010624 115.888132 28.998764 115.880242 28.989031 115.874982 28.990557 115.866189 28.974858 115.855614 28.973668 115.847256 28.977344 115.842798 28.97254 115.831852 28.975268 115.827473 28.984241 115.823714 28.983513 115.832733 28.947209 115.830207 28.939381 115.821887 28.932687 115.822419 28.915758 115.805632 28.905729 115.789831 28.904436 115.783939 28.906886 115.770709 28.898355 115.762719 28.90202 115.76074 28.911938 115.747144 28.924481 115.743827 28.935074 115.733226 28.935592 115.731138 28.924354 115.72702 28.922345 115.701342 28.929233 115.683454 28.929997 115.677925 28.940477 115.687774 28.947813 115.685055 28.95191 115.669003 28.957208 115.637388 28.955269 115.627701 28.96641 115.611505 28.966372 115.603054 28.976643 115.59399 28.974312 115.569137 28.980044 115.552984 28.994327 115.552244 29.001489 115.545698 29.010292 115.532686 29.01883 115.5124 29.020425 115.500762 29.013236 115.49013 29.01585 115.482069 29.012071 115.479474 29.00582 115.482626 28.999889 115.474079 28.998968 115.470656 28.98808 115.478595 28.972343 115.485707 28.970324 115.505924 28.934619 115.511959 28.930084 115.510603 28.919013 115.5191 28.907796 115.518724 28.902341 115.529123 28.89815 115.528171 28.887548 115.537097 28.86775 115.526714 28.855462 115.524702 28.845672 115.512438 28.838387 115.500386 28.849806 115.493954 28.83515 115.496296 28.828766 115.489412 28.819688 115.489559 28.804037 115.474454 28.801046 115.472964 28.793505 115.466325 28.793454 115.465026 28.79136 115.470624 28.789425 115.460174 28.772341 115.457458 28.778949 115.449366 28.780502 115.446713 28.775643 115.452575 28.768976 115.445118 28.7663 115.455497 28.746258 115.453365 28.741351 115.466665 28.739459 115.473765 28.728669 115.479944 28.730528 115.48359 28.737427 115.489984 28.734793 115.499918 28.740964 115.519367 28.736743 115.531562 28.745634 115.542092 28.739114 115.554231 28.739739 115.565929 28.735765 115.552552 28.714478 115.561623 28.697726 115.546216 28.648947 115.552893 28.640097 115.554796 28.629496 115.533952 28.607369 115.529916 28.589345 115.546723 28.582175 115.554337 28.584316 115.5617 28.59147 115.572561 28.591036 115.579569 28.596452 115.588634 28.590839 115.58909 28.584023 115.593819 28.579597 115.588601 28.574429 115.572763 28.57199 115.569115 28.568638 115.579697 28.522211 115.568776 28.521071 115.56549 28.517193 115.566569 28.509426 115.574806 28.50102 115.563544 28.490698 115.557648 28.460276 115.5483 28.448987 115.558044 28.439117 115.560554 28.423776 115.556049 28.414777 115.542397 28.410998 115.541596 28.401622 115.557114 28.394045 115.563506 28.393965 115.574223 28.406305 115.582991 28.403 115.594403 28.40549 115.60761 28.419669 115.611062 28.416192 115.609969 28.408 115.617861 28.399975 115.615615 28.419288 115.624701 28.423667 115.623417 28.41277 115.626991 28.405211 115.651409 28.40138 115.661069 28.387358 115.656425 28.378894 115.645126 28.37192 115.636936 28.354085 115.626121 28.349894 115.657631 28.339716 115.666932 28.344363 115.667844 28.351091 115.679304 28.344937 115.700612 28.3425 115.681547 28.372865 115.69383 28.36823 115.70079 28.373106 115.706978 28.369252 115.71532 28.373362 115.727973 28.367595 115.735526 28.356165 115.762466 28.373989 115.780342 28.366374 115.797173 28.382572 115.807833 28.386778 115.806982 28.404943 115.820659 28.409182 115.826562 28.407755 115.850184 28.393966 115.858094 28.381399 115.869803 28.348809 115.86595 28.319552 115.877071 28.308129 115.884704 28.292639 115.896385 28.299029 115.899488 28.308724 115.912953 28.322696 115.919605 28.309453 115.926232 28.311759 115.923925 28.315818 115.929786 28.321936 115.936519 28.319834 115.939135 28.311156 115.944805 28.31243 115.956121 28.308903 115.963489 28.299671 115.955695 28.286093 115.972743 28.282267 115.98043 28.284503 115.989082 28.298085 115.998805 28.295498 116.004192 28.286799 116.010573 28.284915 116.015401 28.289769 116.027561 28.290107 116.048679 28.301276 116.076139 28.295966 116.0877 28.283229 116.103091 28.273847 116.1075 28.25646 116.119339 28.250702 116.123975 28.24172 116.164693 28.220622 116.170287 28.211848 116.170038 28.199347 116.182846 28.187022 116.214389 28.181674 116.23438 28.163177 116.241218 28.181592 116.23876 28.188102 116.258115 28.211562 116.298954 28.231076 116.31614 28.220434 116.319255 28.244066 116.328738 28.250443 116.360308 28.233294 116.365395 28.223572 116.3631 28.214081 116.368983 28.210648 116.377679 28.216786 116.373659 28.224298 116.383103 28.227248 116.38337 28.239463 116.387766 28.24066 116.391648 28.248799 116.400003 28.2455 116.422143 28.255663 116.446764 28.251914 116.460599 28.25714 116.469357 28.252071 116.487553 28.288796 116.484923 28.298976 116.506443 28.310533 -------------------------------------------------------------------------------- /borders/PX.txt: -------------------------------------------------------------------------------- 1 | 114.038121 27.432307 114.046422 27.439309 114.067451 27.436633 114.077936 27.439781 114.092401 27.434305 114.119278 27.442678 114.131163 27.435346 114.15009 27.436649 114.163166 27.444981 114.174717 27.445872 114.184354 27.45509 114.187753 27.466678 114.200924 27.479162 114.210803 27.499862 114.205702 27.511601 114.209027 27.528615 114.22564 27.533032 114.235895 27.557892 114.265317 27.569238 114.28178 27.580993 114.271718 27.593221 114.261953 27.595985 114.248025 27.606281 114.220104 27.632753 114.214565 27.642739 114.202518 27.646295 114.213249 27.651689 114.223563 27.671332 114.199086 27.698916 114.20145 27.705426 114.196804 27.715181 114.18327 27.728322 114.185488 27.737261 114.163142 27.739441 114.155187 27.759258 114.148771 27.767389 114.140254 27.76876 114.137916 27.775628 114.121049 27.771937 114.121843 27.764734 114.115995 27.760013 114.101225 27.762466 114.076297 27.749467 114.069196 27.751582 114.054334 27.748205 114.050247 27.749008 114.043896 27.760123 114.034686 27.761434 114.026888 27.767983 114.005749 27.758274 113.995522 27.766081 113.980301 27.767163 113.980906 27.780263 113.971482 27.783341 113.966042 27.790508 113.973652 27.814259 113.965253 27.820431 113.950925 27.815805 113.94849 27.809333 113.941346 27.810544 113.943418 27.820549 113.939674 27.836931 113.931556 27.843694 113.924168 27.840842 113.916159 27.842148 113.91814 27.854212 113.913032 27.863322 113.917331 27.869953 113.898205 27.875376 113.89622 27.880337 113.916758 27.885918 113.912538 27.894175 113.944345 27.919226 113.950664 27.915518 113.96991 27.925214 114.003622 27.929425 114.012387 27.941715 114.019265 27.945551 114.01963 27.957962 114.011028 27.959643 113.997233 27.979893 113.98361 27.981719 113.982378 27.974459 113.977654 27.972107 113.96229 27.976389 113.956902 27.984984 113.957522 27.994476 113.94886 27.99549 113.931427 27.98972 113.926865 27.998111 113.900902 27.994069 113.885129 27.998328 113.877705 28.009219 113.871312 28.011337 113.859207 27.995832 113.856245 27.979331 113.836441 27.977022 113.831732 27.986469 113.825441 27.98718 113.803817 27.975813 113.799607 27.968162 113.801485 27.961945 113.77746 27.958984 113.758849 27.939759 113.741776 27.908958 113.734482 27.882046 113.739553 27.874203 113.754681 27.874691 113.754772 27.869334 113.763731 27.864382 113.766697 27.849642 113.763592 27.841643 113.773404 27.827927 113.772181 27.806483 113.765568 27.803538 113.759102 27.792989 113.732669 27.771649 113.725022 27.760267 113.725909 27.739158 113.698215 27.718575 113.677235 27.6901 113.673071 27.675502 113.621247 27.643997 113.621768 27.628722 113.614563 27.609766 113.615703 27.593886 113.607628 27.584189 113.60804 27.572324 113.602047 27.573416 113.597675 27.563795 113.590171 27.559698 113.586228 27.550791 113.587229 27.542258 113.58273 27.541456 113.59887 27.519887 113.614879 27.517579 113.626338 27.531171 113.634504 27.519798 113.633366 27.51445 113.629449 27.513154 113.628928 27.498052 113.616233 27.488207 113.615068 27.477746 113.589299 27.468227 113.595 27.461345 113.59386 27.453565 113.598341 27.451859 113.595326 27.4436 113.601649 27.439025 113.594779 27.428063 113.599928 27.421936 113.599373 27.417488 113.619156 27.417609 113.620802 27.40761 113.626559 27.404138 113.618624 27.397903 113.610568 27.396596 113.602748 27.386655 113.591083 27.383141 113.591083 27.37332 113.595519 27.37116 113.594103 27.356378 113.600296 27.348546 113.613266 27.344564 113.632629 27.349671 113.648134 27.34914 113.658247 27.337722 113.65648 27.333619 113.665363 27.325033 113.674714 27.329712 113.693075 27.33071 113.704083 27.336923 113.710873 27.349012 113.714896 27.343295 113.723528 27.341617 113.743217 27.356181 113.771021 27.360692 113.779619 27.355634 113.784319 27.363764 113.802023 27.367358 113.823102 27.361994 113.826862 27.371779 113.837382 27.376068 113.854032 27.367938 113.870004 27.3813 113.87091 27.347471 113.853251 27.323092 113.849539 27.322557 113.848333 27.311414 113.864326 27.296333 113.874415 27.302397 113.880238 27.296871 113.863435 27.271929 113.859433 27.255507 113.86094 27.247196 113.854168 27.235313 113.857994 27.227016 113.829913 27.198341 113.818646 27.170138 113.803889 27.161961 113.783109 27.135014 113.780133 27.105153 113.782859 27.097082 113.789518 27.092436 113.80481 27.10303 113.810942 27.102671 113.819335 27.07357 113.817975 27.06211 113.822584 27.054576 113.819969 27.042256 113.824699 27.041844 113.83119 27.047908 113.836262 27.045235 113.851526 27.031909 113.85458 27.017717 113.861769 27.025944 113.87031 27.020929 113.874296 27.022605 113.876149 27.016379 113.869274 27.010909 113.872878 26.998961 113.884942 26.992498 113.889432 26.983664 113.916495 26.96468 113.927942 26.965887 113.939283 26.987674 113.954917 27.004243 113.969166 27.006836 113.965335 27.022805 113.970541 27.036114 113.973128 27.039585 113.985862 27.042365 113.98892 27.051598 114.004171 27.064089 114.001392 27.075773 114.003052 27.094029 114.010404 27.101082 114.019873 27.128865 114.036401 27.148518 114.055976 27.163929 114.082486 27.160399 114.092523 27.174859 114.097796 27.196936 114.104477 27.2033 114.10086 27.212641 114.104877 27.218549 114.119819 27.230013 114.129212 27.224608 114.16417 27.248713 114.164386 27.259022 114.155014 27.271318 114.156003 27.288102 114.145363 27.306046 114.14727 27.318459 114.14315 27.319398 114.133997 27.312555 114.117667 27.317899 114.116024 27.321881 114.120356 27.334151 114.089198 27.33843 114.078984 27.342815 114.077514 27.353781 114.080349 27.357906 114.061181 27.367872 114.056021 27.375124 114.059694 27.38052 114.04654 27.387033 114.023705 27.385984 114.027497 27.397077 114.032805 27.40141 114.029546 27.40898 114.033952 27.412682 114.038121 27.432307 -------------------------------------------------------------------------------- /borders/SR.txt: -------------------------------------------------------------------------------- 1 | 118.356397 28.256004 118.369333 28.259428 118.380578 28.271884 118.389344 28.272897 118.407469 28.288223 118.424435 28.291408 118.430925 28.298225 118.443447 28.297896 118.467597 28.307132 118.478705 28.323672 118.488743 28.32926 118.493266 28.335968 118.491665 28.344483 118.477435 28.348974 118.475343 28.362891 118.470101 28.365669 118.46041 28.388919 118.445661 28.400748 118.442764 28.412388 118.463359 28.435014 118.475057 28.458323 118.477171 28.470014 118.485497 28.479121 118.478667 28.486578 118.457177 28.486992 118.444057 28.501064 118.431955 28.499565 118.420494 28.503534 118.426144 28.509832 118.435503 28.508752 118.452651 28.517707 118.444428 28.526719 118.438386 28.524047 118.434914 28.526448 118.434393 28.534975 118.426872 28.547133 118.433187 28.553595 118.421045 28.560999 118.415686 28.576798 118.422282 28.581495 118.425848 28.595421 118.42389 28.600909 118.426826 28.604833 118.420268 28.607252 118.420577 28.611817 118.439155 28.629979 118.425327 28.651617 118.426473 28.657075 118.435684 28.659883 118.439776 28.670086 118.438648 28.681722 118.434477 28.686525 118.425469 28.683936 118.416849 28.702546 118.411101 28.70612 118.406913 28.717302 118.410528 28.724331 118.391427 28.767979 118.391241 28.786827 118.383687 28.794251 118.374911 28.813834 118.365044 28.814827 118.357289 28.819977 118.334087 28.823158 118.324288 28.830032 118.314213 28.826202 118.302376 28.838296 118.309243 28.84635 118.304798 28.851678 118.302138 28.864825 118.295099 28.870221 118.289661 28.893584 118.282643 28.902789 118.276429 28.92429 118.263262 28.930157 118.214426 28.91122 118.202146 28.911252 118.20181 28.920367 118.213688 28.926475 118.229383 28.942287 118.235527 28.953375 118.229277 28.956384 118.218493 28.954772 118.208757 28.959886 118.194578 28.982488 118.178113 28.992652 118.141387 28.989911 118.131058 29.000603 118.119141 28.996906 118.1052 28.996975 118.097101 29.016696 118.094453 29.035712 118.086461 29.043223 118.077646 29.042618 118.073035 29.054949 118.073412 29.060172 118.083321 29.069159 118.082209 29.080882 118.076262 29.086105 118.05242 29.094751 118.044579 29.103055 118.049395 29.115679 118.058899 29.118591 118.05956 29.122266 118.044997 29.13289 118.049877 29.14427 118.050492 29.163276 118.034962 29.174882 118.040037 29.182845 118.043368 29.200751 118.047212 29.203968 118.048974 29.216137 118.057926 29.223582 118.064381 29.220896 118.078898 29.222642 118.088275 29.239501 118.087559 29.249101 118.081972 29.253654 118.086843 29.272642 118.07832 29.294622 118.084586 29.296903 118.111597 29.290973 118.122437 29.299538 118.1286 29.293813 118.142706 29.289516 118.151989 29.292959 118.159453 29.291962 118.175894 29.303559 118.184546 29.304173 118.182581 29.311986 118.173232 29.320662 118.186248 29.327526 118.191331 29.340129 118.211577 29.350373 118.215606 29.361106 118.210413 29.374153 118.215216 29.383785 118.199824 29.395702 118.197516 29.410823 118.185779 29.409986 118.163573 29.419113 118.156137 29.418424 118.133958 29.434922 118.134741 29.443903 118.144709 29.450096 118.141552 29.470478 118.132268 29.472037 118.131349 29.477622 118.150709 29.496921 118.138091 29.517539 118.127258 29.520392 118.114356 29.531241 118.114502 29.540189 118.11107 29.542953 118.096357 29.541228 118.086791 29.545044 118.061555 29.546553 118.047142 29.569168 118.030907 29.579717 118.007001 29.580544 117.990691 29.564994 117.979656 29.574492 117.964212 29.575586 117.95219 29.561445 117.951476 29.555302 117.937411 29.564055 117.894453 29.549403 117.887693 29.549888 117.862804 29.568123 117.849151 29.560623 117.844657 29.568564 117.837818 29.569623 117.834532 29.575494 117.819062 29.580799 117.799212 29.571573 117.791694 29.564745 117.776774 29.565761 117.767714 29.56303 117.760207 29.566649 117.745853 29.556952 117.7283 29.550701 117.712938 29.552291 117.690959 29.534457 117.674043 29.533006 117.659331 29.526063 117.644255 29.512381 117.620865 29.498361 117.611186 29.481883 117.604085 29.476652 117.591544 29.477076 117.581631 29.464382 117.574018 29.464699 117.557241 29.458162 117.543934 29.434166 117.516726 29.41049 117.491694 29.406224 117.499118 29.381428 117.493799 29.363828 117.499415 29.355019 117.486632 29.343486 117.472254 29.340619 117.445044 29.325521 117.437128 29.310777 117.461203 29.284083 117.450977 29.270783 117.438538 29.266168 117.434322 29.259187 117.423189 29.252929 117.414453 29.255909 117.392419 29.236833 117.394594 29.223629 117.391205 29.212077 117.379077 29.196265 117.390884 29.186844 117.394536 29.160904 117.413544 29.150676 117.428278 29.147544 117.435323 29.140091 117.444004 29.142024 117.451553 29.162487 117.459398 29.1624 117.469437 29.157086 117.484232 29.167104 117.498092 29.169118 117.502697 29.167101 117.503412 29.147959 117.488442 29.138848 117.498249 29.11551 117.513977 29.105442 117.506063 29.093021 117.514185 29.085578 117.521964 29.065862 117.530201 29.05871 117.520791 29.054645 117.511791 29.056839 117.496919 29.041735 117.493621 29.019652 117.498986 29.008901 117.498901 28.992825 117.495788 28.987019 117.486627 28.981586 117.476167 28.982177 117.465556 28.977015 117.480814 28.9657 117.482836 28.959746 117.500088 28.94553 117.502361 28.939763 117.518146 28.933264 117.52278 28.915394 117.540428 28.919724 117.548485 28.904556 117.555559 28.903083 117.565213 28.906797 117.568966 28.904498 117.56023 28.892122 117.55942 28.869648 117.547258 28.849879 117.551092 28.844729 117.551165 28.816067 117.538136 28.816111 117.523665 28.811072 117.521906 28.824688 117.515517 28.832388 117.503788 28.834904 117.493904 28.832116 117.492407 28.837173 117.482005 28.843673 117.467365 28.847553 117.459738 28.846174 117.452373 28.83963 117.437615 28.83678 117.42424 28.826283 117.408444 28.831399 117.402569 28.823743 117.41258 28.811745 117.40542 28.791364 117.3944 28.78016 117.382017 28.779612 117.370754 28.773489 117.349409 28.779304 117.320594 28.77672 117.309177 28.764955 117.307309 28.758633 117.292325 28.750888 117.291973 28.742866 117.280509 28.733042 117.271686 28.731517 117.260811 28.724151 117.247676 28.732123 117.246346 28.738537 117.254467 28.74311 117.249098 28.749999 117.210376 28.743227 117.199686 28.745294 117.188044 28.752301 117.182286 28.760669 117.18248 28.776376 117.16511 28.787609 117.158993 28.783868 117.152584 28.786783 117.147023 28.806567 117.131064 28.787633 117.131864 28.798871 117.1284 28.802774 117.11532 28.807035 117.097415 28.80588 117.085424 28.818294 117.078078 28.818668 117.053654 28.80765 117.050646 28.819366 117.037428 28.826664 117.039162 28.834212 117.03505 28.842393 117.017827 28.858984 117.014623 28.866325 117.000287 28.874424 116.98493 28.873174 116.98641 28.884846 116.970133 28.890811 116.969615 28.912031 116.987623 28.951241 117.000553 28.949393 117.014359 28.956806 117.015186 28.966608 117.010068 28.975255 117.021985 28.990152 117.017179 28.999275 117.01855 29.008656 117.027412 29.007504 117.046372 29.013881 117.043458 29.023767 117.036252 29.025946 117.034872 29.031546 117.05868 29.056424 117.053595 29.081655 117.060344 29.086312 117.069167 29.101387 117.080384 29.105283 117.090981 29.114766 117.089286 29.126059 117.077188 29.133683 117.075716 29.142003 117.065091 29.155252 117.035959 29.170905 117.039228 29.18391 117.03602 29.191647 117.029567 29.195707 117.028228 29.206562 117.016642 29.231696 117.023269 29.235309 117.019464 29.248517 117.026905 29.259278 117.020135 29.266018 117.013077 29.286209 117.020122 29.291104 117.030857 29.285075 117.034004 29.293961 117.040246 29.297075 117.049178 29.309619 117.060152 29.308222 117.066044 29.311944 117.085969 29.314078 117.078555 29.333609 117.07993 29.3399 117.064916 29.344288 117.062668 29.354729 117.044856 29.363824 117.049164 29.371645 117.057026 29.373223 117.056978 29.390439 117.066208 29.397625 117.074886 29.394257 117.074049 29.409986 117.068266 29.419242 117.077134 29.420489 117.079874 29.430252 117.077778 29.440923 117.059369 29.443778 117.053098 29.44899 117.050697 29.475546 117.059259 29.491969 117.053416 29.499298 117.058183 29.50593 117.055136 29.515737 117.060362 29.541883 117.049463 29.551831 117.052613 29.560542 117.047709 29.582274 117.035923 29.60515 117.042555 29.623122 117.05544 29.627616 117.056069 29.635515 117.066411 29.650194 117.079394 29.647469 117.083637 29.650994 117.085885 29.662258 117.093109 29.669656 117.088452 29.684497 117.100781 29.697451 117.096995 29.704246 117.082877 29.704445 117.071743 29.695242 117.061839 29.693313 117.059094 29.695355 117.045233 29.685751 117.030468 29.692429 117.004305 29.690101 116.983517 29.667447 116.980291 29.653417 116.972301 29.65724 116.953141 29.655262 116.943627 29.650026 116.935497 29.651023 116.930248 29.644044 116.917707 29.638201 116.912836 29.628898 116.886901 29.622621 116.876097 29.606242 116.862154 29.596567 116.850853 29.576266 116.826965 29.570068 116.797275 29.568538 116.787258 29.578496 116.787904 29.596382 116.775245 29.606366 116.770844 29.604202 116.768174 29.596429 116.764169 29.596359 116.760888 29.600662 116.752792 29.594881 116.749722 29.585982 116.728404 29.572468 116.72425 29.574899 116.724562 29.586297 116.716758 29.599203 116.693466 29.611404 116.688887 29.604998 116.677663 29.603191 116.664356 29.615539 116.656486 29.616275 116.652517 29.59177 116.627321 29.582369 116.624505 29.575339 116.603531 29.584167 116.597266 29.582168 116.58971 29.585621 116.581817 29.600928 116.565517 29.600765 116.552469 29.606924 116.551662 29.604324 116.522712 29.617221 116.516 29.59644 116.499512 29.57903 116.512801 29.564663 116.539428 29.55905 116.537657 29.554247 116.54222 29.536821 116.524757 29.500016 116.52979 29.4933 116.540225 29.489346 116.548725 29.48156 116.542119 29.465553 116.530844 29.465141 116.528341 29.445337 116.523232 29.435429 116.52878 29.428765 116.54204 29.427974 116.545818 29.424618 116.545437 29.409568 116.558727 29.390775 116.555111 29.377007 116.563202 29.368523 116.558083 29.361522 116.545148 29.363381 116.545741 29.349266 116.554856 29.332841 116.565376 29.324374 116.577589 29.29372 116.586897 29.287722 116.599897 29.25534 116.607827 29.250458 116.608051 29.24221 116.588321 29.207858 116.577948 29.199319 116.527959 29.185687 116.511129 29.185838 116.500375 29.190869 116.493858 29.189481 116.466486 29.168584 116.443871 29.145819 116.43521 29.128018 116.437354 29.090631 116.407682 29.064081 116.406524 29.057166 116.416144 29.037154 116.412561 29.029898 116.412051 28.995852 116.405531 28.985223 116.401435 28.960497 116.380608 28.92677 116.369101 28.900204 116.3551 28.883308 116.345403 28.878381 116.324976 28.874204 116.314097 28.87555 116.309978 28.872514 116.303893 28.876038 116.296372 28.873867 116.262362 28.876206 116.2579 28.879515 116.242256 28.859877 116.254326 28.851814 116.259257 28.837389 116.248025 28.821362 116.248521 28.813625 116.265683 28.80586 116.283382 28.807683 116.293514 28.794199 116.305187 28.79268 116.312037 28.787977 116.314218 28.780214 116.325083 28.772824 116.329243 28.762032 116.328702 28.74993 116.324102 28.743201 116.357938 28.759416 116.383787 28.75785 116.387457 28.754733 116.387298 28.745601 116.39574 28.733858 116.417848 28.729503 116.446331 28.713326 116.453126 28.699252 116.450043 28.687867 116.465985 28.688534 116.470858 28.639674 116.461265 28.631865 116.469816 28.620205 116.471574 28.602695 116.480056 28.588662 116.50385 28.5653 116.509426 28.554938 116.527329 28.546122 116.545838 28.523029 116.560537 28.518446 116.558399 28.514015 116.569052 28.501546 116.565862 28.499213 116.58083 28.495151 116.597933 28.47357 116.594981 28.461406 116.597631 28.456483 116.592716 28.449191 116.596484 28.443567 116.588691 28.441175 116.590336 28.429178 116.581053 28.419626 116.576299 28.408517 116.593266 28.38887 116.612521 28.397127 116.639773 28.391345 116.651573 28.379887 116.667725 28.382201 116.681219 28.389853 116.698649 28.384683 116.722752 28.391748 116.733716 28.409553 116.743283 28.414868 116.754649 28.404206 116.764349 28.379112 116.771734 28.374952 116.784916 28.375254 116.789616 28.357891 116.796987 28.351038 116.802338 28.363642 116.815055 28.364387 116.817201 28.37029 116.832472 28.384282 116.855143 28.381563 116.880637 28.38951 116.882298 28.410091 116.87226 28.423124 116.871724 28.431602 116.894502 28.449196 116.907418 28.466222 116.895573 28.478878 116.885279 28.50247 116.885074 28.509424 116.892926 28.517029 116.898443 28.511033 116.908633 28.511283 116.911945 28.512736 116.913929 28.522576 116.929244 28.530132 116.938831 28.527638 116.956963 28.533771 116.968184 28.529635 116.970334 28.542172 116.982394 28.546826 116.998381 28.51717 117.016105 28.508534 117.016086 28.519996 117.040473 28.531535 117.062985 28.562689 117.061006 28.582918 117.04826 28.597536 117.064436 28.611527 117.086285 28.610437 117.098323 28.600617 117.097829 28.59465 117.114363 28.590323 117.124452 28.581658 117.134574 28.585031 117.160413 28.568934 117.187794 28.581067 117.195796 28.590461 117.225978 28.60307 117.233147 28.62032 117.23038 28.63076 117.244951 28.634055 117.254947 28.622122 117.272701 28.61682 117.272625 28.611128 117.284956 28.608619 117.287974 28.584401 117.297642 28.577324 117.304587 28.559433 117.317944 28.54595 117.317443 28.537297 117.325246 28.532726 117.322389 28.512902 117.330273 28.502239 117.327663 28.488715 117.33027 28.458811 117.339605 28.450417 117.336007 28.436353 117.317706 28.403339 117.318232 28.40072 117.333012 28.397753 117.336574 28.39397 117.331953 28.367352 117.328107 28.362869 117.329342 28.352517 117.2939 28.335676 117.294525 28.318194 117.291606 28.313581 117.267443 28.317389 117.263474 28.31557 117.271022 28.295075 117.268224 28.286114 117.271548 28.287424 117.274129 28.282419 117.288995 28.283569 117.294898 28.280585 117.292601 28.276996 117.300305 28.269284 117.299303 28.262528 117.309561 28.250371 117.309316 28.245862 117.304221 28.242011 117.304749 28.235024 117.292734 28.232179 117.281852 28.217126 117.285776 28.207047 117.280992 28.194514 117.285392 28.179041 117.280458 28.157577 117.297444 28.151092 117.305687 28.152683 117.326722 28.148302 117.32688 28.141837 117.335302 28.133828 117.354794 28.136853 117.36059 28.143444 117.364348 28.143418 117.39421 28.124241 117.423561 28.117026 117.434529 28.120845 117.438545 28.114461 117.449937 28.109703 117.449108 28.101156 117.471484 28.065712 117.470026 28.052292 117.476214 28.044799 117.479211 28.027069 117.47102 28.012446 117.461152 28.005659 117.452328 27.975028 117.456445 27.966509 117.444588 27.955821 117.452839 27.938662 117.462698 27.94571 117.469952 27.945587 117.480301 27.938929 117.483708 27.940248 117.511328 27.960397 117.51617 27.967577 117.517964 27.980485 117.528359 27.988196 117.535132 27.988722 117.539851 27.978931 117.56108 27.973415 117.569232 27.965051 117.566999 27.953096 117.57214 27.942528 117.592615 27.940388 117.595148 27.924606 117.592082 27.913808 117.601103 27.907424 117.610008 27.892275 117.61012 27.874439 117.617112 27.87341 117.62086 27.869194 117.632964 27.869015 117.672255 27.849024 117.67979 27.834207 117.686873 27.829846 117.693949 27.833648 117.700698 27.832236 117.710806 27.840153 117.723272 27.820578 117.744425 27.80651 117.760868 27.81796 117.766183 27.832756 117.773175 27.83958 117.784402 27.844069 117.794081 27.860004 117.789141 27.871669 117.794997 27.888583 117.793619 27.901489 117.812636 27.912429 117.820328 27.925791 117.842789 27.934126 117.855555 27.942815 117.862415 27.952103 117.867717 27.951666 117.873059 27.943825 117.894622 27.953891 117.906181 27.952649 117.91874 27.955796 117.926824 27.96924 117.938991 27.972827 117.949244 27.980326 117.973619 27.969488 117.992153 27.977657 118.004628 27.997032 118.013177 27.986144 118.025755 27.986864 118.040894 27.993942 118.051839 27.984492 118.067416 27.988867 118.074415 27.986731 118.080638 27.973869 118.10126 27.972255 118.103476 27.976694 118.098472 27.987823 118.100997 28.009904 118.109702 28.016496 118.112385 28.023084 118.127138 28.018241 118.134009 28.021143 118.134757 28.030119 118.127092 28.039139 118.126398 28.045443 118.143684 28.063394 118.161223 28.067811 118.189408 28.057577 118.199064 28.059631 118.205813 28.057553 118.217143 28.063275 118.232694 28.06599 118.25017 28.082781 118.261121 28.07454 118.281484 28.088742 118.29985 28.088753 118.316157 28.096957 118.347413 28.091439 118.360519 28.095857 118.360612 28.108341 118.36608 28.117728 118.362307 28.128052 118.374568 28.134921 118.368904 28.143032 118.365485 28.158791 118.384594 28.171266 118.37981 28.182468 118.380586 28.190138 118.377185 28.194929 118.346196 28.200015 118.338675 28.212053 118.324727 28.22128 118.322432 28.226383 118.324732 28.231585 118.354878 28.248232 118.356397 28.256004 -------------------------------------------------------------------------------- /borders/XD.txt: -------------------------------------------------------------------------------- 1 | 115.006546 27.660828 115.015489 27.656916 115.025823 27.660011 115.02654 27.670774 115.021747 27.673851 115.022167 27.69485 115.033045 27.702933 115.03152 27.717629 115.068211 27.733343 115.085554 27.723311 115.088225 27.71152 115.092879 27.710146 115.114753 27.721634 115.119633 27.735471 115.127758 27.743138 115.13286 27.743819 115.133611 27.740089 115.142796 27.737043 115.145376 27.732919 115.142452 27.716432 115.155373 27.716239 115.16279 27.722443 115.172366 27.739026 115.184223 27.740946 115.211632 27.757284 115.286784 27.773204 115.295954 27.777845 115.325237 27.803904 115.33775 27.824703 115.358357 27.838571 115.366594 27.851785 115.367494 27.867402 115.388709 27.871286 115.39432 27.866854 115.39731 27.876584 115.403032 27.875141 115.413024 27.878505 115.399729 27.883982 115.38702 27.878884 115.377446 27.88102 115.364566 27.877866 115.349461 27.878596 115.342669 27.875211 115.340552 27.882193 115.331743 27.886024 115.318394 27.880224 115.306991 27.88691 115.299958 27.887017 115.275058 27.873574 115.267885 27.88308 115.254461 27.880034 115.238627 27.897489 115.231645 27.894336 115.231943 27.884606 115.223102 27.88079 115.208748 27.889892 115.197745 27.884728 115.192664 27.888623 115.186259 27.886592 115.163721 27.898852 115.156993 27.893339 115.153787 27.894167 115.149692 27.90462 115.142783 27.908562 115.139751 27.926825 115.127358 27.942791 115.1264 27.959752 115.119983 27.965983 115.129732 27.975337 115.143673 27.979468 115.135591 27.988729 115.137767 28.008215 115.151017 28.014285 115.15187 28.023452 115.159142 28.034287 115.152909 28.046303 115.17349 28.054731 115.16114 28.06157 115.164104 28.076449 115.152311 28.083351 115.127484 28.087676 115.121544 28.082661 115.120171 28.08635 115.097523 28.088572 115.095791 28.085027 115.082932 28.081856 115.06799 28.072757 115.062502 28.075779 115.057427 28.087156 115.054029 28.081246 115.044362 28.078163 115.03062 28.087384 115.022136 28.086469 115.018985 28.08039 115.001764 28.079638 114.989296 28.099181 114.971113 28.097656 114.956814 28.07238 114.926207 28.062217 114.917152 28.048595 114.921559 28.044372 114.918759 28.030818 114.911928 28.040575 114.906627 28.033495 114.893782 28.031856 114.889343 28.028048 114.885735 28.051733 114.879632 28.05393 114.859156 28.050173 114.832335 28.053156 114.82127 28.040125 114.802822 28.035838 114.792218 28.050916 114.782728 28.051203 114.781916 28.064833 114.789695 28.068588 114.795691 28.086062 114.794116 28.090797 114.783571 28.095648 114.7854 28.101951 114.791373 28.10548 114.789314 28.113251 114.781933 28.108697 114.776092 28.111795 114.766473 28.107398 114.757742 28.113105 114.752952 28.111163 114.747417 28.113797 114.737816 28.10658 114.727301 28.109546 114.709748 28.100068 114.700345 28.107389 114.693075 28.105483 114.686192 28.111204 114.680858 28.108685 114.675291 28.110463 114.665207 28.103355 114.647325 28.101198 114.643031 28.095044 114.624687 28.0849 114.601379 28.088134 114.595342 28.086101 114.595124 28.0818 114.599847 28.079582 114.594125 28.078635 114.574229 28.062105 114.580855 28.053964 114.588649 28.05139 114.594867 28.034505 114.591081 28.028028 114.597484 28.024419 114.599945 28.010143 114.610365 27.998648 114.606366 27.980666 114.582513 27.96331 114.572598 27.968529 114.532002 27.959264 114.523597 27.953696 114.521004 27.947719 114.524471 27.933374 114.512119 27.932317 114.49284 27.924513 114.494265 27.882926 114.516206 27.837098 114.522371 27.832375 114.53415 27.832419 114.553892 27.822317 114.557873 27.838619 114.5754 27.851376 114.579242 27.841955 114.587929 27.836191 114.590198 27.823656 114.589238 27.81522 114.572111 27.794826 114.565772 27.774048 114.581627 27.7685 114.590622 27.729881 114.583239 27.723498 114.584689 27.717807 114.577847 27.707465 114.564414 27.699741 114.548027 27.668237 114.54931 27.653886 114.542298 27.648293 114.534732 27.632955 114.545319 27.615644 114.53674 27.603974 114.543553 27.577004 114.550458 27.570557 114.559689 27.568657 114.597133 27.571116 114.601069 27.567504 114.600093 27.561938 114.608235 27.555473 114.614875 27.561096 114.624219 27.562352 114.630001 27.541353 114.641288 27.536134 114.658425 27.547981 114.667216 27.569589 114.674202 27.574077 114.674344 27.582152 114.684672 27.593555 114.709358 27.597461 114.715025 27.604886 114.73691 27.606465 114.743495 27.595663 114.748373 27.600363 114.748971 27.60877 114.761354 27.613424 114.767878 27.611743 114.785447 27.626263 114.824885 27.613868 114.827425 27.603948 114.834498 27.5961 114.845775 27.596527 114.860578 27.591255 114.87092 27.597828 114.886718 27.597533 114.894022 27.607078 114.895092 27.614162 114.919752 27.620956 114.932926 27.630088 114.932132 27.635796 114.935832 27.639486 114.95018 27.646083 114.96054 27.645727 114.976814 27.656251 114.976586 27.662599 114.967197 27.667464 114.982448 27.680938 114.986789 27.680501 115.006546 27.660828 -------------------------------------------------------------------------------- /borders/YD.txt: -------------------------------------------------------------------------------- 1 | 115.661565 27.834662 115.679117 27.816744 115.684734 27.798531 115.696559 27.791836 115.703187 27.777233 115.726765 27.767121 115.734779 27.766766 115.741709 27.735278 115.766031 27.743986 115.78726 27.744822 115.813873 27.734238 115.845595 27.732835 115.855931 27.749721 115.858493 27.760362 115.854852 27.770139 115.865872 27.788001 115.865893 27.803117 115.871468 27.81057 115.866053 27.837591 115.872141 27.860673 115.892688 27.86064 115.907524 27.872009 115.913928 27.887835 115.928078 27.889356 115.951392 27.900189 115.967036 27.896962 115.974677 27.90177 115.986275 27.901624 116.000405 27.906168 116.010663 27.903631 116.033473 27.914449 116.047887 27.930532 116.073105 27.9373 116.076224 27.950126 116.085586 27.952882 116.085941 27.963868 116.093175 27.967755 116.095831 27.982447 116.107802 27.987713 116.1151 27.998076 116.113641 28.002571 116.125983 28.013393 116.127182 28.026931 116.123088 28.035593 116.12788 28.047449 116.138675 28.046851 116.145187 28.054677 116.139574 28.078388 116.15023 28.077082 116.153337 28.080431 116.142551 28.098382 116.141437 28.10662 116.146811 28.116836 116.155317 28.121491 116.156329 28.134876 116.142708 28.14068 116.123469 28.139112 116.124906 28.147035 116.092538 28.15395 116.083978 28.162452 116.083153 28.166656 116.092033 28.17979 116.089405 28.184461 116.104954 28.209585 116.107177 28.221063 116.113054 28.225534 116.122876 28.24326 116.119339 28.250702 116.1075 28.25646 116.103091 28.273847 116.0877 28.283229 116.079462 28.294101 116.048679 28.301276 116.027561 28.290107 116.015401 28.289769 116.010573 28.284915 116.004192 28.286799 115.998805 28.295498 115.989082 28.298085 115.98043 28.284503 115.972743 28.282267 115.955695 28.286093 115.963489 28.299671 115.956121 28.308903 115.944805 28.31243 115.939135 28.311156 115.936519 28.319834 115.929786 28.321936 115.923925 28.315818 115.926232 28.311759 115.919605 28.309453 115.912953 28.322696 115.899488 28.308724 115.896385 28.299029 115.884704 28.292639 115.877071 28.308129 115.86595 28.319552 115.869803 28.348809 115.858094 28.381399 115.850184 28.393966 115.828443 28.40709 115.820659 28.409182 115.806982 28.404943 115.807833 28.386778 115.797173 28.382572 115.780342 28.366374 115.762466 28.373989 115.735526 28.356165 115.727973 28.367595 115.71532 28.373362 115.706978 28.369252 115.70079 28.373106 115.69383 28.36823 115.681547 28.372865 115.700612 28.3425 115.679304 28.344937 115.667844 28.351091 115.666932 28.344363 115.657631 28.339716 115.626121 28.349894 115.636936 28.354085 115.645126 28.37192 115.656425 28.378894 115.661069 28.387358 115.651409 28.40138 115.626991 28.405211 115.623417 28.41277 115.624701 28.423667 115.615615 28.419288 115.617861 28.399975 115.609969 28.408 115.611062 28.416192 115.60761 28.419669 115.594403 28.40549 115.582991 28.403 115.574223 28.406305 115.563506 28.393965 115.557114 28.394045 115.541596 28.401622 115.542397 28.410998 115.556049 28.414777 115.560554 28.423776 115.558044 28.439117 115.5483 28.448987 115.557648 28.460276 115.563544 28.490698 115.574806 28.50102 115.566569 28.509426 115.56549 28.517193 115.568776 28.521071 115.579697 28.522211 115.569115 28.568638 115.572763 28.57199 115.588601 28.574429 115.593819 28.579597 115.58909 28.584023 115.588634 28.590839 115.579569 28.596452 115.572561 28.591036 115.5617 28.59147 115.554337 28.584316 115.546723 28.582175 115.529916 28.589345 115.533952 28.607369 115.554796 28.629496 115.552893 28.640097 115.546216 28.648947 115.561623 28.697726 115.552552 28.714478 115.565929 28.735765 115.554231 28.739739 115.542092 28.739114 115.531562 28.745634 115.519367 28.736743 115.499918 28.740964 115.489984 28.734793 115.48359 28.737427 115.479944 28.730528 115.473765 28.728669 115.466665 28.739459 115.453365 28.741351 115.455497 28.746258 115.445118 28.7663 115.452575 28.768976 115.446713 28.775643 115.449366 28.780502 115.457458 28.778949 115.460174 28.772341 115.470624 28.789425 115.465026 28.79136 115.466325 28.793454 115.472964 28.793505 115.474454 28.801046 115.489559 28.804037 115.489412 28.819688 115.496296 28.828766 115.493954 28.83515 115.500386 28.849806 115.512438 28.838387 115.524702 28.845672 115.526714 28.855462 115.537097 28.86775 115.528171 28.887548 115.529123 28.89815 115.518724 28.902341 115.5191 28.907796 115.510603 28.919013 115.511959 28.930084 115.505924 28.934619 115.485707 28.970324 115.478595 28.972343 115.469926 28.990045 115.474079 28.998968 115.482626 28.999889 115.479474 29.00582 115.482069 29.012071 115.476559 29.018883 115.477976 29.028672 115.455246 29.036663 115.444262 29.047919 115.453645 29.061452 115.452406 29.066922 115.434415 29.07231 115.417983 29.069261 115.400836 29.073612 115.401178 29.080632 115.39692 29.083223 115.36068 29.092573 115.331063 29.104503 115.31066 29.105224 115.301373 29.101782 115.292419 29.105614 115.255201 29.095768 115.222975 29.100794 115.209314 29.09255 115.157356 29.081196 115.117792 29.057969 115.104956 29.057007 115.082362 29.046328 115.079289 29.040044 115.057756 29.03751 115.05499 29.025383 115.047095 29.018639 115.002621 29.013412 114.994582 29.003945 114.987079 29.000531 114.986389 28.995892 114.99096 28.990528 114.970372 28.97537 114.978337 28.94999 114.955739 28.929203 114.959562 28.921636 114.955955 28.915739 114.95652 28.907836 114.964741 28.895909 114.962327 28.887114 114.948671 28.877437 114.928073 28.873401 114.916116 28.859772 114.914893 28.834829 114.924961 28.810988 114.905756 28.788451 114.897114 28.769135 114.886195 28.758625 114.872416 28.761443 114.848287 28.746438 114.831186 28.769066 114.82448 28.775243 114.818536 28.775456 114.802455 28.759191 114.810436 28.741479 114.807349 28.732701 114.795095 28.728657 114.779683 28.718027 114.769195 28.719449 114.762998 28.711605 114.748237 28.706036 114.743559 28.693236 114.724401 28.697461 114.712306 28.691428 114.681278 28.696964 114.671378 28.692889 114.654842 28.691765 114.648465 28.697981 114.630216 28.701228 114.621326 28.716933 114.599616 28.729112 114.59032 28.738626 114.586312 28.768212 114.575619 28.777467 114.572137 28.77085 114.554739 28.772697 114.545308 28.764185 114.537321 28.765842 114.524397 28.760159 114.516682 28.76363 114.507364 28.76002 114.495132 28.761999 114.490561 28.759707 114.477848 28.740765 114.46638 28.733229 114.474093 28.708175 114.471953 28.703152 114.430736 28.721693 114.413641 28.711532 114.397032 28.710492 114.376822 28.720496 114.371761 28.708045 114.352026 28.712049 114.347665 28.71921 114.320514 28.733746 114.317655 28.743362 114.296775 28.762584 114.286982 28.763753 114.278983 28.771126 114.274418 28.791327 114.263832 28.813794 114.2533 28.815715 114.247932 28.808748 114.237054 28.807456 114.230722 28.817008 114.231025 28.828018 114.223225 28.836356 114.21096 28.826412 114.204089 28.813292 114.170294 28.791777 114.170365 28.781749 114.160003 28.776924 114.163634 28.767341 114.158472 28.748439 114.153221 28.742026 114.155854 28.729798 114.149121 28.721331 114.148003 28.711258 114.134659 28.707366 114.128815 28.695833 114.130275 28.686959 114.139527 28.677973 114.135804 28.668585 114.13883 28.664631 114.135784 28.653755 114.138732 28.645783 114.128687 28.629625 114.129784 28.625218 114.135988 28.622034 114.138565 28.613492 114.125128 28.593232 114.109221 28.587405 114.101277 28.576209 114.101169 28.568363 114.093105 28.562174 114.107096 28.546521 114.124889 28.545354 114.131807 28.540755 114.14334 28.541597 114.149109 28.526377 114.161149 28.513487 114.17546 28.505081 114.18662 28.502583 114.200466 28.504882 114.224667 28.490737 114.223385 28.472554 114.208851 28.465152 114.194105 28.444653 114.179801 28.441863 114.17893 28.438486 114.194852 28.438337 114.202066 28.435172 114.211025 28.427695 114.221068 28.409161 114.228941 28.407853 114.234555 28.401727 114.239738 28.405129 114.261432 28.400178 114.265733 28.381433 114.25629 28.372311 114.267743 28.358408 114.260171 28.356045 114.253541 28.344427 114.261975 28.332828 114.260516 28.327184 114.241524 28.31727 114.225445 28.302032 114.214419 28.303235 114.204669 28.296557 114.204911 28.275608 114.191229 28.27332 114.188734 28.255728 114.17449 28.259303 114.15151 28.253899 114.150262 28.244294 114.136076 28.234476 114.127644 28.219505 114.113691 28.209634 114.111739 28.187781 114.090281 28.185111 114.084146 28.179971 114.062296 28.176163 114.054562 28.18243 114.033756 28.178161 114.01239 28.183537 114.010266 28.172664 114.000722 28.16667 114.002233 28.158962 114.013534 28.144757 114.016618 28.132641 114.022044 28.129549 114.024799 28.106717 114.030473 28.104979 114.035955 28.086513 114.043794 28.082697 114.051409 28.063723 114.035895 28.047876 114.031232 28.036976 114.006967 28.046784 113.96986 28.045526 113.962775 28.036396 113.972084 28.022798 113.952696 28.01973 113.942103 28.024599 113.932293 28.018197 113.925418 28.007781 113.931179 28.002292 113.93074 27.997664 113.926865 27.998111 113.929561 27.990966 113.939638 27.99065 113.94886 27.99549 113.957522 27.994476 113.958544 27.981134 113.968307 27.973279 113.980557 27.973102 113.98361 27.981719 113.998584 27.979188 114.011028 27.959643 114.01963 27.957962 114.019265 27.945551 114.002421 27.928953 113.96991 27.925214 113.950664 27.915518 113.944345 27.919226 113.912538 27.894175 113.916758 27.885918 113.89622 27.880337 113.898205 27.875376 113.917331 27.869953 113.913032 27.863322 113.91814 27.854212 113.916159 27.842148 113.924168 27.840842 113.931556 27.843694 113.939674 27.836931 113.943418 27.820549 113.941346 27.810544 113.94849 27.809333 113.950925 27.815805 113.965253 27.820431 113.973652 27.814259 113.966042 27.790508 113.971482 27.783341 113.980906 27.780263 113.980301 27.767163 113.995522 27.766081 114.005749 27.758274 114.026888 27.767983 114.034686 27.761434 114.043896 27.760123 114.050247 27.749008 114.054334 27.748205 114.069196 27.751582 114.076297 27.749467 114.101225 27.762466 114.115995 27.760013 114.121843 27.764734 114.121049 27.771937 114.137916 27.775628 114.140254 27.76876 114.148771 27.767389 114.155187 27.759258 114.163142 27.739441 114.185488 27.737261 114.18327 27.728322 114.196804 27.715181 114.20145 27.705426 114.199086 27.698916 114.223563 27.671332 114.213249 27.651689 114.202518 27.646295 114.214565 27.642739 114.220104 27.632753 114.248025 27.606281 114.261953 27.595985 114.271718 27.593221 114.28178 27.580993 114.292842 27.584483 114.312435 27.582583 114.339998 27.565612 114.341646 27.560733 114.355468 27.570333 114.374385 27.551811 114.381814 27.556439 114.423542 27.553831 114.43127 27.564816 114.44064 27.56901 114.468626 27.568059 114.472499 27.563666 114.490317 27.582072 114.508829 27.588573 114.51032 27.595083 114.506919 27.603253 114.510601 27.608586 114.537205 27.601859 114.537746 27.607347 114.545319 27.615644 114.534732 27.632955 114.542298 27.648293 114.54931 27.653886 114.547598 27.666238 114.551419 27.676558 114.564414 27.699741 114.577847 27.707465 114.584689 27.717807 114.583239 27.723498 114.590622 27.729881 114.581627 27.7685 114.565772 27.774048 114.572111 27.794826 114.589238 27.81522 114.587929 27.836191 114.579242 27.841955 114.577583 27.85045 114.574177 27.851576 114.557873 27.838619 114.553892 27.822317 114.532414 27.832998 114.519525 27.833727 114.511656 27.842765 114.496991 27.873189 114.492295 27.894432 114.49284 27.924513 114.512119 27.932317 114.524471 27.933374 114.521004 27.947719 114.523597 27.953696 114.532002 27.959264 114.572598 27.968529 114.582513 27.96331 114.606366 27.980666 114.610365 27.998648 114.599945 28.010143 114.597484 28.024419 114.591081 28.028028 114.594867 28.034505 114.588649 28.05139 114.580855 28.053964 114.574229 28.062105 114.594125 28.078635 114.599847 28.079582 114.595124 28.0818 114.595342 28.086101 114.601379 28.088134 114.624687 28.0849 114.643031 28.095044 114.647325 28.101198 114.665207 28.103355 114.675291 28.110463 114.680858 28.108685 114.686192 28.111204 114.693075 28.105483 114.700345 28.107389 114.709748 28.100068 114.727301 28.109546 114.737816 28.10658 114.747417 28.113797 114.752952 28.111163 114.757742 28.113105 114.766473 28.107398 114.776092 28.111795 114.781933 28.108697 114.790868 28.11275 114.791373 28.10548 114.783236 28.097303 114.788118 28.09171 114.794116 28.090797 114.795691 28.086062 114.789695 28.068588 114.781916 28.064833 114.781739 28.054467 114.784744 28.050293 114.792218 28.050916 114.801023 28.036321 114.82127 28.040125 114.832335 28.053156 114.859156 28.050173 114.879632 28.05393 114.885735 28.051733 114.889343 28.028048 114.893782 28.031856 114.906627 28.033495 114.911928 28.040575 114.918759 28.030818 114.921559 28.044372 114.917152 28.048595 114.926207 28.062217 114.956814 28.07238 114.971113 28.097656 114.989296 28.099181 115.001764 28.079638 115.018985 28.08039 115.022136 28.086469 115.03062 28.087384 115.044362 28.078163 115.054029 28.081246 115.057427 28.087156 115.062502 28.075779 115.06799 28.072757 115.082932 28.081856 115.095791 28.085027 115.097523 28.088572 115.120171 28.08635 115.121544 28.082661 115.127484 28.087676 115.132993 28.087737 115.158628 28.080781 115.165329 28.073369 115.16114 28.06157 115.17349 28.054731 115.152909 28.046303 115.159142 28.034287 115.15187 28.023452 115.151017 28.014285 115.137767 28.008215 115.135591 27.988729 115.143673 27.979468 115.129732 27.975337 115.119983 27.965983 115.1264 27.959752 115.127358 27.942791 115.139751 27.926825 115.142783 27.908562 115.149692 27.90462 115.155261 27.893545 115.163721 27.898852 115.186259 27.886592 115.192664 27.888623 115.197745 27.884728 115.208748 27.889892 115.223102 27.88079 115.231943 27.884606 115.231645 27.894336 115.238627 27.897489 115.254461 27.880034 115.267885 27.88308 115.275058 27.873574 115.299958 27.887017 115.306991 27.88691 115.318394 27.880224 115.331743 27.886024 115.340552 27.882193 115.342669 27.875211 115.349461 27.878596 115.364566 27.877866 115.377446 27.88102 115.38702 27.878884 115.399729 27.883982 115.413024 27.878505 115.414915 27.883007 115.412247 27.886329 115.400643 27.889088 115.390721 27.898209 115.393177 27.906896 115.410461 27.917373 115.415665 27.931531 115.414809 27.935632 115.400256 27.941305 115.400527 27.95155 115.420798 27.961243 115.433227 27.952624 115.431832 27.962945 115.435558 27.967603 115.447269 27.965928 115.450616 27.962649 115.446487 27.939432 115.468879 27.926858 115.477727 27.932171 115.481091 27.941485 115.470171 27.951961 115.482382 27.954402 115.492077 27.963034 115.517469 27.954045 115.5422 27.953958 115.541547 27.938366 115.535974 27.931126 115.520874 27.922356 115.523136 27.91341 115.516916 27.903206 115.530784 27.891291 115.538902 27.890535 115.550222 27.87619 115.572829 27.866082 115.584717 27.869519 115.594189 27.849266 115.627865 27.830561 115.651927 27.826951 115.661565 27.834662 -------------------------------------------------------------------------------- /borders/YN.txt: -------------------------------------------------------------------------------- 1 | 117.438183 27.922374 117.452839 27.938662 117.444588 27.955821 117.456445 27.966509 117.452328 27.975028 117.461152 28.005659 117.47102 28.012446 117.479211 28.027069 117.476214 28.044799 117.470026 28.052292 117.471484 28.065712 117.449108 28.101156 117.449937 28.109703 117.438545 28.114461 117.434529 28.120845 117.423561 28.117026 117.39421 28.124241 117.364348 28.143418 117.36059 28.143444 117.354794 28.136853 117.333361 28.13419 117.32688 28.141837 117.326722 28.148302 117.28646 28.153543 117.279998 28.159012 117.285392 28.179041 117.280992 28.194514 117.285776 28.207047 117.281852 28.217126 117.292734 28.232179 117.304749 28.235024 117.304221 28.242011 117.309316 28.245862 117.309561 28.250371 117.299303 28.262528 117.300305 28.269284 117.292601 28.276996 117.294898 28.280585 117.288995 28.283569 117.274129 28.282419 117.271548 28.287424 117.268224 28.286114 117.271022 28.295075 117.263474 28.31557 117.267443 28.317389 117.291606 28.313581 117.294525 28.318194 117.2939 28.335676 117.329342 28.352517 117.328107 28.362869 117.331953 28.367352 117.336574 28.39397 117.333012 28.397753 117.318232 28.40072 117.317706 28.403339 117.336007 28.436353 117.339605 28.450417 117.33027 28.458811 117.327663 28.488715 117.330273 28.502239 117.322389 28.512902 117.325246 28.532726 117.317443 28.537297 117.317944 28.54595 117.304587 28.559433 117.297642 28.577324 117.287974 28.584401 117.284956 28.608619 117.272625 28.611128 117.272701 28.61682 117.254947 28.622122 117.244951 28.634055 117.234451 28.632875 117.23038 28.63076 117.233147 28.62032 117.225978 28.60307 117.195796 28.590461 117.187794 28.581067 117.160413 28.568934 117.134574 28.585031 117.124452 28.581658 117.114363 28.590323 117.097829 28.59465 117.098323 28.600617 117.086285 28.610437 117.065806 28.612044 117.048321 28.598619 117.061006 28.582918 117.062338 28.561318 117.040473 28.531535 117.016086 28.519996 117.016105 28.508534 116.998381 28.51717 116.982394 28.546826 116.970334 28.542172 116.968184 28.529635 116.956963 28.533771 116.938831 28.527638 116.929244 28.530132 116.913929 28.522576 116.911945 28.512736 116.908633 28.511283 116.898443 28.511033 116.892926 28.517029 116.885074 28.509424 116.885279 28.50247 116.895573 28.478878 116.907418 28.466222 116.894502 28.449196 116.871724 28.431602 116.87226 28.423124 116.882298 28.410091 116.880637 28.38951 116.855143 28.381563 116.832472 28.384282 116.817201 28.37029 116.815055 28.364387 116.802338 28.363642 116.796642 28.350271 116.807428 28.330552 116.804973 28.31486 116.818736 28.310067 116.826103 28.296945 116.821227 28.288234 116.823084 28.279268 116.813395 28.275655 116.820141 28.268936 116.810573 28.265055 116.810956 28.257247 116.808091 28.255536 116.787952 28.264099 116.775061 28.26002 116.753583 28.270578 116.740782 28.268239 116.707544 28.245659 116.698926 28.230747 116.699328 28.222458 116.704678 28.213371 116.714141 28.207538 116.729353 28.212207 116.74097 28.21019 116.732583 28.192727 116.733278 28.187868 116.738419 28.18389 116.752636 28.186257 116.757104 28.173841 116.791832 28.18459 116.805844 28.17514 116.819093 28.173157 116.818396 28.158988 116.807638 28.151919 116.802178 28.130258 116.805097 28.1205 116.812509 28.116821 116.81408 28.101784 116.818549 28.101629 116.831319 28.111681 116.840836 28.110349 116.845266 28.104092 116.862373 28.097036 116.865457 28.091584 116.88796 28.088328 116.899693 28.073919 116.920682 28.076728 116.919866 28.088092 116.928332 28.10349 116.939839 28.098971 116.939657 28.073278 116.947536 28.053761 116.944692 28.04869 116.953657 28.0511 116.976185 28.044046 116.98667 28.021861 117.008971 28.00607 117.012165 27.997434 117.032338 27.983023 117.043858 27.982323 117.055649 27.97668 117.056782 27.969974 117.051313 27.961984 117.054507 27.947179 117.05163 27.93889 117.037671 27.93673 117.016096 27.9003 117.018831 27.890042 117.016727 27.884952 117.029262 27.875361 117.029043 27.85721 117.03862 27.852803 117.054663 27.852496 117.062233 27.866359 117.087786 27.888452 117.0887 27.895811 117.094321 27.901721 117.105038 27.885121 117.11307 27.886414 117.11642 27.906562 117.13066 27.9173 117.136481 27.915103 117.151734 27.896475 117.160651 27.897993 117.168673 27.907212 117.176836 27.903463 117.179202 27.896455 117.191892 27.896637 117.204476 27.886643 117.212541 27.889709 117.221848 27.900381 117.226214 27.900236 117.244395 27.892255 117.256936 27.874489 117.281417 27.876346 117.29103 27.871186 117.316816 27.88962 117.324632 27.89988 117.331968 27.900665 117.339329 27.896252 117.342074 27.889594 117.33954 27.868128 117.349696 27.861755 117.356458 27.864901 117.373041 27.888695 117.395515 27.893894 117.40256 27.899108 117.416795 27.900831 117.438183 27.922374 -------------------------------------------------------------------------------- /images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/1.png -------------------------------------------------------------------------------- /images/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/10.png -------------------------------------------------------------------------------- /images/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/11.png -------------------------------------------------------------------------------- /images/17032520.001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/17032520.001.png -------------------------------------------------------------------------------- /images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/2.png -------------------------------------------------------------------------------- /images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/3.png -------------------------------------------------------------------------------- /images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/4.png -------------------------------------------------------------------------------- /images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/7.png -------------------------------------------------------------------------------- /images/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/9.png -------------------------------------------------------------------------------- /images/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/debug.png -------------------------------------------------------------------------------- /images/jz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/jz.png -------------------------------------------------------------------------------- /images/lcc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/lcc.png -------------------------------------------------------------------------------- /images/readme.txt: -------------------------------------------------------------------------------- 1 | 示例图片 2 | -------------------------------------------------------------------------------- /images/sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/sh.png -------------------------------------------------------------------------------- /images/sh1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/sh1.png -------------------------------------------------------------------------------- /images/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/wx.png -------------------------------------------------------------------------------- /images/xz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/xz.png -------------------------------------------------------------------------------- /images/zfb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/images/zfb.png -------------------------------------------------------------------------------- /jxlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/jxlogo.png -------------------------------------------------------------------------------- /lib/natgrid-0.2.1-cp37-cp37m-win_amd64.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/lib/natgrid-0.2.1-cp37-cp37m-win_amd64.whl -------------------------------------------------------------------------------- /lib/nclcmaps-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/lib/nclcmaps-master.zip -------------------------------------------------------------------------------- /lib/readme.txt: -------------------------------------------------------------------------------- 1 | 放置第三方包的地方 2 | -------------------------------------------------------------------------------- /maskout.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ######################################################################################################################## 3 | # ### This module enables you to maskout the unneccessary data outside the 4 | # interest region on a matplotlib-plotted output instance 5 | # ################### in an effecient way,You can use this script for free ########################################### 6 | # ###################################################################################################################### 7 | # ####USAGE:INPUT include 'originfig':the matplotlib instance## 8 | # 'ax': the Axes instance 9 | # 'shapefile': the shape file used for generating a basemap A 10 | # 'region':the name of a region of on the basemap A,outside the region the data is to be maskout 11 | # OUTPUT is 'clip' :the the masked-out or clipped matplotlib instance. 12 | import shapefile 13 | from matplotlib.path import Path 14 | from matplotlib.patches import PathPatch 15 | 16 | 17 | def getPathFromShp(shpfile, region, encoding="utf-8"): 18 | try: 19 | sf = shapefile.Reader(shpfile, encoding=encoding) 20 | vertices = [] # 这块是已经修改的地方 21 | codes = [] # 这块是已经修改的地方 22 | paths = [] 23 | for shape_rec in sf.shapeRecords(): 24 | # if shape_rec.record[3] == region: # 这里需要找到和region匹配的唯一标识符,record[]中必有一项是对应的。 25 | if region == [100000] or shape_rec.record[4] in region: # 这块是已经修改的地方 26 | pts = shape_rec.shape.points 27 | prt = list(shape_rec.shape.parts) + [len(pts)] 28 | for i in range(len(prt) - 1): 29 | for j in range(prt[i], prt[i + 1]): 30 | vertices.append((pts[j][0], pts[j][1])) 31 | codes += [Path.MOVETO] 32 | codes += [Path.LINETO] * (prt[i + 1] - prt[i] - 2) 33 | codes += [Path.CLOSEPOLY] 34 | path = Path(vertices, codes) 35 | paths.append(path) 36 | if paths: 37 | path = Path.make_compound_path(*paths) 38 | else: 39 | path = None 40 | return path 41 | except Exception as err: 42 | print(err) 43 | return None 44 | 45 | 46 | def shp2clip(originfig, ax, shpfile, region, encoding=None): 47 | if encoding is None: 48 | encoding = "utf-8" 49 | path = getPathFromShp(shpfile=shpfile, region=region, encoding=encoding) 50 | patch = None 51 | if path: 52 | patch = PathPatch( 53 | path, transform=ax.transData, facecolor="none", edgecolor="black" 54 | ) 55 | for contour in originfig.collections: 56 | contour.set_clip_path(patch) 57 | return path, patch 58 | -------------------------------------------------------------------------------- /shapefile/bou1_4p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou1_4p.dbf -------------------------------------------------------------------------------- /shapefile/bou1_4p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou1_4p.shp -------------------------------------------------------------------------------- /shapefile/bou1_4p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou1_4p.shx -------------------------------------------------------------------------------- /shapefile/bou2_4l.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4l.dbf -------------------------------------------------------------------------------- /shapefile/bou2_4l.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4l.shp -------------------------------------------------------------------------------- /shapefile/bou2_4l.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4l.shx -------------------------------------------------------------------------------- /shapefile/bou2_4p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4p.dbf -------------------------------------------------------------------------------- /shapefile/bou2_4p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4p.shp -------------------------------------------------------------------------------- /shapefile/bou2_4p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flashlxy/PyMICAPS/8bffd1793dba2bd56bc048f4ff25f1a7e84fcc57/shapefile/bou2_4p.shx -------------------------------------------------------------------------------- /shapefile/readme.txt: -------------------------------------------------------------------------------- 1 | 放置shp文件的目录 2 | --------------------------------------------------------------------------------