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
// A separator used to break the code into two parts to aid memorability.
pub const SEPARATOR: char = '+';
// The number of characters to place before the separator.
pub const SEPARATOR_POSITION: usize = 8;
// The character used to pad codes.
pub const PADDING_CHAR: char = '0';
pub const PADDING_CHAR_STR: &'static str = "0";
// The character set used to encode the values.
pub const CODE_ALPHABET: = ;
// The base to use to convert numbers to/from.
pub const ENCODING_BASE: f64 = 20f64;
// The maximum value for latitude in degrees.
pub const LATITUDE_MAX: f64 = 90f64;
// The maximum value for longitude in degrees.
pub const LONGITUDE_MAX: f64 = 180f64;
// Maximum code length using lat/lng pair encoding. The area of such a
// code is approximately 13x13 meters (at the equator), and should be suitable
// for identifying buildings. This excludes prefix and separator characters.
pub const PAIR_CODE_LENGTH: usize = 10;
// The resolution values in degrees for each position in the lat/lng pair
// encoding. These give the place value of each position, and therefore the
// dimensions of the resulting area.
pub const PAIR_RESOLUTIONS: = ;
// Number of columns in the grid refinement method.
pub const GRID_COLUMNS: f64 = 4f64;
// Number of rows in the grid refinement method.
pub const GRID_ROWS: f64 = 5f64;
// Minimum length of a code that can be shortened.
pub const MIN_TRIMMABLE_CODE_LEN: usize = 6;