Opened 13 months ago

#7057 new defect

Auto-enabled paging of ArcGIS REST may give corrupted data

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

As explained in http://www.gdal.org/drv_geojson.html GDAL enables automatically paging if ArcGIS REST server that requires. However, current implementation may lead to corrupted data as in gis.stackexchange question https://gis.stackexchange.com/questions/256668/ogr2ogr-get-geojson-from-map-server-misses-features-and-creates-duplicates

The error comes from wrong assumption that the n features that server returns if query is made without "resultRecordCount" and "resultOffset" parameters, where n is the server side setting for maximum resultRecordCount, are the same n features which are returned by having

resultRecordCount=n&resultOffset=0

That is not necessarily the case but server may sort features differently if paging parameters are provided or not. The safe way would be to check the server side resultRecordCount limit and query also the first page with explicit record count and offset.

Because GDAL may turn paging on automatically data corruption may happen without user notising it even there are ways to avoid that with some GDAL parameters https://lists.osgeo.org/pipermail/gdal-dev/2017-September/047230.html.

Change History (0)

Note: See TracTickets for help on using tickets.