Skip to main content
added 878 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

After hours of searching... it seems theThe ESRIJSON driver that is responsible for FeatureServer does not support handling multiple layers at the same time, you have to query layer per layer.  

For example:

ogr2ogr -skipfailures  -f  GPKG floridaData.gpkg "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/COVID19Surge_Florida_InterventionScenarios/FeatureServer/0/query?where=OBJECTID+%3C1000&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outSR=4362&returnGeometry=true&sqlFormat=standard&f=json&maxRecordCountFactor=30&outFields=*&returnExceededLimitFeatures=false&resultType=tile" -nln 0
ogr2ogr -skipfailures -update floridaData.gpkg "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/COVID19Surge_Florida_InterventionScenarios/FeatureServer/1/query?where=OBJECTID+%3C1000&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outSR=4362&returnGeometry=true&sqlFormat=standard&f=json&maxRecordCountFactor=30&outFields=*&returnExceededLimitFeatures=false&resultType=tile" -nln 1

forFor more info

After hours of searching... it seems the ESRIJSON driver that is responsible for FeatureServer does not support handling multiple layers at the same time.  for more info

The ESRIJSON driver that is responsible for FeatureServer does not support handling multiple layers at the same time, you have to query layer per layer.

For example:

ogr2ogr -skipfailures  -f  GPKG floridaData.gpkg "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/COVID19Surge_Florida_InterventionScenarios/FeatureServer/0/query?where=OBJECTID+%3C1000&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outSR=4362&returnGeometry=true&sqlFormat=standard&f=json&maxRecordCountFactor=30&outFields=*&returnExceededLimitFeatures=false&resultType=tile" -nln 0
ogr2ogr -skipfailures -update floridaData.gpkg "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/COVID19Surge_Florida_InterventionScenarios/FeatureServer/1/query?where=OBJECTID+%3C1000&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outSR=4362&returnGeometry=true&sqlFormat=standard&f=json&maxRecordCountFactor=30&outFields=*&returnExceededLimitFeatures=false&resultType=tile" -nln 1

For more info

Source Link

After hours of searching... it seems the ESRIJSON driver that is responsible for FeatureServer does not support handling multiple layers at the same time. for more info