MongoDB 1.3.3 (just released) has basic support for geospatial indexes
mongodb.org
mongodb.org
10gen has delivered, time and again. They're looking at ways to be smarter about replication, and I am confident that by the time I need that level of durability, they will have brought the product up to where I need it to be.
The additional productivity I feel I get from MongoDB is, of course, balanced by the knowledge that I am working on a platform that is a bit of a moving target. It's been a wild eight or nine months in some ways, but I've been thrilled with both the product and the relentless drive from 10gen to improve an already kick-ass tool.
From reading the documentation, this seems like a standard R-tree implementation, which is just a way to efficiently index two columns at once. If your dataset is two columns, x and y, a normal index could limit the xs efficiently, or limit the ys efficiently, but it couldn't limit both at the same time. This means you'd always have to do a scan over a large number of irrelevant records. The R-tree lets you get at the pair efficiently; you can get 2,2 without having to also look at 2,0; 2,1; 2,3; 2,... This is the performance benefit; if you want to know about all the coffee shops near 2,2, you can just retrieve 2,2 and not have to look at the rest of the dataset. If you need to implement wrapping, you can just retrieve the squares on the other side of the jump when someone requests records near the jump. This probably behaves differently for "things on earth" than on arbitrary two-dimensional datasets, so it is left as an exercise for the reader.
I assume. I have never had the occasion to implement (or even use) spatial indexes.
Seems to me graphics people have been doing this sort of thing for years. A similar, but more complicated problem: painting the texture on a 3D model (literally onto the rendered model), even across seams. That's general-cased, wrapping on a sphere is a rather trivial special case by comparison.
Granted, I haven't made any GIS systems, and the underlying structure may make it more difficult than this. But this is definitely a solved problem, are they just reluctant to modify their system?
Personally, I'd just find the points that edges intersect the antemeridian, and define two polygons, ORing the results. Know if there's a reason that isn't done?