Using spatial features from an ArcGIS online browser app in Pro
I figured out that the layers in an ArcGIS Online browser app can be added to ArcGIS Pro by using “Add Data >> From Path” and specifying the url of the service layer. This allows symbolizing by attributes, adding labels, and using queries the map authors didn’t anticipate. For example how to highlight only 2013 data in McElHanney’s Maps-By-Air LiDAR & Orthophoto Catalogue.
Recipe: find the urls by opening browser Developer Tools and filtering the network request urls for the ones that generate the overlay images. Then replace “export” with the layer index number (0,1), which are often the same order as the Layers list in the map app. Use those urls in Pro. Done.
The ArcGIS Online application in a browser
The same features in ArcGIS Pro
Here we can colour the Lidar collection years differently, add labels, and select features of interest.
Finding the data-bearing service URL
Open Network tab >> filter for ‘export’ >> copy the File url >> replace ‘export’ in url with the map layer index number (might take some trial and error to get the right number), discard rest of the url.
The service urls for our example are:
Visiting the urls as browser links will return an error as browsing the REST directory has been disabled. That’s inconvenient for developing but okay, they still work.
If all you need is to use the features in Pro, you’re done, you can stop reading now.
Okay, that’s part one. The other part, and more interesting to me, is that Query can be used to extract and save the features even when the map service doesn’t support export. For instance the Vertisee lidar layer above added to Pro can’t be exported, even to a layer file.
it is possible to download data from ArcGIS Server map services directly to ArcMap. I have done it plenty of times. The easy way is to query the data, e.g. https:// [your map server] /arcgis/rest/services/ [folder]/ [map service name] /MapServer/0/query?where=1=1&outFields=*&f=pjson and then save the JSON response. After that you can use the JSON to features tool in ArcToolbox. Note that you can only export the maximum number of records allowed, which is 1000 by default.
f=geojson can also be used:
So while my goal here was to use the browser app spatial features in Pro, this shows a path for how it can be adapted for any program.
This same idea on steriods is wrapped in a python geoprocessing tool by Jake Skinner:
Download ArcGIS Online Feature Service or ArcGIS Server Feature/Map Service
Note that even though FeatureClass to FeatureClass in ArcGIS Pro in can also convert services to local data, this tool will retrieve features from services that fc2fc fails with. So keep Skinner’s script in your toolbox stash too.
Image of the fc2fc tool using an online service url as it’s source Input Features: