<html><head></head><body>Osmand '.obf' file format comes to my mind, not sure if it's related to pbf, but is definitely worth a look at.<br>Maybe also Mapsforge. <br>Yves <br><br><br><div class="gmail_quote">Le 13 février 2022 15:10:22 GMT+01:00, Florian Lohoff <f@zz.de> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">On Sat, Feb 12, 2022 at 11:30:19PM +0100, codesoap--- via dev wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi,<br><br>Nick Stallman wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Adding an index [to PBF files] seems like a logical step which would<br>reduce processing times for many common operations drastically.<br></blockquote><br>I was just thinkgin about the same thing and was wondering if there is<br>any progress on this, now that another 3+ years have passed. I haven't<br>found any other resources on the topic than this E-Mail; has there been<br>some discussion elsewhere, that I didn't find?<br><br>I'm sad to see you only received pushback against your proposal. IMO<br>the benefits of an index would far outweigh the drawback of a few<br>bytes of indexdata for each BlobHeader. I think such an index could<br>lay the foundation for a whole new kind of applications; for example:<br>applications that run on the end-user's hardware, are easy to setup and<br>use, yet performant and with low disk usage. Applications like this are<br>currently just not feasible.<br></blockquote><br>AFAIU the pbf format its not spatially indexed at all. So you have<br>objects based on the osm id sorted in the blobs. <br><br>Basically you not only need an index but rather "resort" the objects<br>from beeing organized by osm_id to beeing organized spatially,<br>and then build and rtree of the bboxes of the protbuf blobs.<br><br>There have been applications in the past which did exactly this, not<br>based on PBF. When we ran tiles@home aka osmarender in the past there<br>had been one API implementation for the "bbox" call which allows reading<br>data in the bounding box. <br><br>Look for "TRAPI" which was a perl implementation of a spatially<br>organized data store for osm data.<br><br><a href="https://wiki.openstreetmap.org/wiki/Trapi">https://wiki.openstreetmap.org/wiki/Trapi</a><br><br>Flo<br><div class="k9mail-signature">-- <br>Florian Lohoff                                                     f@zz.de<br>  Any sufficiently advanced technology is indistinguishable from magic.<br></div></pre></blockquote></div></body></html>