-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notes.txt
53 lines (48 loc) · 1.04 KB
/
Notes.txt
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
https://gis.stackexchange.com/questions/59087/how-to-calculate-the-size-a-bounding-box
https://tools.ietf.org/html/rfc7946#section-3.3
/**
* Lng = X
* Lat = Y
*
* X1,Y2 X2,Y2
* |-----------|
* | |
* | |
* |-----------|
* X1,Y1 X2,Y1
*
* -77.480264,38.848498,-77.453227,38.866812
*
* MIN_LNG = -77.480264
* MIN_LAT = 38.848498
*
* MAX_LNG = -77.453227
* MAX_LAT = 38.866812
*/
const
bbox = '-77.480264,38.848498,-77.453227,38.866812',
bboxMap = {
topLeft: {
lng: -77.480264,
lat: 38.866812
},
topRight: {
lng: -77.453227,
lat: 38.866812
},
bottomLeft: {
lng: -77.480264,
lat: 38.848498
},
bottomRight: {
lng: -77.453227,
lat: 38.848498
}
};
// const x = new BBox( bbox );
// console.log( x.area() );
// console.log( Geohash.sizeOf( 'dqcjpxetzh6q' ) );
// console.log( Geohash.decodeBBox( 'dqcjpxetzh6q' ) );
// console.log( Geohash.decodeBBox( 'dqbvj3' ) );
// console.log( Geohash.decodeBBox( 'dqbvj3' ) );
// console.log( Geohash.geohashWithin( x ) );