-
-
Notifications
You must be signed in to change notification settings - Fork 477
Expand file tree
/
Copy pathexpire-config.hpp
More file actions
48 lines (39 loc) · 1.23 KB
/
expire-config.hpp
File metadata and controls
48 lines (39 loc) · 1.23 KB
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
#ifndef OSM2PGSQL_EXPIRE_CONFIG_HPP
#define OSM2PGSQL_EXPIRE_CONFIG_HPP
/**
* SPDX-License-Identifier: GPL-2.0-or-later
*
* This file is part of osm2pgsql (https://osm2pgsql.org/).
*
* Copyright (C) 2006-2026 by the osm2pgsql developer community.
* For a full list of authors see the git log.
*/
#include <cstdint>
#include <cstdlib>
enum class expire_mode : uint8_t
{
full_area, // Expire all tiles covered by polygon.
boundary_only, // Expire only tiles covered by polygon boundary.
hybrid // "full_area" or "boundary_only" mode depending on full_area_limit.
};
/**
* These are the options used for tile expiry calculations.
*/
struct expire_config_t
{
/**
* The id of the expire output to which expired tiles are written.
* Only used in the flex output.
*/
std::size_t expire_output = 0;
/// Buffer around expired feature as fraction of the tile size.
double buffer = 0.1;
/**
* Maximum width/heigth of bbox of a (multi)polygon before hybrid mode
* expiry switches from full-area to boundary-only expire.
*/
double full_area_limit = 0.0;
/// Expire mode.
expire_mode mode = expire_mode::full_area;
}; // struct expire_config_t
#endif // OSM2PGSQL_EXPIRE_CONFIG_HPP