A sample SOI (Server Object Interceptor) is made available that helps visualize on the fly aggregated results by overcoming challenges presented in an earlier blog post. A map service, powered by this SOI, can be used in the ArcGIS Online Map Viewer or a Web Application Builder application without any client side customization.
The source code and how to setup instructions are available at http://www.arcgis.com/home/item.html?id=ac2d864f0bf141cab2b2e62e18ce0370.
SOI is a tool that enables developers to bring client side custom logic on the server side to change a map service behavior by intercepting and modifying incoming requests and out-going responses. The SOI downloadable from the link above, in a nutshell, does two major things:
- It modifies the out-going root and layer resources:
- Advertises that the map service is time aware, even though none of the layer in it is time aware, so that time slider on a web application can be used and results can be computed for any arbitrary time extent e.g March 15, 2016 to June 3rd, 2016 or between 5:45 am to 10:10 pm.
- Includes few virtual aggregated fields in the layer resources to be used to symbolize features.
- When an export request comes in and it includes time values and has one of the virtual aggregated fields in the user defined renderer, the SOI generates a SQL statement with aggregated function and pushes that to the database via a dynamically created Query Layer.
Is SOI is the only solution to this problem? In fact, the answer is no. Few months back, I have written another blog post on how to plan, design database, map service and create web application to visualize features (drawn on the server side) using real time computed aggregated result for a given time extent. Even though there are no programming required and everything can be done using UI, however there were some challenges and this SOI helps to overcome challenges such as:
- You need to pre-define time intervals.
- Based on that you may need to have multiple layers in the map service for each pre-defined time interval.
- Need to create views in database or computed fields in the table.
- You cannot use time slider in the web application for time navigation.