|
2 | 2 | # Tests for geo_grid function: ST_GEOHASH |
3 | 3 | ############################################### |
4 | 4 |
|
| 5 | +geohashStringToLong |
| 6 | +required_capability: spatial_grid |
| 7 | + |
| 8 | +ROW geohash = "u3bu" |
| 9 | +| EVAL geohashLong = ST_GEOHASH_TO_LONG(geohash) |
| 10 | +; |
| 11 | + |
| 12 | +geohash:keyword | geohashLong:long |
| 13 | +u3bu | 13686180 |
| 14 | +; |
| 15 | + |
| 16 | +geohashLongToString |
| 17 | +required_capability: spatial_grid |
| 18 | + |
| 19 | +ROW geohash = TO_LONG(13686180) |
| 20 | +| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash) |
| 21 | +; |
| 22 | + |
| 23 | +geohash:long | geohashString:keyword |
| 24 | +13686180 | u3bu |
| 25 | +; |
| 26 | + |
| 27 | +geohashStringToGeoShape |
| 28 | +required_capability: spatial_grid |
| 29 | + |
| 30 | +ROW geohash = "u3bu" |
| 31 | +| EVAL boundary = ST_GEOHASH_TO_GEOSHAPE(geohash) |
| 32 | +; |
| 33 | + |
| 34 | +geohash:keyword | boundary:geo_shape |
| 35 | +u3bu | BBOX (12.3046875, 12.65625, 55.72265625, 55.546875) |
| 36 | +; |
| 37 | + |
| 38 | +geohashLongToGeoShape |
| 39 | +required_capability: spatial_grid |
| 40 | + |
| 41 | +ROW geohash = TO_LONG(13686180) |
| 42 | +| EVAL boundary = ST_GEOHASH_TO_GEOSHAPE(geohash) |
| 43 | +; |
| 44 | + |
| 45 | +geohash:long | boundary:geo_shape |
| 46 | +13686180 | BBOX (12.3046875, 12.65625, 55.72265625, 55.546875) |
| 47 | +; |
| 48 | + |
5 | 49 | geohashLiteral |
6 | 50 | required_capability: spatial_grid |
7 | 51 |
|
@@ -190,6 +234,19 @@ count:long | centroid:geo_point |
190 | 234 | # Tests for geo_grid function: ST_GEOTILE |
191 | 235 | ############################################### |
192 | 236 |
|
| 237 | +geotileStringToLong |
| 238 | +required_capability: spatial_grid |
| 239 | + |
| 240 | +ROW geotile = "4/8/5" |
| 241 | +| EVAL geotileLong = ST_GEOTILE_TO_LONG(geotile) |
| 242 | +| EVAL geotileString = ST_GEOTILE_TO_STRING(geotileLong) |
| 243 | +| EVAL boundary = ST_GEOTILE_TO_GEOSHAPE(geotile) |
| 244 | +; |
| 245 | + |
| 246 | +geotile:keyword | geotileLong:long | geotileString:keyword | boundary:geo_shape |
| 247 | +4/8/5 | 1152921508901814277 | 4/8/5 | BBOX (0.0, 22.5, 55.77657301866769, 40.979898069620134) |
| 248 | +; |
| 249 | + |
193 | 250 | geotileLiteral |
194 | 251 | required_capability: spatial_grid |
195 | 252 |
|
@@ -361,6 +418,19 @@ count:long | centroid:geo_point |
361 | 418 | # Tests for geo_grid function: ST_GEOHEX |
362 | 419 | ############################################### |
363 | 420 |
|
| 421 | +geohexStringToLong |
| 422 | +required_capability: spatial_grid |
| 423 | + |
| 424 | +ROW geohex = "841f059ffffffff" |
| 425 | +| EVAL geohexLong = ST_GEOHEX_TO_LONG(geohex) |
| 426 | +| EVAL geohexString = ST_GEOHEX_TO_STRING(geohexLong) |
| 427 | +| EVAL boundary = ST_GEOHEX_TO_GEOSHAPE(geohex) |
| 428 | +; |
| 429 | + |
| 430 | +geohex:keyword | geohexLong:long | geohexString:keyword | boundary:geo_shape |
| 431 | +841f059ffffffff | 595020895127339007 | 841f059ffffffff | POLYGON ((12.353546327258265 55.80335405461356, 12.2434612967008 55.60502874054935, 12.51733872608954 55.470800201545316, 12.901880149865134 55.53443156197633, 13.014270156228921 55.73262985778208, 12.739822958959069 55.8673267391136, 12.353546327258265 55.80335405461356)) |
| 432 | +; |
| 433 | + |
364 | 434 | geohexLiteral |
365 | 435 | required_capability: spatial_grid |
366 | 436 |
|
|
0 commit comments