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

In the app Lidar extents are a single featureless mass with internal sub-divisions hidden, even though on inquiry there are half a dozen attributes such as flight year and point density available.browser app screesnhot

The same features in ArcGIS Pro

Here we can colour the Lidar collection years differently, add labels, and select features of interest.
Pro screenshot

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.
browser dev tools breakdown

The service urls for our example are:

Orthophotos: https://vertisee-b.mcelhanney.com/arcgis/rest/services/McElhanney_LiDAR_Acquisitions/MapsByAir_public/MapServer/0
Lidar Extent: https://vertisee-b.mcelhanney.com/arcgis/rest/services/McElhanney_LiDAR_Acquisitions/MapsByAir_public/MapServer/1

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. 

From <https://community.esri.com/thread/27244> https://community.esri.com/people/rdonoghue

f=geojson can also be used:

https://vertisee-b.mcelhanney.com/arcgis/rest/services/McElhanney_LiDAR_Acquisitions/MapsByAir_public/MapServer/0/query?where=1=1&outFields=*&f=geojson

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

Update 1/17/19:  Thanks to Adam Eversole for pointing out that this tool’s functionality can now be handled by ArcGIS Pro’s Feature Class to Feature Class tool.

From <https://community.esri.com/docs/DOC-6496-download-arcgis-online-feature-service-or-arcgis-server-featuremap-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:

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *