Cogs.Core
Extensions
TerrainProvider
Source
WMSRasterSource.h
1
#pragma once
2
#include "HTTPRasterSource.h"
3
4
namespace
Cogs::Core::TerrainProvider {
5
6
enum struct
WMSValueDataType
7
{
8
Short,
9
UnsignedSHort,
10
Float,
11
Double
12
};
13
14
enum struct
WMSVersion
15
{
16
Unknown,
17
v1_0_0,
18
v1_1_0,
19
v1_1_1,
20
v1_3_0
21
};
22
23
struct
WMSLayerDescription
24
{
25
StringRef
name = NoString;
// Required
26
StringRef
style = Strings::add(
"default"
);
27
unsigned
minLevel = 0;
28
unsigned
maxLevel = ~0u;
29
std::vector<std::pair<StringRef, StringRef>> otherArguments;
30
};
31
32
struct
WMSConfig
:
HTTPConfig
33
{
34
virtual
~WMSConfig
() {}
35
36
std::vector<WMSLayerDescription> layerDescriptions;
37
std::vector<std::pair<StringRef, StringRef>> otherArguments;
38
39
WMSVersion version = WMSVersion::v1_1_0;
40
WMSValueDataType dataType = WMSValueDataType::Short;
41
bool
serverIsLittleEndian =
true
;
42
bool
retryFailedRequests =
true
;
43
};
44
45
class
WMSRasterSource
:
public
HTTPRasterSource
46
{
47
public
:
48
WMSRasterSource
(
Context
* context);
49
~WMSRasterSource
();
50
51
bool
init(
const
WMSConfig
& conf, std::unique_ptr<ICache>&& icache);
52
void
getConfig(
WMSConfig
& conf)
const
;
53
54
protected
:
55
std::vector<WMSLayerDescription> layerDescriptions;
56
std::vector<std::pair<StringRef, StringRef>> otherArguments;
57
WMSVersion version = WMSVersion::v1_1_0;
58
WMSValueDataType dataType = WMSValueDataType::Short;
59
bool
serverIsLittleEndian =
true
;
60
bool
retryFailedRequests =
true
;
61
62
bool
createFetchTileUrl(std::string& url,
TileId
id
)
final
;
63
};
64
65
}
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::TerrainProvider::HTTPRasterSource
Definition:
HTTPRasterSource.h:18
Cogs::Core::TerrainProvider::WMSRasterSource
Definition:
WMSRasterSource.h:46
Cogs::Core::StringRef
Definition:
Strings.h:8
Cogs::Core::TerrainProvider::HTTPConfig
Definition:
HTTPRasterSource.h:10
Cogs::Core::TerrainProvider::TileId
Definition:
BaseRasterSource.h:63
Cogs::Core::TerrainProvider::WMSConfig
Definition:
WMSRasterSource.h:33
Cogs::Core::TerrainProvider::WMSLayerDescription
Definition:
WMSRasterSource.h:24
Generated by
1.9.6