INAC Online Hazards Database App

788 views

Published on

Indian and Northern Affairs Canada\'s online pipeline hazards web mapping application.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

INAC Online Hazards Database App

  1. 1. Presented by: Gerry James, President: Carteryx Consultants Inc. and Trevor Simpson, Geomatics Manager: BGC Engineering Inc. Integration of Multifaceted Web Based Technologies for Visual Terrain Modeling
  2. 2. History or “what were we trying to prove”? <ul><li>DIAND approached BGC in 2002 with a challenge </li></ul><ul><li>BGC had extensive experience in risk analysis and management </li></ul><ul><li>BGC was beginning to build a multi-disciplined Geomatics group. </li></ul>
  3. 3. <ul><li>Utilize proven GIS and database technologies </li></ul><ul><li>Easily accessible to varied audience </li></ul><ul><li>Intuitive tools and interface </li></ul><ul><li>Scaleable </li></ul>What were our goals?
  4. 4. <ul><li>Originally an engineering based project </li></ul><ul><li>Needed to provide a proof of concept </li></ul><ul><li>BGC not an ArcIMS shop at the time </li></ul><ul><li>Eventually INAC decided that they had to host the application </li></ul>Open Source?
  5. 5. <ul><li>DIAND/INAC </li></ul><ul><li>Industry groups </li></ul><ul><li>Aboriginal Groups </li></ul><ul><li>Other gov’t groups </li></ul><ul><li>Public </li></ul>So who were the players?
  6. 6. Web Mapping –User Interface <ul><li>Adobe(Macromedia) Flash: Thick Client </li></ul><ul><ul><li>rich user experience </li></ul></ul><ul><ul><ul><li>mouse-overs, menus, tools, transitions, etc. </li></ul></ul></ul><ul><ul><li>less round trips to server with lowered request </li></ul></ul><ul><ul><li>used for other components in website </li></ul></ul><ul><ul><ul><li>graphs, diagrams </li></ul></ul></ul><ul><ul><li>development team experience </li></ul></ul><ul><ul><li>supported by over 97% of desktops </li></ul></ul>
  7. 8. Web Mapping –Map Server <ul><li>move to ArcIMS </li></ul><ul><ul><li>MapServer Communication </li></ul></ul><ul><ul><ul><li>send: paramater string to executable </li></ul></ul></ul><ul><ul><ul><li>result: string to parse </li></ul></ul></ul><ul><ul><li>ArcIMS Communication </li></ul></ul><ul><ul><ul><li>send: post xml to map service (ArcXML) </li></ul></ul></ul><ul><ul><ul><li>result: xml </li></ul></ul></ul><ul><ul><li>Backend </li></ul></ul><ul><ul><ul><li>PostGIS/PostgreSQL to SDE/Oracle </li></ul></ul></ul><ul><ul><ul><li>ArcMap mxd map files </li></ul></ul></ul>
  8. 9. Web Mapping –Client/Server communication <ul><li>example: Map refresh (pan, zoom, layer change) </li></ul>Map Image: ArcXML Hot Spots: Form Post Client Flash XML() LoadVars() sendAndLoad() Server ArcIMS ASP
  9. 11. <ul><li>Interactively create a cross-section from on-screen user input </li></ul><ul><li>Provide post processing analytical tools. </li></ul>What was needed?
  10. 12. <ul><li>GeoSQL vs. script/code </li></ul><ul><li>PostGIS stored data and performed geo-processing function </li></ul><ul><li>New to ArcGIS Server </li></ul>Geo-processing engine conversion? Public Function xSect(ByVal x1 As String, ByVal y1 As String,_ ByVal x2 As String, ByVal y2 As String) As String Dim pGeomColl As IGeometryCollection = New ESRI.ArcGIS.Geometry.Polyline Dim pSegColl As ISegmentCollection = New ESRI.ArcGIS.Geometry.Path Dim pSecLine As ILine = New ESRI.ArcGIS.Geometry.Line Dim pSecPolyline As IPolyline Dim k As Integer = 0 Dim i As Integer Dim pntNew As New ESRI.ArcGIS.Geometry.Point() Dim pntNew2 As New ESRI.ArcGIS.Geometry.Point() On Error GoTo EH pntNew.X = x1 pntNew.Y = y1 pntNew2.X = x2 pntNew2.Y = y2 pSecLine.FromPoint = pntNew pSecLine.ToPoint = pntNew2 pSegColl = New ESRI.ArcGIS.Geometry.Path pSegColl.AddSegment(pSecLine) Dim tmStmp As String = Hour(Now) tmStmp = tmStmp & Minute(Now) tmStmp = tmStmp & Second(Now) vs.
  11. 13. <ul><li>GeoSQL vs. script/code </li></ul><ul><li>PostGIS stored data and performed geo-processing function </li></ul><ul><li>New to ArcGIS Server </li></ul>Geo-processing engine conversion? Geometry Table Attribute Table Spatial Ref. Table GeoProcessing Functions Feature Class Attribute Table VB.NET vs.
  12. 14. <ul><li>3 basic steps </li></ul><ul><ul><li>Create a route from a section line </li></ul></ul><ul><ul><li>Extract features along the line </li></ul></ul><ul><ul><li>Convert RAT to a single string for interpretation in Flash </li></ul></ul>So what is going on behind the scenes?
  13. 15. <ul><li>Array of points </li></ul><ul><li>Code behind </li></ul><ul><li>Parameter String </li></ul><ul><li>Create polyline </li></ul><ul><li>to route </li></ul><ul><li>extract points -> RAT </li></ul><ul><li>extract polygon -> RAT </li></ul><ul><li>back to ASP.NET </li></ul>Flash sends two points to ASP Call to code behind {Function or Sub in a VB application} Create Polyline pSecPolyline = pGeomColl lnFeature.Shape = pSecPolyline lnFeature.Value(2) = 1 lnFeature.Value(3) = 0 lnFeature.Value(4) = pSecPolyline.Length lnFeature.Store() Extract Feature Along Route pOutTable = pRouteLocOps.LocatePointFeatures(30, False, pEventProps, True, pOutRtDSN, &quot;&quot;, Nothing) Distance/Value string back to Flash 0,150,10,151,15,156….;0,Gv/T... Convert to Route With pRMLocName .RouteFeatureClassName = pTempName .RouteIDFieldName = &quot;ROUTEID&quot; .RouteMeasureUnit = ESRI.ArcGIS.esriSystem.esriUnits… .RouteIDIsUnique = True End With ASP.NET VB.NET
  14. 17. Conclusion <ul><li>Lessons Learned </li></ul><ul><ul><li>Extremely important to psuedo-code your application when dealing with complex, multi-variate, multi-dataset systems (we had previous code) </li></ul></ul><ul><ul><li>Comprehensive plan for data and geo-processing migration involving all key technical people </li></ul></ul><ul><ul><li>Feature extraction fast but initial testing of Spatial Analyst version much faster </li></ul></ul>
  15. 18. Conclusion <ul><li>Key Points </li></ul><ul><ul><li>Flash talks well to ESRI web technologies (ArcXML) </li></ul></ul><ul><ul><li>ArcGIS Server quite fast for geo-processing </li></ul></ul><ul><ul><li>Many ways to skin a cat (linear referencing of features vs. Spatial Analyst) </li></ul></ul>

×