summaryrefslogtreecommitdiff
path: root/include/llmr/style/bucket_description.hpp
blob: c8933d4190ccad961135ba40d0f8e0f86968fb8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef LLMR_STYLE_BUCKET_DESCRIPTION
#define LLMR_STYLE_BUCKET_DESCRIPTION

#include <string>
#include <vector>

#include "value.hpp"

namespace llmr {

enum class BucketType {
    None = 0,
    Fill = 1,
    Line = 2,
    Point = 3
};

enum class CapType {
    None = 0,
    Round = 1,
};

enum class JoinType {
    None = 0,
    Butt = 1,
    Bevel = 2
};


class BucketDescription {
public:
    BucketType type = BucketType::None;

    // Specify what data to pull into this bucket
    std::string source_name;
    std::string source_layer;
    std::string source_field;
    std::vector<Value> source_value;

    // Specifies how the geometry for this bucket should be created
    CapType cap = CapType::None;
    JoinType join = JoinType::None;
    std::string font;
    float font_size = 0.0f;
};

std::ostream& operator<<(std::ostream&, const BucketDescription& bucket);

}

#endif