On Jun 16, 2010, at 5:01 PM, Nitro wrote: > Hello, > > I'd like to create a custom storage manager for rtree 0.6.0 on Windows which > saves the page data in a database (ZODB). > > What's the best way to go about this? If possible I'd like to create the > storage manager in python, but I don't see a way to do this at the moment.'
The only way to do this is to use C++ in libspatialindex and create a storage manager that talks ZODB. You could use the FileStorageManager as a crib sheet, but to tell the truth, it's going to be a giant challenge. I think you'll need to know the c/c++ internals of both ZODB and libspatialindex to do this. Once you have your custom storage implemented, you'll need to add a bit of code to the C API to make it aware of the new storage type, and then you'll need to update the ctypes bindings to take advantage of it. I know a bit about libspatialindex's storage managers, and I don't know squat about ZODB internals. I would estimate a boatload of time and money to do this, as there are many unknown unknowns, in rumsfeldian parlance. If you're serious about it, I would bone up on ZODB or hunt down a ZODB jock and get them up to speed on libspatialindex. It's going to be easier to find help that way than learning up a spatialindexing guy on ZODB. What does storing index pointers and pages in ZODB get you that the file storage mechanism by itself doesn't, and is it really worth that cost? My naive view is that it only gets you single file storage, but with bulk loading now available through Python, I think you can treat the index file(s) as throw away for the most part (easily recreateable without too much cost). Another giant dragon is libspatialindex still has a few thread safety issues, and if threading is an issue in ZODB, you're going to run into them. In short, do you *really* want this? ;) Howard _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
