Situational Awareness Development Overview - PowerPoint PPT Presentation

Situational awareness development overview
Download
1 / 26

Situational Awareness Development Overview. Beginning Stages of App Development Had the idea/need, but what API to use? Confusion and Revelations – learn from our trials. Demonstration of Situational Awareness Application Data Feeds from external (non-GIS) data sources

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha

Download Presentationdownload

Situational Awareness Development Overview

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Situational awareness development overview l.jpg

Situational Awareness Development Overview

  • Beginning Stages of App Development

    • Had the idea/need, but what API to use?

    • Confusion and Revelations – learn from our trials

  • Demonstration of Situational Awareness Application

  • Data Feeds from external (non-GIS) data sources

    • How accomplished and future changes


Beginning application development l.jpg

Beginning Application Development

  • Which ArcGIS Server Web API to use?

    • ArcServer installed on a Test Web Server

      (“hand me down” server)

    • Taken training

    • But so many options!!

    • Experienced programmers

      but not with web apps

    • What is the best to use?

    • Which has least steep

      learning curve?

http://resources.esri.com/arcgisserver/index.cfm?fa=applications


Application development which api l.jpg

Source: ESRI ArcNews Online Fall 2009

Application Development – Which API?

Just as we were trying to make a decision …

ESRI-Charlotte held a half-day seminar for Emergency Operations personnel:

  • VIPER demonstration – built with Adobe FlexBuilder and the ArcGIS Server Flex API

  • ESRI FlexViewer sample download and configuration

  • Integrating non-GIS data with GIS

    enabled content

    Weather radar, warnings

    Dispatch calls

    Vehicle locations

    Traffic cameras

VIPER Application


App development flexviewer sample l.jpg

App. Development – FlexViewer Sample

  • Let’s try the FlexViewer sample!

  • Downloaded “Sample Flex Viewer” from Code Gallery:

    • http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=15905

  • Quick “How-To” document to configure the FlexViewer application with your ArcGIS Server services

    • http://www.esri.com/events/seminars/webmaps/pdfs/handout.pdf

      All clients viewing FlexViewer Sample will need Adobe FlashPlayer 9 or 10


App development flexviewer sample5 l.jpg

App Development – FlexViewer Sample

  • Configured to use our ArcGIS Server services including a cache of our 2009 Aerial Photography to replace the ESRI Imagery used by default.

  • Configured to use Weather Radar

  • ESRI StreetMap service used at small scales for cartography and speed.

  • Configured “Live Layer Widget” in FlexViewer to display live data feeds from non-GIS data sources at the City and beyond

    • Fire and Police Dispatch calls (Active and Closed last 24 hrs) – From County E911 server

    • Fire Vehicle locations – from iTrak server in Colorado (iTrak API not publicly avail)

    • SCDOT Traffic Cameras – SCDOT and shapefile we created

    • Local weather station data – Weather Underground API, publicly avail.

    • FireHouse Incident Management reports – SQLExpress database that Fire Dept uses

    • Public Service Requests and Road Closures from CityWorks Work Order Management System’s database at the City.

  • Utilized SQL Server 2005 SSIS packages designed in SQL Server Business Intelligence Studio for regular data extractions (discussed after Demo)

  • Widgets use REST Services created from ArcGIS Server Manager


Customizing the app flex confusion l.jpg

Example: We wanted to change behavior of the LiveLayerWidget in the FlexViewer sample.

Forums or ESRI would send us a new LiveLayerWidget.mxml or told to “add this to your ‘src’ folder”.

Problem: FlexViewer Sample that is the configurable application contains zero .mxml files or ‘src’ folders

Customizing the App – Flex Confusion

  • ESRI Sample code from here is not meant to be copied and pasted into FlexViewer:


Using the arcgis server flex api l.jpg

Using the ArcGIS Server FLEX API

  • Three ways of working with ArcGIS Server FLEX API

  • Use Adobe FlexBuilder to build FLEX apps from “scratch”

  • Download the FlexViewer Sample and configure the web app (as mentioned previously) by altering .xmls

  • Download the entire FlexViewer Source project and alter code using Adobe FlexBuilder


1 build flex project from scratch l.jpg

1. Build Flex Project from “Scratch”

  • Requires Adobe Flex Builder – development environment to build rich Internet applications.

  • THIS is where the samples can be used best

    http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html

  • Must add the ARCGIS API for Flex library (.swc) into the Flex Project


2 utilize the flexviewer sample configurable l.jpg

2. Utilize the FlexViewer Sample (configurable)

  • City started with this

  • Download from Code Gallery (previous slide)

  • Directory containing built and compiled Web Application (contents of bin-release folder from FlexViewer Project – next page)

  • Ready to be deployed on a Web Server

  • Configure the config.xml and widget .xmls to utilize your services/data.

  • Cannot use .mxmls from forums or

    Code Gallery


3 utilize the flexviewer project source code using adobe flexbuilder l.jpg

3. Utilize the FlexViewer Project Source Code using Adobe FlexBuilder

  • City now using.

  • Requires Adobe Flex Builder – development environment (60 day trial avail.)

  • Download from Code Gallery (previous slide) but use the flexviewier_src_v##.zip

  • Must Have: Developer’s Guide Create: GeoWeb Applications with the Sample Flex Viewer

    • FlexViewerDevelopersGuide.pdf

    • 60 pages of information

    • How to import and work with the FlexViewer Project

    • How to create your own widget

    • Create the final web application

    • Indispensable to us in the beginning


Flexviewer project within flexbuilder l.jpg

FlexViewer Project within FlexBuilder

  • Work with .mxml, .xml, .as, etc. files within “src” folder to customize

  • When ready to deploy the FlexViewer Application, will perform Export Release Build

  • Creates bin-release folder that contains files needed to deploy web app. Copy paste files to webserver and deploy as any other web app

  • Bin-release will not have .mxmls or action scripts (.as) – only .swf and .xml (and other supporting files).

  • FlexViewer Sample (configurable - #2 option with FLEX API) is the contents of this folder.


Situational awareness demonstration l.jpg

Situational Awareness Demonstration


Data feeds from external data sources l.jpg

Data sources that are not GIS based

Question: How to extract data from external sources into usable format on a regular basis

Initial Goal: Pull from other sources and place into SQL tables with X and Y Coordinates

Each situation can be very different

Depends on how we can access the data:

Database connection to another server

Web API (API is another potentially confusing term)

GeoRSS feed

Created a SQL Server Database (NON-SDE) for use with most external feeds.

Data Feeds from external data sources


Data feeds dispatch cad calls l.jpg

County E911 office maintains in SQL Server (YEAH!)

DBA of E911 allowed us access to Database

County GIS accessing every 30 mins, so he allowed us access if we agreed to that time

Hope to talk him into more frequent time intervals.

Coordinates in CAD are in SC State Plane CS

Started by using Import/Export utility in SQL Server 2005 to create the initial database table within our database from County Dispatch.

Data Feeds – Dispatch (CAD) Calls


Data feeds automate updating dispatch cad calls l.jpg

Created SQL Server SSIS Package in Business Intelligence Studio for regular updates

Set up a Job in SQL Server Agent within SQL Server 2005 that runs the SSIS package

Data Feeds – Automate updating Dispatch (CAD) Calls

  • Result is SQL Table with fields containing X and Y coordinates.

SQL Server 2005 Job


Table in sql with coordinates display in flexviewer l.jpg

In ArcMap, use SQL table to “Display X-Y data” (create x-y event theme)

Table in SQL with Coordinates - Display in FlexViewer

  • IMPORTANT for tables that will be updated regularly and coordinates are in State Plane and FlexViewer is using WGS84:

    Choose the projection for the X-Y data by “Importing” from one of your existing data layers that has the extent needed (ie. City Limit or County boundary).

    Do NOT just select the correct projection/coordinate system.


Dispatch cad calls display in flexviewer l.jpg

Publish Map document as a Map Service with ArcGIS Server

Find REST URL for the Service and layer number for Dispatch Calls and update the config.xml and/or LiveLayerWidget.xml accordingly (see doc on configuring FlexViewer)

Run application and layer will appear

Note: Data layers added through this method will project on the fly!

Dispatch (CAD) Calls - Display in FlexViewer


Data feeds fire vehicle locations l.jpg

City Fire Dept. uses iTRAK AVL system for fire trucks – locations stored at iTRAK in Colorado

Chief uses iTRAK’s web app to monitor locations

iTRAK offers an web API to customers

We utilize this API to access fire truck locations

API in this case is actually a “connection to info that they are supplying”. AKA – web service

iTRAK supplied us with a query, username, and password. The query supplies a text file…..

Data Feeds – Fire Vehicle Locations


Data feeds fire vehicle locations19 l.jpg

Need to get from Text file

to

SQL Table

with Vehicle Names and

Lat /Lon as numbers vs. text

That can be updated every minute!

Data Feeds – Fire Vehicle Locations


Data feeds fire vehicle locations20 l.jpg

SQL Server and SSIS package that can be scheduled to run as SQL job every minute

Only dealing with 12-15 records

Data Feeds – Fire Vehicle Locations

Runs query to iTrak API and returns text file using HTTP connection

Pushes info from text file to SQL table

Runs several sql statements to extract latitude, longitude, vehicle name from long text string and convert lat/lon to numbers


Data feeds fire vehicle locations21 l.jpg

Use SQL View vs. Table for final Fire Truck Locations

Use in FlexViewer using same method as other Data Feeds

Display X-Y Data using View

Publish as Map Service

Add to widget

Adjust refresh rate of widget to a minute so that it will show changes in data.

Data Feeds – Fire Vehicle Locations


Future changes data feeds l.jpg

Future changes – Data Feeds

  • Examine using a web handler example to convert the tables to GeoRSS feeds

    • Use GeoRSS feed widget to display data

    • Bypass using XY event theme, publishing map as service for Live Layer Widget “Data Feeds”

    • May solve some of the error issues

    • Provided by ESRI

  • Bring in other layers!

    • Road temperature sensors, stream gauges, etc.


Conclusion l.jpg

Conclusion

  • FlexViewer with source code provided great “starter” code for Situational Awareness application.

  • Determining how to extract data from other sources on a regular basis is time consuming.

  • Don’t worry too much about the “best” way to extract data from other sources. Just get something to work first, then make it more efficient.

  • Fun!


Connect to itrak api download text file l.jpg

Connect to iTRAK API, download text file

  • Uses HTTP Connection option in SSIS Connection Manager

    • Set iTrak Query, login, password

  • Script found on SQL forum to download to a text file


Text file to sql table l.jpg

Text File to SQL Table

These fields still empty

after this task


Sql commands to update table l.jpg

SQL commands to update table

Extract Latitude from text string

Converts lat string to number and places into number field

Extract Longitude from text string

Converts lon string to number and places into number field

Extract Vehicle number from text string


ad
  • Login