<div dir="ltr">worked like a charm, thanks very much!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 2, 2021 at 2:13 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hugh,</p>
    <p>I've queued in <a href="https://github.com/OSGeo/gdal/pull/4418" target="_blank">https://github.com/OSGeo/gdal/pull/4418</a> a fix for
      that.</p>
    <p>But there's a simple workaround. Just remove the ESRIJSON: prefix
      in the connection string. In that instance, the driver will be
      automatically detected</p>
    <p>Even<br>
    </p>
    <div>Le 02/09/2021 à 19:30, Hugh Kelley a
      écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi all,</div>
        <div><br>
        </div>
        <div>I'd like to load some data directly from an arcgis REST
          feature service using ogr2ogr. <br>
        </div>
        <div><br>
        </div>
        <div>The command that follows collects exactly 5000 features,
          which i assume is the server limit mentioned in the ESRIJSON
          driver documentation</div>
        <br>
        <div> ogr2ogr "streets.shp" ESRIJSON:"<a href="https://services1.arcgis.com/dLpFH5mwVvxSN4OE/arcgis/rest/services/Street_Centerlines/FeatureServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json&orderByFields=OBJECTID+ASC" target="_blank">https://services1.arcgis.com/dLpFH5mwVvxSN4OE/arcgis/rest/services/Street_Centerlines/FeatureServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json&orderByFields=OBJECTID+ASC</a>"
          -overwrite -oo FEATURE_SERVER_PAGING=YES  <br>
        </div>
        <div><br>
        </div>
        <div>Reading the documentation though, it sounds as though
          ogr2ogr should be paging through the feature service to
          collect the full set of features, which ogrinfo says number
          10,954.  Setting resultOffeset parameter to 5000 results in a
          new set of 5000 features. I have a lot of feature services to
          pull data from though so I'd like to be able to set ogr2ogr to
          page through the full feature set for each service rather than
          calculating the offsets and running multiple queries each
          time.  </div>
        <div><br>
        </div>
        <div>Thanks for any suggestions.</div>
        <div><br>
        </div>
        <div>As a note, in case it makes a difference, I'm using shp
          here for simplicity but the actual destination will be a
          postgres db. <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Hugh Kelley       <br><div><br></div></div></div></div></div></div></div></div>