提交 d6049415de3a96c37f20a5ec5332f04b80a2d338

作者 LJH 李佳桓
1 个父辈 e86828c6

ljh20211214

... ... @@ -129,6 +129,11 @@ void DmpManagerApiHandler::regService(const DmpServerApiContext &context) const
129 129 //context.response()->write("{\"status\":\"true\",\"message\":\"服务发布成功\"}");
130 130 context.response()->write("{\"status\":\"true\",\"message\":\"Pulish service successful!\"}");
131 131 }
  132 + else
  133 + {
  134 + LOGGER_ERROR("服务发布失败");
  135 + context.response()->write("{\"status\":\"false\",\"message\":\"Pulish service fail!\"}");
  136 + }
132 137 }
133 138 else
134 139 {
... ...
... ... @@ -14,8 +14,8 @@
14 14 using namespace std;
15 15 namespace DmpWmts
16 16 {
17   - DmpAbstractEsriBundleProvider::DmpAbstractEsriBundleProvider(const std::string& root_path)
18   - : DmpTileProvider(root_path)
  17 + DmpAbstractEsriBundleProvider::DmpAbstractEsriBundleProvider(const std::string& rootPath)
  18 + : DmpTileProvider(rootPath)
19 19 {
20 20
21 21 }
... ... @@ -54,7 +54,7 @@ namespace DmpWmts
54 54 }
55 55 c = "C" + c;
56 56
57   - string bundlePath = root_path_ + "/"+l+"/"+r+c;
  57 + string bundlePath = rootPath_ + "/"+l+"/"+r+c;
58 58 return bundlePath;
59 59 }
60 60 }
\ No newline at end of file
... ...
... ... @@ -18,7 +18,7 @@ namespace DmpWmts
18 18 class DmpAbstractEsriBundleProvider : public DmpTileProvider
19 19 {
20 20 protected:
21   - DmpAbstractEsriBundleProvider(const std::string& root_path);
  21 + DmpAbstractEsriBundleProvider(const std::string& rootPath);
22 22 std::string GetBundlePath(int level, int rGroup, int cGroup);
23 23 const int _packetSize = 128;
24 24 };
... ...
... ... @@ -35,12 +35,12 @@ namespace DmpWmts
35 35 public:
36 36 DmpCapabiliTilesOperation();
37 37 void WriteCapabilities(DmpServerResponse& response);
38   - void WriteCapabilities(boost::property_tree::ptree& pt,const std::string& host_ ,const std::string& servicename,DmpServerResponse& response);
  38 + void WriteCapabilities(boost::property_tree::ptree& pt ,const std::string& host ,const std::string& servicename,DmpServerResponse& response);
39 39 void GetCapabilitiesDocument(DmpServerResponse& response);
40   - void CreateGetCapabilitiesDocument(const std::string& host_ ,const std::string& servicename,boost::property_tree::ptree& pt);
  40 + void CreateGetCapabilitiesDocument(const std::string& host,const std::string& servicename,boost::property_tree::ptree& pt);
41 41 void GetServiceIdentificationElement(const std::string& servicename,boost::property_tree::ptree& pt);
42 42 void GetServiceProviderElement(boost::property_tree::ptree& pt);
43   - void GetServiceMetadataElement(const std::string& host_ ,const std::string& servicename,boost::property_tree::ptree& pt);
  43 + void GetServiceMetadataElement(const std::string& host ,const std::string& servicename,boost::property_tree::ptree& pt);
44 44 void GetServiceTileMatrixSetElement(const std::string& servicename,boost::property_tree::ptree& pt);
45 45 };
46 46 }
... ...
... ... @@ -17,7 +17,7 @@ namespace DmpWmts
17 17 {
18 18 public:
19 19 void WriteCapabilities(DmpServerResponse& respons);
20   - void WriteCapabilities(boost::property_tree::ptree& pt_,const std::string& host_ ,const std::string& servicename ,DmpServerResponse& respons);
  20 + void WriteCapabilities(boost::property_tree::ptree& pt,const std::string& host ,const std::string& servicename ,DmpServerResponse& respons);
21 21
22 22 protected:
23 23 std::string file_rootPath;
... ...
... ... @@ -11,8 +11,8 @@
11 11 #include <iostream>
12 12 namespace DmpWmts
13 13 {
14   - DmpEsriBundleV1Provider:: DmpEsriBundleV1Provider(const std::string& root_path)
15   - : DmpAbstractEsriBundleProvider(root_path)
  14 + DmpEsriBundleV1Provider:: DmpEsriBundleV1Provider(const std::string& rootPath)
  15 + : DmpAbstractEsriBundleProvider(rootPath)
16 16 {
17 17 // _rootPath ="/mnt/d/Data/tile/GDMap/_alllayers";
18 18 }
... ...
... ... @@ -16,7 +16,7 @@ namespace DmpWmts
16 16 class DmpEsriBundleV1Provider : public DmpAbstractEsriBundleProvider
17 17 {
18 18 public:
19   - DmpEsriBundleV1Provider(const std::string& root_path);
  19 + DmpEsriBundleV1Provider(const std::string& rootPath);
20 20 void WriteTile(const int row, const int col, const int level, const std::string& format, DmpServerResponse& response) override;
21 21 };
22 22 }
... ...
... ... @@ -11,8 +11,8 @@
11 11
12 12 namespace DmpWmts
13 13 {
14   - DmpEsriBundleV2Provider::DmpEsriBundleV2Provider(const std::string& root_path)
15   - : DmpAbstractEsriBundleProvider(root_path)
  14 + DmpEsriBundleV2Provider::DmpEsriBundleV2Provider(const std::string& rootPath)
  15 + : DmpAbstractEsriBundleProvider(rootPath)
16 16 {
17 17 // _rootPath ="/mnt/d/Data/SDZT_DIANZDT_2016_FS2K/Layers/_alllayers";
18 18 }
... ...
... ... @@ -16,7 +16,7 @@ namespace DmpWmts
16 16 class DmpEsriBundleV2Provider : public DmpAbstractEsriBundleProvider
17 17 {
18 18 public:
19   - DmpEsriBundleV2Provider(const std::string& root_path);
  19 + DmpEsriBundleV2Provider(const std::string& rootPath);
20 20 void WriteTile(const int row, const int col, const int level, const std::string& format, DmpServerResponse& response) override;
21 21 };
22 22 }
... ...
... ... @@ -12,8 +12,8 @@
12 12
13 13 namespace DmpWmts
14 14 {
15   - DmpEsriTileProvider::DmpEsriTileProvider(const std::string& root_path)
16   - : DmpTileProvider(root_path)
  15 + DmpEsriTileProvider::DmpEsriTileProvider(const std::string& rootPath)
  16 + : DmpTileProvider(rootPath)
17 17 {
18 18 // this->_rootPath ="/mnt/d/Data/tile/ShareMap2014/Layers/_alllayers/";
19 19 }
... ... @@ -32,7 +32,7 @@ namespace DmpWmts
32 32 std::string row_str = "R" + IntToHex8Str(row);
33 33 std::string col_str = "C" + IntToHex8Str(col);
34 34
35   - std::string tile_path = root_path_ + level_str + "/"+ row_str+"/"+ col_str + "." + format;
  35 + std::string tile_path = rootPath_ + level_str + "/"+ row_str+"/"+ col_str + "." + format;
36 36
37 37 std::ifstream fread(tile_path, std::ifstream::binary);
38 38 if(!fread)
... ...
... ... @@ -16,7 +16,7 @@ namespace DmpWmts
16 16 class DmpEsriTileProvider : public DmpTileProvider
17 17 {
18 18 public:
19   - DmpEsriTileProvider(const std::string& root_path);
  19 + DmpEsriTileProvider(const std::string& rootPath);
20 20 void WriteTile(const int row, const int col, const int level, const std::string& format, DmpServerResponse& response) override;
21 21 private:
22 22 std::string IntToHex8Str(const int num);
... ...
... ... @@ -18,11 +18,11 @@ namespace DmpWmts
18 18 class DmpTileProvider
19 19 {
20 20 public:
21   - DmpTileProvider(const std::string& root_path) { root_path_ = root_path ;}
  21 + DmpTileProvider(const std::string& rootPath) { rootPath_ = rootPath ;}
22 22 virtual void WriteTile(const int row, const int col, const int level, const std::string& format, DmpServerResponse& respons) = 0;
23 23
24 24 protected:
25   - std::string root_path_;
  25 + std::string rootPath_;
26 26 };
27 27 }
28 28 #endif //__dmptileprovider_h__
... ...
... ... @@ -24,13 +24,13 @@ namespace DmpWmts
24 24 {
25 25 }
26 26
27   - std::shared_ptr<DmpTileProvider> TileProviderFactory::GetProvider(DmpTileLayer* dmpTileLayer_)
  27 + std::shared_ptr<DmpTileProvider> TileProviderFactory::GetProvider(DmpTileLayer* dmpTileLayer)
28 28 {
29 29 std::shared_ptr<DmpTileProvider> provider;
30 30 try
31 31 {
32   - std::string tileVersion_= dmpTileLayer_->getVector();
33   - std::string tilePath_=dmpTileLayer_->getDataSource();
  32 + std::string tileVersion_= dmpTileLayer->getVector();
  33 + std::string tilePath_=dmpTileLayer->getDataSource();
34 34 //std::string tilePath_ = "/mnt/d/Code/tiles/gdmap/_alllayers";
35 35 //std::string tileVersion_ = "ESRI_V1";
36 36 int iver_=StringToVector(tileVersion_);
... ...
... ... @@ -31,7 +31,7 @@ namespace DmpWmts
31 31 class TileProviderFactory
32 32 {
33 33 public:
34   - static std::shared_ptr<DmpTileProvider> GetProvider( DmpTileLayer* dmpTileLayer_);
  34 + static std::shared_ptr<DmpTileProvider> GetProvider( DmpTileLayer* dmpTileLayer);
35 35 private:
36 36 TileProviderFactory();
37 37 };
... ...
... ... @@ -31,18 +31,18 @@ namespace DmpWmts
31 31 delete[] buffer;
32 32 return str;
33 33 }
34   - int StringToVector(std::string& strVector_)
  34 + int StringToVector(std::string& strVector)
35 35 {
36 36 int iVector_=-1;
37   - if(std::strcmp(strVector_.c_str(),"ESRI_V0")==0)
  37 + if(std::strcmp(strVector.c_str(),"ESRI_V0")==0)
38 38 {
39 39 iVector_=0;
40 40 }
41   - else if(std::strcmp(strVector_.c_str(),"ESRI_V1")==0)
  41 + else if(std::strcmp(strVector.c_str(),"ESRI_V1")==0)
42 42 {
43 43 iVector_=1;
44 44 }
45   - else if(std::strcmp(strVector_.c_str(),"ESRI_V2")==0)
  45 + else if(std::strcmp(strVector.c_str(),"ESRI_V2")==0)
46 46 {
47 47 iVector_=2;
48 48 }
... ...
... ... @@ -17,7 +17,7 @@ namespace DmpWmts
17 17 {
18 18 std::string IntToFormatStr(const int num);
19 19 std::string IntToHexStr(const int num);
20   - int StringToVector(std::string& strVector_);
  20 + int StringToVector(std::string& strVector);
21 21 }
22 22
23 23 #endif //__dmpwmtsutils_h__
... ...
注册登录 后发表评论