Square/Hexbin aggregation
See original GitHub issueContext
For squares/hexbins aggregation, Builder takes a bin size based on the zoom level at the moment of the map creation. After that, the bin size remains static regardless of the zoom level.
The current query to create those maps is:
SELECT
CDB_HexagonGrid (
ST_Expand(
!bbox!,
CDB_XYZ_Resolution(ZOOM_LEVEL) * 12),
CDB_XYZ_Resolution(ZOOM_LEVEL) * 12)
AS cell
while in the Editor it was:
SELECT
CDB_HexagonGrid(
ST_Expand(
!bbox!,
greatest(!pixel_width!,!pixel_height!) * 24),
greatest(!pixel_width!,!pixel_height!) * 24)
AS cell
Steps to Reproduce
- Create a map with a point’s dataset
- Select squares or hexbins aggregation and set a size
- Zoom in/out
Current Result
The map is instantiated with a fixed bin size based on the initial zoom level, so the grid doesn’t change at different zoom levels
Expected result
Bins should resize on each zoom level according with the pixel size value used as a parameter.
Additional info
If we decide to have a fixed bin size, we should use a different unit than pixels for setting it, like meters.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Geohex grid aggregation | Elasticsearch Guide [8.5] | Elastic
A multi-bucket aggregation that groups geo_point values into buckets that represent a grid. The resulting grid can be sparse and only contains cells...
Read more >Aggregation Functions - Apache Pinot Docs
Function Description Exam...
COUNT Returns the count of the records as Long COUN...
DISTINCTCOUNTTHETASKETCH See Cardinality Estimation
DISTINCTCOUNTRAWTHETASKETCH See Cardinality Estimation
Read more >GeoHex grid aggregations - OpenSearch documentation
GeoHex grid aggregations. The Hexagonal Hierarchical Geospatial Indexing System (H3) partitions the Earth's areas into identifiable hexagon-shaped cells.
Read more >The wild power of aggregation theory - YouTube
How did Google, Amazon, and Facebook get so big so fast? The best answer we have is an idea called Aggregation Theory. This...
Read more >Aggregation with Feature Detection - Xiaojuan Qi
Aggregating features from different depths of a network ... which actually makes the feature aggregation happen in all these networks.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I find the present implementation inconsistent in that users define the grid size in pixels (screen units) but the grid is actually set in geographic units (onscreen size changes with zoom, size is earth-relative actually as @ernesmb notes).
But I think there might be use cases for both the current behaviour and the previoius one. What I’d like to see is an option in the UI to choose the grid size units:
Just my 2c.
Let’s close this issue.