@@ -320,6 +320,62 @@ count:long | centroid:geo_point | geohashString:keywo
320
320
2 | POINT (16.706149326637387 32.37822346854955) | sm | POLYGON((11.25 28.125, 22.5 28.125, 22.5 33.75, 11.25 33.75, 11.25 28.125))
321
321
;
322
322
323
+ gridGeohashDocsFromCell
324
+ required_capability: spatial_grid_intersects
325
+
326
+ FROM airports
327
+ | WHERE ST_INTERSECTS(location, TO_GEOHASH("u1"))
328
+ | STATS
329
+ count = COUNT(*),
330
+ centroid = ST_CENTROID_AGG(location)
331
+ ;
332
+
333
+ count:long | centroid:geo_point
334
+ 8 | POINT (6.351574736181647 51.8981519783847)
335
+ ;
336
+
337
+ gridIntersectsDisjointGeohash
338
+ required_capability: spatial_grid_intersects
339
+
340
+ FROM airports
341
+ | EVAL intersects = ST_INTERSECTS(location, "u1"::geohash)
342
+ | EVAL disjoint = ST_DISJOINT(location, "u1"::geohash)
343
+ | STATS count = COUNT(*) BY intersects, disjoint
344
+ | SORT count ASC
345
+ ;
346
+
347
+ count:long | intersects:boolean | disjoint:boolean
348
+ 8 | true | false
349
+ 883 | false | true
350
+ ;
351
+
352
+ gridGeohashLiteralFromCell
353
+ required_capability: spatial_grid_intersects
354
+
355
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (6.351574736181647 51.8981519783847)", "POINT (5.268637698941997 42.747250193330856)"]
356
+ | EVAL location = TO_GEOPOINT(location)
357
+ | MV_EXPAND location
358
+ | WHERE ST_INTERSECTS(location, "u1"::geohash)
359
+ ;
360
+
361
+ location:geo_point
362
+ POINT (6.351574736181647 51.8981519783847)
363
+ ;
364
+
365
+ gridGeohashLiteralFromCellDisjoint
366
+ required_capability: spatial_grid_intersects
367
+
368
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (6.351574736181647 51.8981519783847)", "POINT (5.268637698941997 42.747250193330856)"]
369
+ | EVAL location = location::geo_point
370
+ | MV_EXPAND location
371
+ | WHERE ST_DISJOINT(location, "u1"::geohash)
372
+ ;
373
+
374
+ location:geo_point
375
+ POINT (6.360728044651057 47.94084087577894)
376
+ POINT (5.268637698941997 42.747250193330856)
377
+ ;
378
+
323
379
gridGeohashStatsByWhereUK
324
380
required_capability: spatial_grid_types
325
381
@@ -688,6 +744,62 @@ count:long | centroid:geo_point | geotileString:keywor
688
744
79 | POINT (24.516750878736943 23.93036561181085) | 3/4/3 | POLYGON((0.0 0.0, 45.0 0.0, 45.0 40.979898069620134, 0.0 40.979898069620134, 0.0 0.0))
689
745
;
690
746
747
+ gridGeotileDocsFromCell
748
+ required_capability: spatial_grid_intersects
749
+
750
+ FROM airports
751
+ | WHERE ST_INTERSECTS(location, TO_GEOTILE("3/4/3"))
752
+ | STATS
753
+ count = COUNT(*),
754
+ centroid = ST_CENTROID_AGG(location)
755
+ ;
756
+
757
+ count:long | centroid:geo_point
758
+ 79 | POINT (24.516750878736943 23.93036561181085)
759
+ ;
760
+
761
+ gridIntersectsDisjointGeotile
762
+ required_capability: spatial_grid_intersects
763
+
764
+ FROM airports
765
+ | EVAL intersects = ST_INTERSECTS(location, "3/4/3"::geotile)
766
+ | EVAL disjoint = ST_DISJOINT(location, "3/4/3"::geotile)
767
+ | STATS count = COUNT(*) BY intersects, disjoint
768
+ | SORT count ASC
769
+ ;
770
+
771
+ count:long | intersects:boolean | disjoint:boolean
772
+ 79 | true | false
773
+ 812 | false | true
774
+ ;
775
+
776
+ gridGeotileLiteralFromCell
777
+ required_capability: spatial_grid_intersects
778
+
779
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (24.516750878736943 23.93036561181085)", "POINT (5.268637698941997 42.747250193330856)"]
780
+ | EVAL location = TO_GEOPOINT(location)
781
+ | MV_EXPAND location
782
+ | WHERE ST_INTERSECTS(location, "3/4/3"::geotile)
783
+ ;
784
+
785
+ location:geo_point
786
+ POINT (24.516750878736943 23.93036561181085)
787
+ ;
788
+
789
+ gridGeotileLiteralFromCellDisjoint
790
+ required_capability: spatial_grid_intersects
791
+
792
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (24.516750878736943 23.93036561181085)", "POINT (5.268637698941997 42.747250193330856)"]
793
+ | EVAL location = location::geo_point
794
+ | MV_EXPAND location
795
+ | WHERE ST_DISJOINT(location, "3/4/3"::geotile)
796
+ ;
797
+
798
+ location:geo_point
799
+ POINT (6.360728044651057 47.94084087577894)
800
+ POINT (5.268637698941997 42.747250193330856)
801
+ ;
802
+
691
803
gridGeotileStatsByWhereUK
692
804
required_capability: spatial_grid_types
693
805
@@ -1123,6 +1235,62 @@ POINT (13.1442589810713 32.6691695504993) | 813fbffffffffff | 813fbffffffffff
1123
1235
POINT (118.12696884672 24.537192570557) | 8141bffffffffff | null | POLYGON ((121.34751445935747 26.200276060455465, 120.50339385995798 29.892985338693542, 116.26130043917948 31.68090796798786, 112.74092235558841 29.367231998154967, 113.70376749169584 25.199133186716526, 117.99047716641066 23.5089519597363, 119.64146543031175 24.728661050965922, 121.34751445935747 26.200276060455465))
1124
1236
;
1125
1237
1238
+ gridGeohexDocsFromCell
1239
+ required_capability: spatial_grid_intersects
1240
+
1241
+ FROM airports
1242
+ | WHERE ST_INTERSECTS(location, TO_GEOHEX("81397ffffffffff"))
1243
+ | STATS
1244
+ count = COUNT(*),
1245
+ centroid = ST_CENTROID_AGG(location)
1246
+ ;
1247
+
1248
+ count:long | centroid:geo_point
1249
+ 7 | POINT (2.475211258445467 41.32352174592337)
1250
+ ;
1251
+
1252
+ gridIntersectsDisjointGeohex
1253
+ required_capability: spatial_grid_intersects
1254
+
1255
+ FROM airports
1256
+ | EVAL intersects = ST_INTERSECTS(location, "81397ffffffffff"::geohex)
1257
+ | EVAL disjoint = ST_DISJOINT(location, "81397ffffffffff"::geohex)
1258
+ | STATS count = COUNT(*) BY intersects, disjoint
1259
+ | SORT count ASC
1260
+ ;
1261
+
1262
+ count:long | intersects:boolean | disjoint:boolean
1263
+ 7 | true | false
1264
+ 884 | false | true
1265
+ ;
1266
+
1267
+ gridGeohexLiteralFromCell
1268
+ required_capability: spatial_grid_intersects
1269
+
1270
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (2.475211258445467 41.32352174592337)", "POINT (5.268637698941997 42.747250193330856)"]
1271
+ | EVAL location = TO_GEOPOINT(location)
1272
+ | MV_EXPAND location
1273
+ | WHERE ST_INTERSECTS(location, "81397ffffffffff"::geohex)
1274
+ ;
1275
+
1276
+ location:geo_point
1277
+ POINT (2.475211258445467 41.32352174592337)
1278
+ POINT (5.268637698941997 42.747250193330856)
1279
+ ;
1280
+
1281
+ gridGeohexLiteralFromCellDisjoint
1282
+ required_capability: spatial_grid_intersects
1283
+
1284
+ ROW location = ["POINT (6.360728044651057 47.94084087577894)", "POINT (2.475211258445467 41.32352174592337)", "POINT (5.268637698941997 42.747250193330856)"]
1285
+ | EVAL location = TO_GEOPOINT(location)
1286
+ | MV_EXPAND location
1287
+ | WHERE ST_DISJOINT(location, "81397ffffffffff"::geohex)
1288
+ ;
1289
+
1290
+ location:geo_point
1291
+ POINT (6.360728044651057 47.94084087577894)
1292
+ ;
1293
+
1126
1294
gridGeohexStatsByWhereUK
1127
1295
required_capability: spatial_grid_types
1128
1296
0 commit comments