Refactor parts of the server
This commit is contained in:
parent
ccb7c8fbd7
commit
47de4e563f
6 changed files with 369 additions and 90 deletions
|
|
@ -1,20 +1,28 @@
|
|||
pub const FEATURE_PERCENTILE_LOW: f64 = 2.0;
|
||||
|
||||
pub const FEATURE_PERCENTILE_HIGH: f64 = 98.0;
|
||||
|
||||
pub const HISTOGRAM_BINS: usize = 100;
|
||||
|
||||
pub const H3_PRECOMPUTE_MIN: u8 = 4;
|
||||
pub const H3_PRECOMPUTE_MAX: u8 = 12;
|
||||
|
||||
pub const EXCLUDED_COLUMNS: &[&str] = &["lat", "lon"];
|
||||
pub const SERVER_ADDRESS: &str = "0.0.0.0:8001";
|
||||
|
||||
pub const EXCLUDED_STRING_COLUMNS: &[&str] = &[
|
||||
"pp_address",
|
||||
"postcode",
|
||||
"Address per Property Register",
|
||||
"Address per EPC",
|
||||
"Postcode",
|
||||
pub const BOUNDS_QUANTIZATION: f64 = 0.01;
|
||||
pub const BOUNDS_BUFFER_PERCENT: f64 = 0.1;
|
||||
pub const POSTCODE_MIN_RESOLUTION: u8 = 11;
|
||||
pub const MAX_POIS_PER_REQUEST: usize = 5000;
|
||||
pub const DEFAULT_PROPERTIES_LIMIT: usize = 100;
|
||||
pub const MAX_PROPERTIES_LIMIT: usize = 500;
|
||||
pub const ENUM_NULL: u8 = 255;
|
||||
|
||||
/// Canonical display order for POI category groups.
|
||||
/// The server will panic at startup if the data contains groups not in this list or vice versa.
|
||||
pub const POI_GROUP_ORDER: &[&str] = &[
|
||||
"Public Transport",
|
||||
"Amenity",
|
||||
"Building",
|
||||
"Craft",
|
||||
"Healthcare",
|
||||
"Leisure",
|
||||
"Office",
|
||||
"Shop",
|
||||
"Tourism",
|
||||
];
|
||||
|
||||
pub const MAX_ENUM_CARDINALITY: usize = 50;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue