FME Server as Geospatial add-on for Business Intelligence Querying Jeffrey Smith GIS Developer Farallon Geographics, Inc. Gerald Gloskin Director, Data Warehouse ISO Innovative Analytics
ISO Innovative Analytics needs a way to spatially visualize the output from Viador, a non-spatial BI tool. Viador offers many visualization/reporting widgets, and ISO desires to add a map widget into the environment they are familiar with. Business Challenge
Technical Challenges The schema of data exported from Viador changes depending on the query. There are several spatial datasets that data from Viador may need to join with (States, Census Block Groups, etc).
Viador Capabilities to Leverage Ability to create HTML forms that support querying Export queries to formats including CSV and XML
Step 1 From a custom HTML form within Viador a query is made and the results are saved as a CSV file onto a network drive (a location accessible by FME Server)
Step 2 From the HTML form within Viador a URL to a custom ASP.NET MVC web application is constructed and opened within a results page
Step 2-1 The URL contains 5 querystring parameters which will eventually be used as published parameters passed to FME Server QueryString ParamDescription SourceDataset_CSVPath to CSV file exported from Viador CSVJoinAttrAttribute in CSV file to use for joining SpatialJoinAttAttribute in SQL Server to use for joining FeatureTypeSpatial layer in SQL Server to join CSV with ThematicAttribute in CSV to use for thematic rendering Example URL: rs.csv&CSVJoinAttr=State_Code&SpatialJoinAttr=state_abbr&FeatureType=STATES&Thematic=Filing_Status
Step 2-2 Example CSV file schema
Step 2-3 In SQL Server we have written a view that unions all of the potential spatial datasets. This creates a single view we can use as a FeatureType in FME (the FeatureType querystring param is used as a WHERE clause on the TYPE column) TYPEGEOMJOIN1JOIN2JOIN3… STATESPOLYGONCA40656…. STATESPOLYGONHI40613…. STATESPOLYGONOR40675… CENSUS_BLKGRPPOINT as88fdv…. CENSUS_BLKGRPPOINT vf66wsd… CENSUS_BLKGRPPOINT hf87dds…
Step 3 The custom web application takes these querystring parameters and uses them to build a URL for FME Server. This URL is embedded into the web page that is returned to the clients browser.
Step 4 On load of the webpage we have some JavaScript code that uses the embedded URL to make a request to FME Server
Step 5 FME Server then reads in the CSV file exported from Viador as well as the appropriate spatial data from SQL Server and joins these datasets together in effect spatially enabling the non- spatial data from the CSV file
Step 6 JSON data is returned from FME Server, and then rendered on a map using OpenLayers
The Solution
The Web Application
At this point the user can click on features on the map to view a popup with attribute information.
The Web Application Notice that the data is rendered thematically, and the application has a legend in the left corner
The Web Application Data can be exported to KML or Shapefile format
The Web Application Data can be viewed on top of either Google or Bing basemap data
Cool FME Functionality Used CSV reader’s ability to read in a file with any schema into the translation Generic writer’s ability to write multiple formats Generic writer’s ability to handle any schema we throw at it
Thank you! Jeffrey Smith Farallon Geographics, Inc Gerry Gloskin ISO Innovative Analytics Questions?