[gdal-dev] read ESRIJSON with ogr2ogr

Hugh Kelley hghklly at gmail.com
Thu Sep 2 11:28:13 PDT 2021


worked like a charm, thanks very much!

On Thu, Sep 2, 2021 at 2:13 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> Hugh,
>
> I've queued in https://github.com/OSGeo/gdal/pull/4418 a fix for that.
>
> But there's a simple workaround. Just remove the ESRIJSON: prefix in the
> connection string. In that instance, the driver will be automatically
> detected
>
> Even
> Le 02/09/2021 à 19:30, Hugh Kelley a écrit :
>
> Hi all,
>
> I'd like to load some data directly from an arcgis REST feature service
> using ogr2ogr.
>
> The command that follows collects exactly 5000 features, which i assume is
> the server limit mentioned in the ESRIJSON driver documentation
>
>  ogr2ogr "streets.shp" ESRIJSON:"
> https://services1.arcgis.com/dLpFH5mwVvxSN4OE/arcgis/rest/services/Street_Centerlines/FeatureServer/0/query?where=objectid+%3D+objectid&outfields=*&f=json&orderByFields=OBJECTID+ASC"
> -overwrite -oo FEATURE_SERVER_PAGING=YES
>
> 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.
>
> Thanks for any suggestions.
>
> 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.
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Hugh Kelley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210902/1f68cef2/attachment.html>


More information about the gdal-dev mailing list