[OSM-dev] Storing way/relation start offset in PBF file
jochen at remote.org
Tue Nov 30 20:26:06 GMT 2010
Sometimes it is useful to read ways before nodes or relations before way or
nodes. With the XML format this is not really possible, but with the PBF
format it could be reasonably easy if we store the offsets in the file where
the way and relations start, respectively.
If we write the offsets at the end of the file, we can still do streaming
write. When reading from a stream you have to read everything anyway, when
reading from a file, you can seek to the end and find out about the offsets
and then seek there and start reading the data.
Is this something we can fit in the existing extension mechanism? If not, its
not a big deal, but we can note it down as possible extension in case we'll do
a new version of the format someday.
Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298
More information about the dev