Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9210079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:59:15+00:00 2026-06-18T00:59:15+00:00

I want to do a bounding box query a Trie of geohashed strings where

  • 0

I want to do a bounding box query a Trie of geohashed strings where the points lie all around the center of the space. I can’t seem to find a good way to query the trie when the points straddle the center point.

Say you have 4 bits per coordinate (8 total) of information on a 16×16 space where each box is 1×1. Essentially, a 16×16 grid.

The red line shows the most corse division of the quad tree which is used in the geohash.

Example image

Trie representing the graphic above.

bits=4, min=0, max=16, numBuckets=16.0, scaling=1.0, tree={
└── null
    ├── 0
    │   ├── (0110100) 00110100 = {(6, 6), hash=00110100}
    │   └── (1100000) 01100000 = {(6, 8), hash=01100000}
    └── 1
        ├── (0010101) 10010101 = {(8, 7), hash=10010101}
        └── (1000010) 11000010 = {(9, 8), hash=11000010}

A bounding box query is defined as a upper-left point and a length, width.
e.g. (6,6 4×4) Should return 6,6 6,8 8,7 and 9,8.

One approach I thought of is: Start from the most precise box containing the upper-left coordinate and keep getting less precise until I can cover the 4×4 square. But if I do that I end up querying the whole tree in this example. I just don’t see a “better” way to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:59:16+00:00Added an answer on June 18, 2026 at 12:59 am

    If you can add extra information to the nodes of your trie structure I would ignore the GeoHash encoding and treat it as an arbitrary tree structure. Working from the leaves up you can compute a bounding box round each node that just encloses all the points beneath that node. Then when you search from the top down for a point (or area) you can stop searching at a node when its bounding box does not enclose (or intersect) your query point (or area).

    If you can afford to keep this updated, then you will gain when your search point or area is not inside (or does not intersect) a bounding box that encloses all the points that are actually below some node, even if the search point or area could overlap some point could in theory GeoHash to that area.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a latitude and longitude, and distance, I want to find a bounding box
I have three problems: I want to create resizable shapes with box bounding... I
I want to search a map within a bounding box whose lat/lng for North
I've got a bounding box, and I want to adjust it so it's not
I'm trying to create a bounding box around a set of coordinates, but I
I'm trying to get all events in a geo bounding box (that approximately covers
I want to get the bounding box of a filled black circle on a
I want to calculate the minimum distance between a point and a bounding box
I am trying to get the bounding box for all the bodies in a
want to have a Hyperlink-Button in a gridView in which I can display a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.