1 / 30

Real-Time GIS Leveraging Stream Services

Learn how to leverage stream services and stream layers for visualizing real-time data in web maps using ArcGIS GeoEvent Extension and ArcGIS Server. This workshop is suitable for beginner to intermediate level participants.

marcellp
Download Presentation

Real-Time GIS Leveraging Stream Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Real-Time GISLeveraging Stream Services Javier Delgadillo Real-Time Engineer Real-Time GIS Team jdelgadillo@esri.com Suzanne Foss Product Engineer Real-Time GIS Team sfoss@esri.com

  2. Agenda Stream Services and Stream Layers Publishing Stream Services Visualizing Real-Time Data in Web Maps Application Templates & Web App Builder Using the Stream Layer in Custom Web Applications 1 2 3 4 5

  3. This is a beginner-intermediate level technical workshop LeveragingStream Services We expect that you are familiar with: Web maps and feature layers The ArcGIS GeoEvent Extension for Server (“GeoEvent”) This presentation will demonstrate and discuss: Publishing stream services using the GeoEvent Manager Discovering stream services in the ArcGIS REST Services Directory Advantages stream services provide vs. traditional feature services Viewing stream layers in maps and apps

  4. 1 Overview

  5. Real-Time Capability Web Device Desktop ArcGIS 10.4 Apps Live and Historic Aggregates & Features Live Features • Ingest high velocity real-time data into ArcGIS • Perform continuous analytics on events as they are received • Store observations in a Spatiotemporal Big Data Store • Visualize high velocity and volume data: • as an aggregation • as discrete features • Notify those who need to know about patterns of interest in real-time Visualization Map and Feature Service Stream Service Spatiotemporal Big Data Store Ingestion Storage Analytics GeoEvent Extension ArcGIS Server

  6. Stream Services and Stream Layers 2

  7. Stream services vs traditional feature services Two patterns, two important differences • Feature layers pull from feature services • Layers poll to get periodic updates • Must be backed by an enterprise geodatabase (EGDB) or Spatiotemporal Big Data Store • Stream layers subscribe to stream services • Service pushes data to layer as soon as it is received • Data is not stored in database Your Applications Polling (Pull) feature layers ArcGIS Server Update a Feature Add a Feature EGDB Map Services Feature Services Stream Services Send Features to a Stream Service GeoEvent Extension Feature Layer Stream Layer

  8. Stream Layer What is it? • A layer in the Javascript API • Available since version 3.6 • Inherits from Feature Layer esri/layers/GraphicsLayer esri/layers/FeatureLayer esri/layers/StreamLayer Stream Layer FeatureLayer RESPONSE HTTP GET WebSocket PUSH Stream service Feature service GeoEvent Extension ArcGIS Server ArcGIS Server

  9. Stream Layer Advantages when using real-time data • More responsive and more efficient than feature layers • Stream layers display immediately and refresh automatically • Data is only sent to the client once • Messages are sent without extra headers Stream Layer FeatureLayer Establish Connection Data Request Response Stream service GeoEvent Extension Feature service ArcGIS Server ArcGIS Server

  10. Stream Layer Requirements • ArcGIS GeoEvent Extension for Server • Stream services are published as GeoEvent output connectors • Web Browser that supports Web Sockets • http://caniuse.com/websockets • Network support for the Web Socket protocol • ws:// wss:// • No custom plug-in required: Standard JavaScript implementation 10 + 6 + 14 + 6 +

  11. Stream Services What can I use to consume stream services? • ArcGIS Online and Portal for ArcGIS Web Maps • ArcGIS Online and Portal for ArcGIS web application templates • Web applications built using Web App Builder • Your own web apps that use the ArcGIS API for JavaScript

  12. Demo Stream Services and Stream Layers

  13. Viewing Real-Time Data in Web Maps 3

  14. Real-time Data in a Web Map • Symbology • Filtering

  15. Application Templates and Web App Builder 4

  16. Web Application Templates “Pre-packaged” Web Apps “Configurable Apps” tab Many to choose from Many are theme-focused Compare Elevation Profile Impact Summary Can publish, download or preview

  17. Web AppBuilder Apps Share in ArcGIS Online / Portal • Also via the “Share” button • Also use “Create a Web App” • “Web AppBuilder” tab • Enter a title, add some tags, enter a summary • “Get Started”

  18. Demo Web Maps Templates and Web App Builder

  19. Custom Web Applications

  20. Real-time data in Your Own Web App Very little code!! require([ "esri/map", "esri/layers/StreamLayer", "dojo/domReady!" ] • Dojo “require” • Construct and add to map varurl = "https://geoeventsample3.esri.com:6443/arcgis/rest/services/AsdiTracks/StreamServer"; varstreamLayer = new StreamLayer ( url ); var map = new Map( "mapDiv", { basemap: "topo" }); map.addLayer ( streamLayer );

  21. Stream Layer Get rid of unneeded features • purgeOptions • displayCount: Maximum number of features to display • age: Maximum age of features (in minutes). Defaults to no maximum. • maximumTrackPoints: Maximum features per trackId to display. Defaults to 1 • purgeInterval: The purge method is automatically called at this interval (in minutes). Defaults to 0 so purging performed when new message is received. varstreamLayer = new StreamLayer(url, { purgeOptions: { displayCount: 1000, age: 20 }, maximumTrackPoints: 5 }); varstreamLayer = new StreamLayer(url, { purgeOptions: { displayCount: 1000, age: 20 } }); varstreamLayer = new StreamLayer(url, { purgeOptions: { displayCount: 1000, age: 20 }, maximumTrackPoints: 5, purgeInterval: 1 }); Note: GeoEvent definition “TIME_END” field is honored

  22. Stream Layer Setting Filters on Data varstreamLayer = new StreamLayer(url, { definitionExpression: "AltitudeFeet > 18000", geometryDefinition: new Extent ( { xmin: -120, ymin: 38, xmax: -115, ymax: 42, spatialReference: { wkid: 4326 } }) }); varstreamLayer = new StreamLayer( url, { definitionExpression: “AltitudeFeet > 18000” }); • definitionExpression: The where clause used to filter data using attributes. • geometryDefinition: The Extent used as a spatial filter. Only Extent is allowed.

  23. Stream Layer Setting Filters on Data after layer is created • After layer is created use setDefinitionExpression and setGeometryDefinition. • Setting the properties to null clears an existing filter • Use filter-changed event to determine if filter was set successfully streamLayer.on( "filter-change", function(evt) { if (evt.error) { console.log ( evt.error ); } else { console.log ( evt.filter ); } });

  24. Stream Layer Events to use • error: Use to determine why layer could not be created . • connect: Use to listen for web socket connection opened • disconnect: Use to listen for web socket connection closed • attempt-reconnect: Use to determine when a reconnection attempt is made and how many have been made • message: Use to get message sent to web socket without having to listen to map events

  25. DEMO Custom Applications

  26. Conclusion

  27. Summary Your Session Title Goes Here • Conclusion • Summary 1 • Summary 2 • Summary 3 • To learn more see the tutorials.

  28. Real-time: Leveraging Stream Services Helpful links StreamLayer API help:https://developers.arcgis.com/javascript/jsapi/streamlayer-amd.html Stream Layer Sample:https://developers.arcgis.com/javascript/jssamples/layers_streamlayer.html Sample Applications on Github:https://github.com/jdelgadillo/UC2016-StreamServices/ Sample Stream Services with Simulated Data:https://geoeventsample3.esri.com:6443/arcgis/rest/http://ec2-75-101-155-202.compute-1.amazonaws.com:6080/arcgis/rest/

  29. Please take our Survey Your feedback allows us to help maintain high standards and to help presenters Find your event in the Esri Events App Find the session you want to review Scroll down to the bottom of the session Answer survey questions and submit

  30. Questions / Feedback? Suzanne Foss Product Engineer Real-Time GIS Team sfoss@esri.com Javier Delgadillo Real-time Engineer Geoevent Team jdelgadillo@esri.com

More Related