summaryrefslogtreecommitdiff
path: root/include/llmr/style/bucket_description.hpp
blob: fb72b7bb5ae738ab4030d72ca451f8bb8ca73628 (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
52
53
54
55
56
#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,
    Butt = 2,
    Square = 3
};

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


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;
    float miter_limit = 2.0f;
    float round_limit = 1.0f;
};

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

}

#endif