| 1 |
Execution example:: |
| 2 |
|
| 3 |
table_create --name GeoSite --flags TABLE_HASH_KEY --key_type ShortText |
| 4 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 5 |
column_create --table GeoSite --name location --type WGS84GeoPoint |
| 6 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 7 |
table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint |
| 8 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 9 |
column_create --table GeoIndex --name index_point --type GeoSite --flags COLUMN_INDEX --source location |
| 10 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 11 |
load --table GeoSite |
| 12 |
[ |
| 13 |
{"_key":"http://example.org/","location":"128452975x503157902"}, |
| 14 |
{"_key":"http://example.net/","location":"128487316x502920929"} |
| 15 |
] |
| 16 |
# [[0,1337566253.89858,0.000355720520019531],2] |
| 17 |
select --table GeoSite --filter 'geo_in_circle(location, "128515259x503187188", 5000)' --output_columns _key,location |
| 18 |
# [ |
| 19 |
# [ |
| 20 |
# 0, |
| 21 |
# 1337566253.89858, |
| 22 |
# 0.000355720520019531 |
| 23 |
# ], |
| 24 |
# [ |
| 25 |
# [ |
| 26 |
# [ |
| 27 |
# 1 |
| 28 |
# ], |
| 29 |
# [ |
| 30 |
# [ |
| 31 |
# "_key", |
| 32 |
# "ShortText" |
| 33 |
# ], |
| 34 |
# [ |
| 35 |
# "location", |
| 36 |
# "WGS84GeoPoint" |
| 37 |
# ] |
| 38 |
# ], |
| 39 |
# [ |
| 40 |
# "http://example.org/", |
| 41 |
# "128452975x503157902" |
| 42 |
# ] |
| 43 |
# ] |
| 44 |
# ] |
| 45 |
# ] |