Shuttle Tracker Demo (PDC)

StreamInsight was featured in a demo during the SQL Spatial presentation at PDC, given by Ed Katibah and Olivier Meyer. Some of you asked for the sample code, here you are!

The example illustrates how to include existing code from existing libraries to extend StreamInsight queries. This sample specifically shows how to include functionality from the SQL Server 2008 Spatial data type to do spatio-temporal processing with StreamInsight. Some of the aspects demonstrated:

  • It uses the SqlGeography spatial type introduced in SQL Server 2008

  • It uses our user-defined extensions SDK to make the spatial types available in StreamInsight

    • It introduces a new UDF called ShuttleFunctions.MapLocationToBuilding

    • The function maps shuttle position to a Microsoft building

  • The input data is shuttle position, direction, and speed

  • The example query computes the number of shuttles that come by building 34 every hour

Comments (1)

  1. S says:

    [Bad Eng.Sorry.]

    Non US users, please add culture info to the next lines of demo:

               evt.Payload.Latitude = (double)Convert.ChangeType(split[LatitudeField], typeof(double), culture.NumberFormat);

               evt.Payload.Longitude = (double)Convert.ChangeType(split[LongitudeField], typeof(double), culture.NumberFormat);

               evt.Payload.Speed = (double)Convert.ChangeType(split[SpeedField], typeof(double), culture.NumberFormat);

Skip to main content