Opened 7 years ago

Closed 5 years ago

#7037 closed enhancement (wontfix)

Support ArcGIS Feature Server as Datasource in GeoJSON Driver

Reported by: THX1138 Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: svn-trunk
Severity: normal Keywords: geojson FeatureServer
Cc:

Description (last modified by THX1138)

The existing GEOJSON driver does not support reading a given Feature Service as a datsource.

As an example, the following url will fail to open with the current GEOJSON driver: https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/ZoningTotalsFS/FeatureServer?f=pjson

Therefore one must manually query each layer like:

https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/ZoningTotalsFS/FeatureServer/0?f=json&where=1%3D1&returnGeometry=true&outFields=*

https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/ZoningTotalsFS/FeatureServer/1?f=json&where=1%3D1&returnGeometry=true&outFields=*

Internally the driver is already accessing the Feature Service metadata in order to obtain the SRID and determine the feature limit, so would seem logical to use the layer information to create a datasource:

"layers" : [
    {
      "id" : 0, 
      "name" : "Base_Zoning", 
      "parentLayerId" : -1, 
      "defaultVisibility" : true, 
      "subLayerIds" : null, 
      "minScale" : 500000, 
      "maxScale" : 500, 
      "geometryType" : "esriGeometryPolygon"
    }, 
    {
      "id" : 1, 
      "name" : "MixedUse_Historic", 
      "parentLayerId" : -1, 
      "defaultVisibility" : false, 
      "subLayerIds" : null, 
      "minScale" : 500000, 
      "maxScale" : 50, 
      "geometryType" : "esriGeometryPolygon"
    }

This would also result in proper layer names instead of the forced "OGRGEOJSON"

It would be possible to go even further and treat the entire services root like schemas in a postgis database using the service root metadata -which lists all of the relevant feature services / map servers.

Example: https://services.arcgis.com/0L95CJ0VTaxqcmED/arcgis/rest/services?f=pjson

"services" : [
    {
      "name" : "20161020_ROP_list", 
      "type" : "FeatureServer", 
      "url" : "https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/20161020_ROP_list/FeatureServer"
    }, 
    {
      "name" : "20170824", 
      "type" : "FeatureServer", 
      "url" : "https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/20170824/FeatureServer"
    }, 
    {
      "name" : "20170824_collector_training", 
      "type" : "FeatureServer", 
      "url" : "https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/20170824_collector_training/FeatureServer"
    }, 
    {
      "name" : "AccesAustin_ArcGISOnline_UrbanTrails", 
      "type" : "FeatureServer", 
      "url" : "https://services.arcgis.com/0L95CJ0VTaxqcmED/ArcGIS/rest/services/AccesAustin_ArcGISOnline_UrbanTrails/FeatureServer"
    }
]

Change History (2)

comment:1 by THX1138, 7 years ago

Description: modified (diff)

comment:2 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.