<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>(resending to list)<br>
    </p>
    <p>The CSV driver is actually not that simple to follow since it has
      tricks to support updates through the OGREditableLayer mechanism.
      The GMT one (ogr/ogrsf_frmts/gmt) might be a better start for a
      creation & append only driver. But basically, the only common
      thing with your own code will be the fact that you have to
      implement the 2 virtual methods of interest:
      OGRLayer::CreateField() ,d OGRLayer::ICreateFeature() and declare
      a few capabilities in OGRLayer::TestCapability()</p>
    <p>Unless you want to implement update capabilities (if the format
      allows it, which is generally not the case for a text based
      format), it might be simpler to have 2 distinct OGRLayer
      sub-classes for read-only and write-only operations.<br>
    </p>
    Even
    <p></p>
    <div class="moz-cite-prefix">Le 05/07/2023 à 13:21, Laurențiu Nicola
      via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:3317f566-5dd8-4529-84fb-1bdafa876cda@betaapp.fastmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <style type="text/css">#qt p.qt-MsoNormal{margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt;font-size:11pt;font-family:"Calibri", sans-serif;}#qt a:link{color:rgb(5, 99, 193);text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}#qt a:visited{color:rgb(149, 79, 114);text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
      <div style="font-family:Arial;">Hi,<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">I think your best bet would be to
        take inspiration from an existing driver, like the CSV one
        (which shouldn't be too different from the hypothetical SPF
        driver in the docs).<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div style="font-family:Arial;">Laurentiu<br>
      </div>
      <div style="font-family:Arial;"><br>
      </div>
      <div>On Wed, Jul 5, 2023, at 14:17, Abel Pau wrote:<br>
      </div>
      <blockquote type="cite" id="qt" style="">
        <div class="qt-WordSection1">
          <p class="qt-MsoNormal"><span lang="EN-US">Hi, following
              instructions about creating a new driver I found that  </span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="ES"><a
                href="https://gdal.org/tutorials/vector_driver_tut.html"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://gdal.org/tutorials/vector_driver_tut.html</a></span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="ES"> </span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="ES"> </span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="EN-US">But I need to
              create a driver that can also write from any vector it’s
              own format.</span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="EN-US">So, the inverse
              sense of the html I found.</span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="EN-US"> </span><br>
          </p>
          <p class="qt-MsoNormal"><span lang="EN-US">There is any other
              place I can follow any instructions to fill all function
              classes to create this part of the driver (the one that
              writes it’s own format)?<br>
              <br>
              Thanks in advance!</span></p>
          <p class="qt-MsoNormal"><span lang="EN-US"> </span><br>
          </p>
        </div>
        <div>_______________________________________________<br>
        </div>
        <div>gdal-dev mailing list<br>
        </div>
        <div><a href="mailto:gdal-dev@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
        </div>
        <div><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
        </div>
        <div><br>
        </div>
      </blockquote>
      <div style="font-family:Arial;"><br>
      </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>