Drawing large amounts of raw features on a map – thousands, millions or even billions – is a common request I hear when talking to other ArcGIS users. However, if it is actionable intelligence and an understanding of your data that you are looking for, we recommend something a little different. Adding millions of features to a map – regardless of how they are dispersed geographically – is unlikely to really provide any tangible takeaways. It’s more likely to look like this (aka noise):
However, if you want a quick and easy understanding of your data, aggregation is a good start. And it’s possible to do so in ArcGIS, by first aggregating your features into polygons, and dynamically adjusting the aggregations based on scale. There are a few ways to do this. In this blog post, I’ll focus on new capabilities exposed with ArcGIS GeoAnalytics Server at 10.6.1.
Before I tell you how to do this – let’s see what the results look like:
Nice, right? So how can you do this?
At 10.6.1, there are two ways to create these layers using GeoAnalytics:
- Using the ArcGIS API for Python.
- Using the Server and Portal Services REST API.
For both options, you’ll need to be either the owner of the layer or a portal administrator, and the results need to be saved to the spatiotemporal data store.
The following Python notebook shows how to complete this workflow. You can access and modify this Python notebook for your own needs here.
To complete this using the REST API, complete the following steps.
-
- Run a GeoAnalytics tool through the ArcGIS Server REST API. In the context parameter, add the following:
{"defaultAggregationStyles":true}
- When the tool runs, go to the resulting feature service endpoint. The URL will look something like this: https://my_machine_name.domain.com/server/rest/services/Hosted/MyFeatureService/FeatureServer . You’ll need admin access to perform the next step, so change the URL by adding
/admin/
to/server/rest/services
as such:/server/rest/admin/services
. - The option to Generate Map Service is now available at that endpoint. Click
Generate Map Service Definition
, then clickgenerateMapServiceDefinition
and copy the JSON output. It should be pretty long. - You’ll now need to log in to the portal sharing API and go to the following endpoint (with your own domain, of course): https:// my_machine_name.gpportal.esri.com/portal/sharing/rest/content/users/admin/publish. Fill in the Publish Item form with the following information:
- Item Id: This is the item ID of the feature service in your portal. You can get this by opening the item in the portal and copying the ID from the URL.
- Type: Feature Service
- Publish Parameters: Copy in the JSON from step 3
- OutputType: bdsMapService
- Hit
publish
!
- Run a GeoAnalytics tool through the ArcGIS Server REST API. In the context parameter, add the following:
You will now have a new item in your portal Content page that is a Map Image Layer. Open it up in the Map Viewer, zoom, explore, and start understanding that huge dataset!
Commenting is not enabled for this article.