Académique Documents
Professionnel Documents
Culture Documents
March 2014
Page 2 of 38
Register and explore the reasoning behind using a managed database as your preferred data
store for features in ArcGIS for Server.
Use a map package to publish a feature service to an ArcGIS for Server site.
Use ArcGIS Online to create web maps by adding layers from published feature services.
Configure GeoEvent Services to append and update features in a published feature service.
Getting started
If you are just getting started with this tutorial, a GeoEvent Processor configuration file is included to
help you quickly get started with the exercises in this module. Importing this product configuration will
Introduction to GeoEvent Processor Module 2
March 2014
Page 3 of 38
create the items listed below if items with the same names already exist, importing the product
configuration will update them and overwrite any changes you may have made in a previous module.
Module 2 GeoEvent Processor Quick Start Configuration contents:
An input named tcp-text-in and two outputs named tcp-text-out and file-out.
A GeoEvent Service named Flights which incorporates the input and outputs.
Two registered system folder data stores named GeoEvent_Input and GeoEvent_Output.
If items with these names already exist, importing the provided product configuration will overwrite
them. Any changes you may have made to the items listed above, outside of the steps outlined in the
Module 1, will be lost. The system folder data stores assume that C:\GeoEvent\input and
C:\GeoEvent\output exist as local folders on your system. The server data store assumes ArcGIS for
Server has been installed on the localhost and is reachable at http://localhost:6080/arcgis/.
Follow the steps below to import the GeoEvent Processor configuration for Module 2.
1. In GeoEvent Processor Manager, navigate to Site > GeoEvent Processor > Configuration Store.
2. Click Import Configuration and browse to Module2_QuickStart.xml file located in the
\configurations folder included with this tutorial.
3. Select the Module2_QuickStart.xml file and click Import to import the configuration.
March 2014
Page 4 of 38
datasets of various types held in a multiuser relational database management system, or RDBMS.
Examples include Oracle, Microsoft SQL Server, PostgreSQL, Informix, and IBM DB2.
March 2014
Page 5 of 38
RDBMSs come in many variations and scale to support single-users accessing geodatabases built on files
on up to larger workgroup, department, and enterprise geodatabases accessed by many users.
How do I create an Enterprise Geodatabase? The help topic Create Enterprise Geodatabase discusses the
geoprocessing tool used to create an enterprise geodatabase within an RDBMS. For help installing and
configuring an RDBMS, from your vendor of choice, please refer to the vendors documentation.
Additional help is available at ArcGIS Resources for:
Once you have created an enterprise geodatabase on your database server you will need to create a
connection to the geodatabase from ArcGIS for Desktop. Follow the steps below.
4. Launch ArcCatalog.
For installations of SQL Server Express:
a. Expand Database Servers and double-click Add Database Server.
b. Specify the database server and instance of SQL Server Express and click OK.
c. Expand the newly created database server connection to list the servers available
geodatabases.
d. Right-click the database server containing the enterprise geodatabase you intend to use with
GeoEvent Processor and select Permissions (refer to the screenshot on the next page).
e. Make sure the user which runs the ArcGIS for Server service has sufficient permissions to
create, update, and delete tables by making that user a Server administrator.
March 2014
Page 6 of 38
Beneath the database server, right-click the geodatabase you intend to use with GeoEvent
Processor and select Save Connection. This will create an entry beneath Database
Connections that you will need when registering the database with ArcGIS for Server as the
servers managed database in the next set of steps.
For installations other than SQL Server Express such as Oracle or SQL Server Enterprise:
a. Expand Database Connections and double-click Add Database Connection.
b. Specify the information required by your RDBMS.
- For SQL Server, this is typically <server host>\<instance> and <database> using operating
system authentication.
- For Oracle, this is typically <instance> followed by the user credentials of a database
authenticated user.
For additional information refer to Database connections in ArcGIS for Desktop.
Once you have created an ArcGIS for Desktop connection to the enterprise geodatabase you intend to
use with GeoEvent Processor, you need to register that database as ArcGIS Servers Managed Database.
This is necessary in order to follow the exercise steps as written, which instruct you to enable the
Feature Access capability as part of service publication. Data included in the local map package will
automatically be copied into the enterprise geodatabase when the map is published with the feature
service configured to reference the published copy of the data.
5. In a web browser, open ArcGIS Server Manager and navigate to the Site > GIS Server > Data Store.
6. Click the pull-down next to Registered Databases and choose Register Managed Database.
March 2014
Page 7 of 38
7. Enter a descriptive name for the registered database. It is recommended the hostname of the server
on which you installed your RDBMS be incorporated into this name.
8. Click Import.
9. Click Choose File and browse to the *.sde file for the database connection created previously.
(A *.sde file was created when you established the database connection in ArcCatalog).
In Windows, this database connection file is typically found in the users applications data folder:
C:\Users\...\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog
10. Select the *.sde file associated with the connection to your enterprise database and click Open.
11. Click Import on the Register Database dialog.
12. Click Create on the Register Database dialog to register the database as managed.
13. Click Validate All to validate your registered database.
14. Verify the new registered database is Managed.
March 2014
Page 8 of 38
Note: You will need to repeat the steps below to publish the other map packages referenced above
(Storms.mpk, Pilots.mpk, and IncidentDetection.mpk) as separate feature services in order to
complete exercises in the other modules of this tutorial.
1. In Windows File Explorer, browse to the \data\WorkingWithFeatures folder included with this
tutorial.
2. Double-click the Flights.mpk map package.
ArcMap will open automatically and display the map package contents. The contents of the map
package will be unpacked to your user \My Documents\ArcGIS\Packages folder.
3. In ArcMap, click File and choose Share As > Service.
4. Click Next to publish a service.
March 2014
Page 9 of 38
5. From the drop-down menu, choose an available connection to your local ArcGIS Server (or click the
Create Server Connection button to create a new server connection).
6. Click Next to accept the default service name Flights.
7. Choose a folder in which you want to create the feature service and click Continue.
Note: It is recommended, but not necessary, you specify the services be created in a folder named
IntroToGEP to maintain consistency with illustrations in the following exercises.
March 2014
Page 10 of 38
The Service Editor dialog will open allowing you to configure the service to be published.
8. In the Service Editor menu, click Capabilities and uncheck the checkbox for KML and check the
checkbox for Feature Access.
March 2014
Page 11 of 38
It is recommended you repeat the steps above to publish the other three map packages as separate
feature services. These map services will be referenced below in this module as well as in later modules
where you will use them to build web maps.
11. Close ArcMap once all four feature services are published.
You can confirm all four are published in ArcGIS Server Manager and the ArcGIS REST Services Directory
as illustrated below.
March 2014
Page 12 of 38
Operation View:
Flight Monitor
Web Map:
Flights
Feature Layer(s):
Flights
( Module 2 )
( Module 3 )
Operation View:
Flight Monitor
Web Map:
Flights
Feature Layer(s):
Flights, Storms
( Module 4 )
March 2014
Page 13 of 38
Operation View:
Incident Detection
Web Map:
Incident Monitor
Feature Layer(s):
Follow the steps below to build the web maps necessary to support the section exercises.
1. Open a web browser and navigate to http://www.arcgis.com/.
2. Sign in using your ArcGIS Online for Organizations account and navigate to My Content.
3. Click the Create Map button to create a new web map. Your organizations default basemap will
open.
4. Click
March 2014
Page 14 of 38
Navigate to Services > Manage Services and click the IntroToGEP folder.
Click
6. In ArcGIS Online, paste the URL to the URL property in the Add Layer from Web dialog as illustrated
below.
Note: Make sure you add the layer index with the URL. Again, using the Flights feature service as an
example, the services only feature layer is at index 0, so you will add /0 to the URL you copied as
illustrated below. This will specify the specific layer you want to add to the web map from the
feature service.
March 2014
Page 15 of 38
Note: If your ArcGIS Server site is not hosted on the machine localhost, you will need to modify the URL
to include your ArcGIS Server site machines hostname.
7. Click ADD LAYER to add the layer to your web map.
Occasionally, you may see a message when adding layers to a web map from a local ArcGIS Server site (or opening
a map in the ArcGIS Online map viewer) stating that layers on an internal network are not accessible and editing
will be disabled for those layers. You will not be editing the layers through the map viewer for these exercises; you
will be configuring GeoEvent Processor to append and update features through the feature services REST
endpoints. These warning messages can be ignored.
Initially, you will not see any data when adding the feature layer to the web map because the Flights
feature layer does not have any features you are publishing what amounts to a container in which
features will be created using event data sent by GeoEvent Processor.
8. Click Save
to save your new web map and enter the map information as illustrated below.
11. Verify the Flights web map is now listed. Notice it has not yet been shared.
March 2014
Page 16 of 38
In addition to the Flights web map, you will need a web map to support the Detecting Incidents section
exercises in Module 5 that utilizes the Incident Detection Processor.
Using the steps you just completed above as a guide:
Create a new web map. You may change the basemap if you like; the Streets basemap would be
appropriate for the exercises.
Add the three layers (Depots, Trucks, and TruckAlerts) found in the IncidentDetection feature
service to the new web map as layers.
Organize the layers such that TruckAlerts is the first, Trucks is the second, and Depots is last (refer
to the illustration below) using URLs below.
o
http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/2
http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/1
http://localhost:6080/arcgis/rest/services/IntroToGEP/IncidentDetection/FeatureServer/0
March 2014
Page 17 of 38
Save your web map and title it Incident Monitor. Enter any appropriate tag(s) and summary for
this web map.
March 2014
Page 18 of 38
March 2014
Page 19 of 38
5. Select the Map widget and click OK to add it to the operation view.
6. Navigate to the Flights web map created in the previous exercise and click Open.
7. From the Data Sources tab, check the checkbox next to the Flights feature layer and select Dynamic
to designate Flights as a layer which can update.
8. Click the Capabilities tab and add the capabilities you want to enable for the Flights map widget as
illustrated below.
March 2014
Page 20 of 38
Note: You must specify Dynamic or Static for every layer participating in a map widget. Flight data, for
example, will be dynamic it will update dynamically as GeoEvent Processor sends new events to
it. An established operational boundary (like one you will use in the Detecting Incidents section
later in this tutorial) will be static. If GeoEvent Processor were receiving polyline data
representing storm fronts, that layer would likely need to be dynamic as well.
9. Click OK to save the Flights map widget.
Operations Dashboard has a default map widget refresh interval of 30 seconds. For these exercises, you
will change the refresh interval so data will be updated more frequently using the steps below.
10. From the Operations Dashboard main menu, click WIDGETS and choose Data Sources.
11. On the Data Sources dialog box, click Modify.
12. Change the Refresh interval to 1 second and click Update.
13. Click Close to dismiss the Data Sources dialog.
14. Click FILE on the main menu and click Save As and enter Flight Monitor for the map title.
15. Click Save to save the operation view.
In your ArcGIS Online for Organizations account, if you refresh the My Content page, you will see a new
operation view called Flight Monitor.
March 2014
Page 21 of 38
Before starting the Detecting Incidents section exercises found in Module 5, you will need to create an
operation view for the Incident Monitor web map.
When configuring the map widget for this second operation view, make sure both the Trucks and
TruckAlerts layers are set to Dynamic these are the layers whose feature data will be updated as
GeoEvent Processor sends the vehicle event data to them. The Depots layer provides the operational
boundary, which will be Static and will not be updated.
Congratulations! You are now ready to make your features come alive.
March 2014
Page 22 of 38
Notice in the illustration above the different fields are generically named Field1, Field4, Field5, and so
on. When dealing with simple comma separated text received over a TCP socket, GeoEvent Processor is
not told what the field names are so it examines the data and assigns a data type. If the attribute field
name and data type in the GeoEvent Definition do not match those of a target feature services layer,
the data provided by GeoEvent Processor will be rejected by ArcGIS for Server and the feature layer will
not be updated.
Follow the steps below to import a GeoEvent Definition from the Flights feature service which exactly
matches the Flights feature layer schema.
1. In GeoEvent Processor Manager, navigate to Site > GeoEvent Processor > GeoEvent Definitions.
2. Click Import GeoEvent Definitions and specify the properties illustrated below.
If the Flights feature service has been published as described in the previous exercise, you should
be able to use the pull downs to select the IntroToGEP service folder, Flights feature service, and
Flights layer.
You should use the ArcGIS for Server connection you registered which incorporates your servers
actual hostname. The localhost pseudonym illustrated below will work, but it is recommended
you avoid using the pseudonym to make your workflow self-documenting.
3. Click Import to import a GeoEvent Definition matching the schema of the specified feature layer.
Introduction to GeoEvent Processor Module 2
March 2014
Page 23 of 38
Notice a new GeoEvent Definition named Flights (with an s) was added to the list of GeoEvent
Definitions. The GeoEvent Definition was named for the Flights feature layer in the published feature
service. If you still have the Flight (with no s) GeoEvent Definition created in Module 1, go ahead and
delete it, you will not need it going forward.
4. Click
5. Click
6. Add the TRACK_ID tag to list of Added Tags using the arrow buttons and click Save.
7. Click Save to save the updates made to the Flights GeoEvent Definition.
A field tag is a marker or key applied to a field that GeoEvent Processor can use to identify how specific
fields should be used or handled. By tagging the FlightNumber field with the TRACK_ID tag, you are
Introduction to GeoEvent Processor Module 2
March 2014
Page 24 of 38
telling GeoEvent Processor that this field contains an identifier which can be used to uniquely identify
features when using this GeoEvent Definition to update a feature service.
Note: When updating a feature service, you must have a field tagged TRACK_ID.
You now need a GeoEvent Definition which matches the input you expect to receive. It is important to
note that the schema of inbound events does not necessarily need to match the schema of outbound
events. In fact, you can probably expect that the two will often not match. In many cases, you will most
likely have little or no influence over the format of the inbound streaming data and unless you are the
publisher of the feature service, you may have just as little influence over the schema of the feature layer
you want to update.
Proceed with the steps outlined below to create a new GeoEvent Definition which will match the input
you will be simulating for this exercise.
8. Click
to copy the Flights GeoEvent Definition. The GeoEvent Definition properties appear.
March 2014
Page 25 of 38
Now with GeoEvent Definitions for both your expected input data and intended output feature layer,
you can update the tcp-text-in Input Connector and reconfigure it to use a specific GeoEvent Definition
rather than having the input create a GeoEvent Definition for you.
Proceed with the steps below to update the tcp-text-in Input Connector.
15. In GeoEvent Processor Manager, navigate to Services > Inputs.
16. Click
Specify the X Geometry Field should be taken from the events Longitude field.
Specify the Y Geometry Field should be taken from the events Latitude field.
March 2014
Page 26 of 38
18. Click Save to save your edits to the tcp-text-in Input Connector.
Later in this exercise you will be simulating event data which looks like the following:
Comparing the illustration above with the input you reconfigured, you will notice this version of the
simulation data does not include the name of a GeoEvent Definition. You reconfigured the input to
reflect this, and also to not attempt to create a GeoEvent Definition, but rather use a specified GeoEvent
Definition tailored specifically for the expected format of the inbound event data.
Another important update made to the inputs configuration was to specify that a geometry should be
created using attribute data from each received event. Notice in the illustration above the coordinate
values are no longer expressed as a quoted string. The Flights-TcpTextIn GeoEvent Definition was edited
to specify that a longitude and latitude value would be provided in each event in separate fields. The
input will use these values to construct a geometry, which will be placed in a field named shape.
Before creating an Output Connector to update the feature layer, lets update the GeoEvent Service and
verify the Input Connector and GeoEvent Definition you created are functioning properly.
19. In GeoEvent Processor Manager, navigate to Services > GeoEvent Services.
Introduction to GeoEvent Processor Module 2
March 2014
Page 27 of 38
20. Click
21. Delete the file-out Output Connector from the GeoEvent Service and click Publish to publish the
reconfigured GeoEvent Service.
22. Double-click TCP Console application desktop shortcut (created in Module 1) to launch the
application used to monitor data sent to a TCP socket from GeoEvent Processor.
23. Open the GeoEvent Simulator and configure the properties below:
Click Load File and browse to the FeatureFlights.csv file in the \simulations folder included
with this tutorial.
Leave the Time Field # property set to field 1 and click Load.
Check the Set value to Current Time checkbox to simulate real-time data.
March 2014
Page 28 of 38
For more information on configuring the GeoEvent Simulator, refer to exercise in Module 1.
24. Click Step
In the TCP Console application you should see a new event was received from GeoEvent Processor.
Notice the output in the TCP Console identifies the name of the GeoEvent Definition used to interpret the
event data (Flights-TcpTextIn) and that the constructed geometry, represented as a quoted list of
coordinates x, y, z, has been appended to the event following the Longitude and Latitude values.
This event schema does not match the schema of the target feature services layer for one, the layer
does not contain fields for a separate Longitude and Latitude. A quick edit to the GeoEvent Service will
fix this. You will be examining GeoEvent processor elements in more detail beginning in Module 4. For
now, follow the steps below to add a Field Mapper Processor to your Flights GeoEvent Service.
25. In GeoEvent Processor Manager, edit the Flights GeoEvent Service and delete the line connecting
the tcp-text-in and tcp-text-out connectors.
March 2014
Page 29 of 38
26. Double-click Processor from the menu to add a new processor to the canvas and configure the
properties as illustrated below.
You should see a second event appear in the TCP Console application this time it is using the Flights
GeoEvent Definition. The event should include the constructed geometry, represented as a quoted list of
coordinates, but should not include the Longitude and Latitude values from the original event data.
Now that you have tested your GeoEvent Service and observed that the output appears to match the
schema of the feature layer you want to update, you can create a new Output Connector and
incorporate it into your GeoEvent Service.
30. In GeoEvent Processor Manager, navigate to Services > Outputs and click Add Output.
Introduction to GeoEvent Processor Module 2
March 2014
Page 30 of 38
31. Enter the search keyword feature in the search box and click Search.
32. Click the Select button to choose the Update a Feature Output Connector.
33. Specify the properties below for the new Output Connector.
The Service Name is the published Flights feature services Flights feature layer.
37. Double-click the fs-out Output Connector in the menu to add it to the canvas.
38. Modify the Flights GeoEvent Service to reflect what is illustrated below and click Publish.
March 2014
Page 31 of 38
You should see another event posted to the TCP Console application, but this time, you will need to dig a
little deeper to confirm the event data was used to create a new feature.
40. In GeoEvent Processor Manager, navigate to Services > Monitor and review the count of events
sent In and Out of each of the components.
By publishing your most recent changes to the Flights GeoEvent Service, you cleared the services
counts. You then sent an event, which the service received, processed, and sent to two separate outputs
(this is why the Out count shows 2 events while the In count indicates only 1 event was received).
The fs-out Output Connector indicates it has received an event but you do not know that ArcGIS for
Server actually created a feature without accessing the feature services REST endpoint and querying to
see if the previously empty layer has a new feature.
March 2014
Page 32 of 38
March 2014
Page 33 of 38
March 2014
Page 34 of 38
6. On the Query: Flights (ID: 0) page enter the values specified below.
Where:
1=1
(no spaces)
Out Fields:
Notice, one record was returned since you were sending event data from the GeoEvent Simulator one at
a time.
8. In the GeoEvent Simulator, configure
the rate to send 9 messages every
1000 milliseconds.
March 2014
Page 35 of 38
March 2014
Page 36 of 38
You should see a map of your published Flights web map with any features you sent to GeoEvent
Processor from the GeoEvent Simulator as you worked through the exercises above.
3. Position the Operational Dashboard on your desktop so you can see both it and the GeoEvent
Simulator.
4. In GeoEvent Simulator, click Step
Processor.
If the Flights operation view, you will see the positions of each flight update as you send new batches of
event data to GeoEvent Processor.
5. Click Play
and watch the web map update as a new batches of event data is sent every second.
The GeoEvent Simulator should be configured to stop once it has reached the end of the data in the
simulation file, after nine batches or 81 total flight events have been sent. You can click on any feature
in the Operations Dashboard to display its attributes in a pop-up window as illustrated below.
March 2014
Page 37 of 38
Congratulations!
By completing the exercises in this module you learned how to make features come alive using
GeoEvent Processor and you have explored a number of prerequisites necessary to make this happen.
Updating a feature service requires the feature service support the Feature Access capability, which
requires the data behind the feature services layers be in an enterprise geodatabase. You reviewed how
to publish a feature service using a provided map package and how using a Managed Database will copy
the data from the map package to an enterprise geodatabase so that feature access can be enabled. You
also reviewed how web maps, created in ArcGIS Online, can be used to visualize data hosted on a local
ArcGIS for Server site and how the Operations Dashboard for ArcGIS can be used to visualize data in
real-time.
In Module 3 you will work through exercises to show you how to work with filters in GeoEvent
Processor. Filters can be used to isolate events of particular interest based on attribute values in the
event or the events spatial proximity to a GeoFence.
March 2014
Page 38 of 38