The lazy way is to hash coordinates to tiles, and then index on the tile identifier. To query a bounding box, calculate the tiles that would cover the bounding box, and then query for those tiles.
Ask HN: Storing spatial data in SQL
11–12 of 12 posts
Re: Ask HN: Storing spatial data in SQL
#12[deleted]