-
Notifications
You must be signed in to change notification settings - Fork 63
On disk file format
This is a wiki page to draft the new GeoCouch on disk file format
The K/V and K/P nodes have the same format as the B-trees have (see https://github.com/couchbaselabs/couchstore/wiki/Format for more)
The keys in this R-tree are raw blobs with whatever comes from Erlang. It is a list with keys, one for every dimension.
The values are
12 bits -- Size of the document ID 28 bits -- Size of the document data 28 bits -- Size of the geometry 47 bits -- Position of the document content on disk 47 bits -- Position of the geometry content on disk Document ID
The content type will always be JSON, as we emitted JSON from the emit() function.
The reduce value in this R-tree will be the bitmask for the superstar index and the value of the reduce function.
It still needs to be decided which format the geometry will have. As calculations need to be made, perhaps Well-Known Binary (see Section 3.3 of the official standard or in more readable HTML) would make sense, which is supported by every major geo library.