<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Robin,</p>
    <p>this was an oversight of the implementation of gdal vector
      concat. Fixed per <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/12856">https://github.com/OSGeo/gdal/pull/12856</a></p>
    <p>Apart from using ogrmerge, a workaround is to increate the limit
      of open files with "ulimit -n some_number"</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 04/08/2025 à 13:19, Robin Wilson via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:etPan.68909730.264f62fe.23f5@rtwilson.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <style>body{font-family:Helvetica,Arial;font-size:13px}</style>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">Hi,</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">I’ve
        just started experimenting with the new gdal command line tools.</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">I’ve
        tried the following command to merge a few thousand GeoJSON
        files into one GeoPackage:</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">gdal
        vector concat --mode=single gb-postcodes-v5/units/*.geojson
        all_unit_postcodes.gpkg</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">I get
        thousands of errors like:</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">ERROR 4:
        gb-postcodes-v5/units/KY4.geojson: Too many open files</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">Switching
        back to ogrmerge, I find that this command works fine:</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">ogrmerge
        -single -progress -o all_unit_postcodes_v2.gpkg
        gb-postcodes-v5/units/*.geojson</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div style="font-family:Helvetica,Arial;font-size:13px; ">Has
        there been a change which means that gdal vector concat tries to
        open all the files in parallel, and then runs out of spare file
        handles? Is there any way around this for the new gdal vector
        concat command?</div>
      <div style="font-family:Helvetica,Arial;font-size:13px; "><br>
      </div>
      <div class="gmail_signature">
        <div class="gmail_signature">Best regards,</div>
        <div class="gmail_signature"><br>
        </div>
        <div class="gmail_signature">Robin</div>
        <div class="gmail_signature"><br>
        </div>
        <div class="gmail_signature">Dr Robin Wilson</div>
        <div class="gmail_signature"><a class="moz-txt-link-abbreviated" href="http://www.rtwilson.com">www.rtwilson.com</a></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>