<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Craig,</p>
    <p>What would you be your idea: decode the PBF into JSON ? otherwise
      re-using the existing code of the ESRI JSON driver is going to be
      difficult as it assumes JSON everywhere.<br>
    </p>
    <p>For PBF reading, we have ogr/ogrsf_frmts/gpb.h used both by the
      OSM PBF driver and the MVT driver. This is probably a bit tedious
      to use than code generated by the protobuf compiler, but at least
      this saves an extra dependency.</p>
    <p>I'm a bit skeptical about the ability of a LLM to generate code
      that will insert nicely into GDAL, but let's see...</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 23/07/2025 à 00:04, Craig de Stigter
      via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF1M8pe+y0+bsZ74o1inkH3cggm3px3EN+wee+fH0GW+sv_E6A@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div>Hi folks</div>
          <div><br>
          </div>
          <div>OGR has support for ESRI FeatureService endpoints via the
            <a
href="https://gdal.org/en/stable/drivers/vector/esrijson.html"
              moz-do-not-send="true">ESRI JSON</a> driver.</div>
          <div>I am wondering if there would be interest in adding PBF
            support to that driver, so that we could ingest the more
            efficient PBF versions of those endpoints.</div>
          <div><br>
          </div>
          <div>As far as I can tell, this is *different* and unrelated
            to the OSM PBF format that GDAL already supports.</div>
          <div><br>
          </div>
          <div>Feature servers we have come across that support PBF seem
            to return query results much faster and more reliably in PBF
            rather than JSON.</div>
          <div><br>
          </div>
          <div>We have some Python code internally (not using GDAL) that
            handles the PBF, but it performs poorly due to being
            computation code in Python. I am investigating ways to speed
            it up using other languages. As part of this I may be in a
            position to convert it to C++ and contribute it to GDAL, if
            there is interest. I am no C++ developer but am becoming
            proficient with Claude Code :)</div>
          <div><br>
          </div>
          <div>I would lean towards implementing the PBF support as a
            by-default optimisation on the existing ESRIJSON driver, if
            the server advertises support for PBF - with a config option
            to force use of JSON if necessary. A separate driver would
            be an alternative but seems unnecessary since the PBF
            structure is quite similar to the JSON structure (the main
            difference is that geometries are encoded more efficiently)</div>
          <div><br>
          </div>
          <div>I haven't given much time towards investigating how to do
            this in GDAL, but would appreciate any tips or discussion.</div>
          <br>
          <span class="gmail_signature_prefix">-- </span><br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Regards,</div>
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Craig</div>
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br>
              </div>
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Platform
                Engineer<br>
              </div>
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Koordinates</div>
              <div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><a
                  href="http://koordinates.com/"
                  style="color:rgb(17,85,204)" target="_blank"
                  moz-do-not-send="true">koordinates.com</a> / <a
                  href="https://twitter.com/koordinates"
                  style="color:rgb(17,85,204)" target="_blank"
                  moz-do-not-send="true">@koordinates</a></div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>