← Back to context

Comment by rockinghigh

18 days ago

How do you join two datasets using r-trees? In a business setting, having a static and constant projection is critical. As long as you agree on zoom level, joining two datasets with S2 and H3 is really easy.

Spatial indices simply partition your data in N-dimensional space the same way a binary tree does it in 1-dimensional space.

The whole advantage over a static partition is that it will allow you to properly deal with data that is irregularly distributed.

Those data structures can definitely be merged if that's what you're asking.

  • This data is indeed not irregularly distributed, in fact the fun thing about geospatial data is that you always know the maximum extent of it.

    About your binary tree comment: yes this is absolutely valid, but consider then that binary trees also are a bad fit for distributed computing, where data is often partitioned at the top level (making it no longer a binary tree but a set of binary trees) and cross-node joins are expensive.