正在显示
1 个修改的文件
包含
55 行增加
和
0 行删除
1 | +/************************************************************************** | |
2 | +* file: dmpabstractesribundleprovider.cpp | |
3 | + | |
4 | +* Author: wanzhongping | |
5 | +* Date: 2021-05-31 13:52:23 | |
6 | +* Email: zhongpingw@chinadci.com | |
7 | +* copyright: 广州城市信息研究所有限公司 | |
8 | +***************************************************************************/ | |
9 | + | |
10 | +#include "dmpwmtsutils.h" | |
11 | +#include "dmpabstractesribundleprovider.h" | |
12 | +#include <string> | |
13 | + | |
14 | +using namespace std; | |
15 | +namespace DmpWmts | |
16 | +{ | |
17 | + string DmpAbstractEsriBundleProvider::GetBundlePath(int level, int rGroup, int cGroup) | |
18 | + { | |
19 | + string l = std::to_string(level); | |
20 | + int len = l.length(); | |
21 | + if (len < 2) | |
22 | + { | |
23 | + for (int i = 0; i < 2 - len; i++) | |
24 | + { | |
25 | + l = "0" + l; | |
26 | + } | |
27 | + } | |
28 | + l = "L" + l; | |
29 | + string r = IntToHexStr(rGroup); | |
30 | + | |
31 | + int rLength = r.length(); | |
32 | + if (rLength < 4) | |
33 | + { | |
34 | + for (int i = 0; i < 4 - rLength; i++) | |
35 | + { | |
36 | + r = "0" + r; | |
37 | + } | |
38 | + } | |
39 | + r = "R" + r; | |
40 | + | |
41 | + string c = IntToHexStr(cGroup); | |
42 | + int cLength = c.length(); | |
43 | + if (cLength < 4) | |
44 | + { | |
45 | + for (int i = 0; i < 4 - cLength; i++) | |
46 | + { | |
47 | + c = "0" + c; | |
48 | + } | |
49 | + } | |
50 | + c = "C" + c; | |
51 | + | |
52 | + string bundlePath = _rootPath+"/"+l+"/"+r+c; | |
53 | + return bundlePath; | |
54 | + } | |
55 | +} | |
\ No newline at end of file | ... | ... |
请
注册
或
登录
后发表评论