I would like to construct a python script to obtain JSON vector data from the following ArcGIS Rest Server:
For a WFSServer output for an ArcGIS Rest Server hosted by a different organisation, I am able to open the layer and view information about the data using the following Python code:
import ogr url = 'WFS:http://idpgis.ncep.noaa.gov/arcgis/services/NWS_Observations/ahps_riv_gauges/MapServer/WFSServer' ds = ogr.Open(url) lyr = ds.GetLayer(1) name = lyr.GetName() print (name)
Is it possible to "open" the url of the JSON output of an ArcGIS Rest Server in the same way? For the NSW six maps ArcGIS Rest Server the following python code returns a "OSError: Could not open " error:
import ogr url = 'http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPIMap/MapServer/69/JSON' ds = ogr.Open(url)
The following variations of the url also return a "OSError: Could not open " error:
url = 'JSON:http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPIMap/MapServer/69/JSONServer' url = 'http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPIMap/MapServer/JSONServer' url = 'JSON:http://maps.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPIMap/MapServer/JSONServer'