提交 8dcdf792706fe997bfffbf565a90b1777e57b511

作者 LJH 李佳桓
1 个父辈 1b84f45c

add

  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
... ...
注册登录 后发表评论