SlideShare a Scribd company logo
WHAT’S BEHIND OF
             WEB MAPS?


Daniel Puiu
TeamNet International   10th of November 2012
                                            1
WHAT WE DO AT WORK




                     2
WHAT THEY DO AT WORK




                       3
80 slides
AGENDA                                                             20 minutes
                                                              1 slide/15 seconds!
                 •Database                •Geodatabase
                              •SQL Server
            •Geometry                         •Map document
                        •Geography
                                             •Layer
        •Table     Store Data                       •Simbology
                                       •Create map
               •SQL         •Map                         •JSON
 World                                        •ESRI
                               •REST
    •Entity Framework                   •Geoprocessing •Graphics
 •Data                   GIS Services
       •Spatial Type                                         •Tools
                                         •GIS Server
                     •Web Services                     •Basemap
         •SOAP                                                            Demo
                                    •HTML5 •Dynamic Maps•Legend
                  •Silverlight
                                 Web Map APIs                      •Caching
                    •JavaScript                           Web Map Apps
                                          •Time
                                 •Flex
                                          aware
                                                                             4
•Database                 •Geodatabase
                              •SQL Server
            •Geometry                         •Map document
                        •Geography
                                             •Layer
       •Table      Store Data                       •Simbology
                                       •Create map
               •SQL         •Map                         •JSON
World                                         •ESRI
                               •REST
    •Entity Framework                   •Geoprocessing •Graphics
•Data                    Map Services
      •Spatial Type                                          •Tools
                                         •GIS Server
                     •Web Services                     •Basemap           Demo
        •SOAP
                                    •HTML5 •Dynamic Maps•Legend
                  •Silverlight
                                 Web Map APIs                      •Caching
                    •JavaScript                           Web Map Apps
                                          •Time
                                 •Flex
                                          aware
                                                                            5
HOW TO STORE A DAM?




                      6
STORING A DAM USING A TABLE

      Id   Name          Material   Height
     78    Suhaia        Stone        5
     79    Vlasin        Stone        7
     80    Vieru 2       Earth        5
     81    Vieru 3       Earth        7
     82    Magura        Earth        2
     83    Putineiu      Other        4
     84    Rojistea      Wood         8
     85    Cascioarele   Wood         4
     86    Luncavita     Unknown      4
     87    Catuna        Stone       10
     88    Malina        Stone        8
                                             7
HOW TO STORE DAM‘S LOCATION?

    Id   Name          Material   Height   Location
    78   Suhaia        Stone        5         ?
    79   Vlasin        Stone        7         ?
    80   Vieru 2       Earth        5         ?
    81   Vieru 3       Earth        7         ?
    82   Magura        Earth        2         ?
    83   Putineiu      Other        4         ?
    84   Rojistea      Wood         8         ?
    85   Cascioarele   Wood         4         ?
    86   Luncavita     Unknown      4         ?
    87   Catuna        Stone       10         ?
    88   Malina        Stone        8         ?
                                                      8
USING DESCRIPTIVE WORDS ...
 Id   Name        Material   Height         Location
 78   Suhaia      Stone        5         In Valea Adanca
 79   Vlasin      Stone        7       Near Schitu locality
 80   Vieru 2     Earth        5      500 meters from Mitoc
 81   Vieru 3     Earth        7      On the river Parapanca
 82   Magura      Earth        2         3 km upstream
 83   Putineiu    Other        4                ...
 84   Rojistea    Wood         8                ...
 85   Cascioarele Wood         4                ...
 86   Luncavita   Unknown      4                ...
 87   Catuna      Stone       10                ...
 88   Malina      Stone        8                ...
                                                               9
ASSUMING A DAM IS JUST A POINT




                                      X, Y
                                 A point

       A dam




                                             10
USING COORDINATES

  Id   Name        Material   Height     X        Y
  78 Suhaia        Stone        5      516370   246708
  79 Vlasin        Stone        7      569414   289438
  80 Vieru 2       Earth        5      561804   260952
  81 Vieru 3       Earth        7      562885   261682
  82 Magura        Earth        2      606078   293024
  83 Putineiu      Other        4      562633   265486
  84 Rojistea      Wood         8      532814   248998
  85 Cascioarele   Wood         4      618303   294620
  86 Luncavita     Unknown      4      757719   424369
  87 Catuna        Stone       10      734465   438727
  88 Malina        Stone        8      730292   441636
                                                         11
WHAT ABOUT A RIVER?




                      12
A RIVER HAS A COLLECTION OF POINTS


                                           X1, Y1
                             X3, Y3
                                        X2, Y2
                                  X4, Y4




        A river

                                                 Xn, Yn
                              A collection of points
                                                          13
UNLIKELY TO STORE IT LIKE THIS

  Id   Name      Affluent   Rank    X1     Y1     X2     Y2       XN      YN


  177 Budac      Sieu        3     469490 615859 469451 615925 … 469442 615935


  178 Bolovan    Budac       4     541236 249243 541241 249234 … 543921 238388


  179 Budusel    Budac       4       …     …      …      …    …    ...    …


  180 Petris     Budusel     5       …     …      …      …    …    …      …


  181 Ses        Budac       4       …     …      …      …    …    …      …


  182 Budus      Budac       4       …     …      …      …    …    …      …


  183 Bistrita   Sieu        3       …     …      …      …    …    …      …

                                                                               14
USING ONE-TO-MANY RELATIONSHIPS


  Id   Name      Affluent Rank
  177 Budac      Sieu      3
  178 Bolovan Budac        4
  179 Budusel Budac        4     Id   RiverId     X        Y
                                 45   181       469490 615859
  180 Petris     Budusel   5
                                 46   181       469451 615925
  181 Ses        Budac     4     48   181       469442 615935
  182 Budus      Budac     4     …    …           …        …
  183 Bistrita   Sieu      3     762 181        459806 615809
          Rivers table           763 181        459770 615779

                                            RiverPoints table
                                                                15
WHAT DO YOU SAY ABOUT GREECE?




                                16
WE HAVE SOME ISSUES WITH GREECE



                                       •X1, Y1
                                             •X20, Y20
                                                •X30, Y30
                                                  •X40, Y
                                             •X50, Y50 40
                                                      •X1, Y1


     Greece Islands                                    •X1, Y1
                                                     •X10, Y10
                                                •X
                                          •X30, Y3020, Y20
                                •X50, •X40, Y40
                                      Y60
                      A collection of collection of points
                                                             17
THE SOLUTION




 Spatial Type is a type that stores information
 about physical location and the shape of
 geometric objects.




                                                  18
STORING A POLYLINE USING SPATIAL TYPE
  Id Name      Affluent Ranking                           Shape

  177 Budac    Sieu             3                            …

  178 Bolovan Budac             4                            …

  179 Budusel Budac             4                            …
                                       0x00000000010497000000401CEBA237E811414072F9CFE
                                       49D16414039B44847E8114180E61D67F39C164140DD244
  180 Petris   Budusel          5      63AE8114100AC1C9A229B16418010583959E81141C0AAC
                                               FD5BC99164100849E0DC2E81141C054


                                                            ToString()


                         LINESTRING (497847 247498, 498003 247570, 498158 247627,
                         498362 247664, 498670 247693, 499097 247690, 499426 247637,
                         499796 247594, 500159 247452, 500338 247367 , … , 501521
                         245798)

                                                                                       19
GEOMETRY VS. GEOGRAPHY
           Geometry                      Geography




      Euclidian (flat-earth)       Ellipsoidal (round-earth)
           Stereo 70                       WGS84
          X: 488621            Longitude: 24° 51' 20.55''
          Y: 386736             Latitude: 44° 58' 50.16''


                                                               20
SQL

 -- Create table
 CREATE TABLE Lakes(
         Id int IDENTITY (1,1),
         Name nvarchar(50),
         Location geometry)


 -- Insert lake
 INSERT INTO Lakes(Name, Location) VALUES(
         'Morun',
         geometry::STGeomFromText(
                  'POLYGON ((0 0, 150 0, 150 150, 0 150, 0 0))', 0))


 -- Update lake geometry
 UPDATE Lakes
 SET Location = geometry::STGeomFromText(
         'POLYGON ((0 0, 150 0, 150 150, 75 200, 0 150, 0 0))', 0)
 WHERE Name = 'Morun'

                                                                       21
SHOW THE RESULTS

 -- Get the lake
 SELECT Id, Name, Location FROM LAKES WHERE Name = ‘Morun’



                                    Spatial results




     Results




                                                             22
SQL SERVER MANAGEMENT STUDIO
 1. The table                 3. The results




          2. The query
 SELECT SHAPE FROM COUNTIES

                                               23
GEOMETRY METHODS

 -- Get hotel’s location
 DECLARE @hotelLocation geometry
 SET @hotelLocation = (SELECT hotel.Address
                       FROM Hotels as hotel
                       WHERE hotel.Id = 2)


 -- Get   all lakes within 20 km
 SELECT   Name,Location
 FROM     Lakes
 WHERE    (Location.STDistance(@hotelLocation) <= 20000


                Calculate distance
            between a lake and a hotel



                                                          24
ENTITY FRAMEWORK 5.0

 Hotel class                           Lake class
 public class Hotel
                                       public class Lake
 {
                                       {
     public Int32 Id;
                                           public Int32 Id;
     public String Name;
                                           public String Name;
     public Int32 NumberOfRooms;
                                           public DBGeometry Location;
     public DBGeometry Location;
                                       }
 }

 Query using LINQ
 // Get hotel's location
 var hotel = db.Hotels.Single(hotel => hotel.Id == 2);

 // Get all lakes within 20 km range
 var lakes = from lake in db.Lakes
 where lake.Location.Distance(hotel.Location) <= 20000
 select lake

                                                                         25
HOW TO STORE A CAR ACCIDENT POSITION?




                                        26
LINEAR REFERENCING

                     Id   RoadId Description      M
                     45   234    Big accident     40.5
                     46   462    …                234
                     48   563    …                100
                     …    …      …                …
                                            Accidents table
        Km 46




                                          Road E 85



                                                         27
HOW TO STORE ROAD SPEED LIMITS?




                                  28
DYNAMIC SEGMENTATION


              Km 0                         Km 21                                 Km 44
                          2 lines                            4 lines
  Lanes
                                Km 17                         Km 30
                      Asphalt                 Concrete                 Asphalt
Material

                 Good               Fair             Poor              Good
 Quality

                     50 km/h        60 km/h                70 km/h       50 km/h
  Speed


       Km 0          Km 10          Km 20          Km 30         Km 40            Km 50

                                                                                         29
MORE OPEN QUESTIONS


   • Q: What was the quality of Iasi-Botosani road from 2000
     until now?
   • A: Archiving


   • Q: How can we ensure that there are no gaps between
     Iasi and Vaslui counties?
   • A: Spatial Data Integrity


   • Q: How do we reach to National Arena from Iasi?
   • A: Network Analyst

                                                               30
FOR ALL THE REST THERE‘S GEODATABASE

   A geodatabase is a database with extensions for storing,
   querying, and manipulating geographic information.




            System Tables                       User Defined
                                                   Tables


                                                               31
•Database                 •Geodatabase
                              •SQL Server
            •Geometry                         •Map document
                        •Geography
                                             •Layer
       •Table      Store Data                       •Simbology
                                       •Create map
               •SQL         •Map                         •JSON
World                                         •ESRI
                               •REST
    •Entity Framework                   •Geoprocessing •Graphics
•Data                    Map Services
      •Spatial Type                                          •Tools
                                         •GIS Server
                     •Web Services                     •Basemap           Demo
        •SOAP
                                    •HTML5 •Dynamic Maps•Legend
                  •Silverlight
                                 Web Map APIs                      •Caching
                    •JavaScript                           Web Map Apps
                                          •Time
                                 •Flex
                                          aware
                                                                            32
WHAT IS A LAYER?




                              Id   Name   Attribute Shape

 A layer is a collection of   …    …      …        …
 spatial elements that        …    …      …        …
 share the same attributes,   …    …      …        …
 the same geometry type.
                              …    …      …        …




                                                            33
WHAT IS A LAYER?




 A layer is a collection of spatial
 elements that share the same
 attributes, the same geometry
 type and share symbols,
 etiquettes and scales.




                                      34
SIMPLE SIMBOLOGY


                   A blue color point.




                                         35
GRAPHIC SYMBOLS


                  An icon representing
                        a point.




                                         36
QUANTITATIVE SIMBOLOGY



                          Points having radius
                         proportionally with the
                                volume.




                                                   37
CATEGORY SYMBOLS



                   Counties symbolized
                        by area.




                                         38
TEXT SYMBOLS



               Labels for cities and
                      rivers.




                                       39
MAP DOCUMENT

                   Data Source



                     Layers



                   Simbology
    Map Document

                     Scales



                     Fields

                                 40
ARCGIS SERVER ARCHITECTURE


    Map              SOC
  Document

                        F
                                  SOM
                d
               SOC
                             s

    Data             GIS Server         Web Server


                                                     41
GIS SERVICES
       Geocode Services             Geoprocessing Services

            Finds address                  Provides spatial
            locations.                     analysis and data
                                           processing services.


       Geometry Services             Network Analyst
            Provides geometric            Performs analysis
            calculation such as           such as routing,
            distance, buffer etc.         closest facility etc.


       Feature Services               Mapping Services

            Serves features and            Serves cached and
            simbology.                     dynamic maps.

                                                                  42
•Database                 •Geodatabase
                              •SQL Server
            •Geometry                         •Map document
                        •Geography
                                             •Layer
       •Table      Store Data                       •Simbology
                                       •Create map
               •SQL         •Map                         •JSON
World                                         •ESRI
                               •REST
    •Entity Framework                   •Geoprocessing •Graphics
•Data                    Map Services
      •Spatial Type                                          •Tools
                                         •GIS Server
                     •Web Services                     •Basemap           Demo
        •SOAP
                                    •HTML5 •Dynamic Maps•Legend
                  •Silverlight
                                 Web Map APIs                      •Caching
                    •JavaScript                          Web Map Apps
                                          •Time
                                 •Flex
                                          aware
                                                                            43
HOW DO I GET DATA INTO MY APP?


 OGC
 Open Geospatial Consortium



 SOAP
 Simple Object Acces Protocol



 REST
 REpresentational State Transfer
                                   44
GIS SERVICES

Service          Resource URL
Map Services     http://tni-iasi-atlas/ArcGIS/rest/services/Basemap/MapServer

Layer Services   http://tni-iasi-atlas/ArcGIS/rest/services/Basemap/MapServer/34

Geometry         http://tni-iasi-atlas/ArcGIS/rest/services/Geometry/GeometryServer
Services
Geoprocessing    http://tni-iasi-atlas/ArcGIS/rest/services/GiurgiuShortRoute/GPServer
Services
Network          http://tni-iasi-atlas/ArcGIS/rest/services/GiurgiuShortRoute/NAServer
Analist
Services
                          All GIS services are
                         exposed as resources.

                                                                                    45
GIS SERVICES
Service          Operation Operation URL
Map Services     Export     http://.../rest/services/Basemap/MapServer/export
                 Map
Layer Services   Query      http://.../rest/services/Basemap/MapServer/35/query

Geometry         Distance   http://.../services/Geometry/GeometryServer/distance
Services
Geoprocessing Submit        http://.../services/GPServer/GiurgiuShortRoute/submitJob
Services      Job
Network          Solve      http://.../services/GiurgiuShortRoute/NAServer/Route/solve
Analist          Route
Services
                            Some services have
                               operations.
REST SAMPLE

    http://tni-iasi-atlas/arcgis/rest/services/Species/MapServer/export


          Input Parameters                                     Output
Bbox
           46410,220928,1060872,761802
bboxSR
           PROJCS[”Stereo_70”]
dpi
           96
f
           image
format
           png8
size
         1908,932
Transparent
         true



                                                                          47
WHAT DOES A WEB MAPPING API OFFER?



                          Easily integrate maps
                            into web pages.




                                                  48
HOW DO I GET DATA INTO MY BROWSER?
 ArcGIS Mapping for SharePoint      ArcGIS API for Flex




   ArcGIS API for JavaScript     ArcGIS API for Silverlight




                                                              49
WHY JAVASCRIPT API?


             map.addLayer(baseLayer)


                       vs.



  http://sampleserver1.arcgisonline.com/ArcGIS/
  rest/services/Specialty/ESRI_StateCityHighway
  _USA/MapServer/export?bbox=-127.8,15.4,-
  63.5,60.5&f=pjson


                                                  50
HELLO WORLD ... THE CODE

 //JavaScript ...
 var map = new esri.Map("map");


 //Add the topographic layer to the map
 var baseLayer = new
      esri.layers.ArcGISTiledMapServiceLayer("http://...");

 map.addLayer(baseLayer);


 <-- HTML ... >
 <div id="map" style="…">
        <div style="…">Hello<div>
 </div>



                                                              51
HELLO WORLD ... THE RESULT




                             52
•Database                •Geodatabase
                             •SQL Server
           •Geometry                         •Map document
                       •Geography
                                            •Layer
       •Table     Store Data                       •Simbology
                                      •Create map
              •SQL         •Map                         •JSON
World                                        •ESRI
                              •REST
   •Entity Framework                   •Geoprocessing •Graphics
•Data                   Map Services
      •Spatial Type                                         •Tools
                                        •GIS Server
                    •Web Services                     •Basemap           Demo
        •SOAP
                                   •HTML5 •Dynamic Maps•Legend
                 •Silverlight
                                Web Map APIs                      •Caching
                   •JavaScript                          Web Map Apps
                                         •Time
                                •Flex
                                         aware
                                                                           53
WHAT IS A WEB MAP APPLICATION?




     1 One or more map services

     2 Integrated into a web application

     3 That users interact with

     4 To accomplish meaningful tasks




                                           54
WHAT A WEB MAP APPLICATION IS NOT?




                                     55
WHAT MAKES WEB MAP APP TO BE GREAT?



     1 Fast

     2 Up to date

     3 Informative and useful

     4 Easy to use and understand

     5 Great cartography and multi scale



                                           56
TWO TYPES OF DATA ORGANIZATION

            Basemaps                      Operational Layers

   Geographic frame of reference      Show a focused item of interest
             Static data                       Editable data
  Reusable in multiple applications   Displayed on top of a basemap




                                                                        57
MAP TYPES

            Dynamic
             maps
                       Client
                      graphics




   Cached
    tiles




                                 58
TILE CACHING


           File
         System
                   Browser

                              The server generates
                              and stores the whole
                             map at different scales.




  GIS Server      Web Server
                                                  59
WHAT YOU SEE


               First level of
               zoom in the
                 browser




                                60
IS NOT WHAT YOU GET

                      First level of
                      zoom on the
                         server




                                       61
IS NOT WHAT YOU GET

                      Second level of
                       zoom on the
                          server




                                        62
WHAT TO CACHE?

                                 National
                                Geographic
  Basemaps                        Map




                                             Lakes Map
  Don’t change often



                                                      Sandy
                                                     Hurricane
          High traffic volume

                                                                 63
CACHING PRO‘S AND CON‘S



     1 Performance

     2 Quality

     3 Large storage

     4 Generation time

     5 Out of date



                          64
DYNAMIC MAPPING


                 Map
  Data         Document
                           Browser

                                        Server generates
                                       images on the fly.




  GIS Server              Web Server
                                                            65
WHAT FOR TO USE?

                                Road Traffic
                                   Map
  Real-time data



                                           Forecast Map
  Frequently changing data



                                                     Heat Map
           Complex geometries

                                                                66
DYNAMIC MAPS PRO‘S AND CON‘S




     1   Reflects the actual data

     2   No need to maintain caches

     3   Slower than caching

     4   Need for server resources

     5   Trade quality for performance


                                         67
CLIENT SIDE GRAPHICS


                 Map
  Data         Document
                                    Browser


                                                The browser
                                     JSON
                                                draws maps.


                      ArcObjects
                         API


  GIS Server                       Web Server
                                                          68
WHAT TO USE FOR?

                                Parcel Editor
  Web editing




                                           Popup Info
    Interactive maps



                                                        Parcel Query
                   Query data

                                                                       69
GRAPHICS PRO‘S AND CON‘S


     1   Nice user experience

     2   Off-load the work from the server

     3   The “pressure” is on the client

     4   Limited number of features

     5   Lower quality




                                             70
•Database                 •Geodatabase
                              •SQL Server
            •Geometry                         •Map document
                        •Geography
                                             •Layer
        •Table     Store Data                       •Simbology
                                       •Create map
               •SQL         •Map                         •JSON
World                                         •ESRI
                               •REST
     •Entity Framework                  •Geoprocessing •Graphics
•Data                    Map Services
       •Spatial Type                                         •Tools
                                         •GIS Server
                     •Web Services                     •Basemap           Demo
         •SOAP
                                    •HTML5 •Dynamic Maps•Legend
                  •Silverlight
                                 Web Map APIs                      •Caching
                    •JavaScript                           Web Map Apps
                                          •Time
                                 •Flex
                                          aware
                                                                            71
WATER INTEGRATED MANAGEMENT SYSTEM




                                     72
DANUBE DELTA MANAGEMENT




                          73
ROADS MANAGEMENT




                   74
WHAT IS COMMON?




                  Map

                        75
WHAT IS COMMON?




         Map         Legend




         Grid     Table of content

                                     76
WHAT IS COMMON?



       Map
                        Legend         Measure tool




       Grid         Table of content     Print tool




  Basemap gallery        Search        Spatial filter
                                                        77
78
Thank you!


Daniel Puiu
TeamNet International        10th of November 2012
                                                79
Diamond Sponsors




Platinum Sponsors                    Gold Sponsors


Training Partners   Media Partners          Other Partners




                                                             80

More Related Content

More from Codecamp Romania

2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
Codecamp Romania
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
Codecamp Romania
 
The case for continuous delivery
The case for continuous deliveryThe case for continuous delivery
The case for continuous delivery
Codecamp Romania
 
Stefan stolniceanu spritekit, 2 d or not 2d
Stefan stolniceanu   spritekit, 2 d or not 2dStefan stolniceanu   spritekit, 2 d or not 2d
Stefan stolniceanu spritekit, 2 d or not 2d
Codecamp Romania
 
Sizing epics tales from an agile kingdom
Sizing epics   tales from an agile kingdomSizing epics   tales from an agile kingdom
Sizing epics tales from an agile kingdom
Codecamp Romania
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
Codecamp Romania
 
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Codecamp Romania
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflow
Codecamp Romania
 
Material design screen transitions in android
Material design screen transitions in androidMaterial design screen transitions in android
Material design screen transitions in android
Codecamp Romania
 
Kickstart your own freelancing career
Kickstart your own freelancing careerKickstart your own freelancing career
Kickstart your own freelancing career
Codecamp Romania
 
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu   the soft stuff is the hard stuff. the agile soft skills toolkitIonut grecu   the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Codecamp Romania
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
Codecamp Romania
 
Diana antohi me against myself or how to fail and move forward
Diana antohi   me against myself  or how to fail  and move forwardDiana antohi   me against myself  or how to fail  and move forward
Diana antohi me against myself or how to fail and move forward
Codecamp Romania
 
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp Romania
 
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Code camp iasi   silviu niculita - machine learning for mere mortals with azu...Code camp iasi   silviu niculita - machine learning for mere mortals with azu...
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Codecamp Romania
 
About leadership
About leadershipAbout leadership
About leadership
Codecamp Romania
 
Business analysis techniques exercise your 6-pack
Business analysis techniques   exercise your 6-packBusiness analysis techniques   exercise your 6-pack
Business analysis techniques exercise your 6-pack
Codecamp Romania
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pega
Codecamp Romania
 
Andrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabaseAndrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabase
Codecamp Romania
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
Codecamp Romania
 

More from Codecamp Romania (20)

2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
 
The case for continuous delivery
The case for continuous deliveryThe case for continuous delivery
The case for continuous delivery
 
Stefan stolniceanu spritekit, 2 d or not 2d
Stefan stolniceanu   spritekit, 2 d or not 2dStefan stolniceanu   spritekit, 2 d or not 2d
Stefan stolniceanu spritekit, 2 d or not 2d
 
Sizing epics tales from an agile kingdom
Sizing epics   tales from an agile kingdomSizing epics   tales from an agile kingdom
Sizing epics tales from an agile kingdom
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
 
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflow
 
Material design screen transitions in android
Material design screen transitions in androidMaterial design screen transitions in android
Material design screen transitions in android
 
Kickstart your own freelancing career
Kickstart your own freelancing careerKickstart your own freelancing career
Kickstart your own freelancing career
 
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu   the soft stuff is the hard stuff. the agile soft skills toolkitIonut grecu   the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
 
Diana antohi me against myself or how to fail and move forward
Diana antohi   me against myself  or how to fail  and move forwardDiana antohi   me against myself  or how to fail  and move forward
Diana antohi me against myself or how to fail and move forward
 
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1
 
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Code camp iasi   silviu niculita - machine learning for mere mortals with azu...Code camp iasi   silviu niculita - machine learning for mere mortals with azu...
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
 
About leadership
About leadershipAbout leadership
About leadership
 
Business analysis techniques exercise your 6-pack
Business analysis techniques   exercise your 6-packBusiness analysis techniques   exercise your 6-pack
Business analysis techniques exercise your 6-pack
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pega
 
Andrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabaseAndrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabase
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
 

Daniel Puiu - What's behind of web maps

  • 1. WHAT’S BEHIND OF WEB MAPS? Daniel Puiu TeamNet International 10th of November 2012 1
  • 2. WHAT WE DO AT WORK 2
  • 3. WHAT THEY DO AT WORK 3
  • 4. 80 slides AGENDA 20 minutes 1 slide/15 seconds! •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data GIS Services •Spatial Type •Tools •GIS Server •Web Services •Basemap •SOAP Demo •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 4
  • 5. •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data Map Services •Spatial Type •Tools •GIS Server •Web Services •Basemap Demo •SOAP •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 5
  • 6. HOW TO STORE A DAM? 6
  • 7. STORING A DAM USING A TABLE Id Name Material Height 78 Suhaia Stone 5 79 Vlasin Stone 7 80 Vieru 2 Earth 5 81 Vieru 3 Earth 7 82 Magura Earth 2 83 Putineiu Other 4 84 Rojistea Wood 8 85 Cascioarele Wood 4 86 Luncavita Unknown 4 87 Catuna Stone 10 88 Malina Stone 8 7
  • 8. HOW TO STORE DAM‘S LOCATION? Id Name Material Height Location 78 Suhaia Stone 5 ? 79 Vlasin Stone 7 ? 80 Vieru 2 Earth 5 ? 81 Vieru 3 Earth 7 ? 82 Magura Earth 2 ? 83 Putineiu Other 4 ? 84 Rojistea Wood 8 ? 85 Cascioarele Wood 4 ? 86 Luncavita Unknown 4 ? 87 Catuna Stone 10 ? 88 Malina Stone 8 ? 8
  • 9. USING DESCRIPTIVE WORDS ... Id Name Material Height Location 78 Suhaia Stone 5 In Valea Adanca 79 Vlasin Stone 7 Near Schitu locality 80 Vieru 2 Earth 5 500 meters from Mitoc 81 Vieru 3 Earth 7 On the river Parapanca 82 Magura Earth 2 3 km upstream 83 Putineiu Other 4 ... 84 Rojistea Wood 8 ... 85 Cascioarele Wood 4 ... 86 Luncavita Unknown 4 ... 87 Catuna Stone 10 ... 88 Malina Stone 8 ... 9
  • 10. ASSUMING A DAM IS JUST A POINT X, Y A point A dam 10
  • 11. USING COORDINATES Id Name Material Height X Y 78 Suhaia Stone 5 516370 246708 79 Vlasin Stone 7 569414 289438 80 Vieru 2 Earth 5 561804 260952 81 Vieru 3 Earth 7 562885 261682 82 Magura Earth 2 606078 293024 83 Putineiu Other 4 562633 265486 84 Rojistea Wood 8 532814 248998 85 Cascioarele Wood 4 618303 294620 86 Luncavita Unknown 4 757719 424369 87 Catuna Stone 10 734465 438727 88 Malina Stone 8 730292 441636 11
  • 12. WHAT ABOUT A RIVER? 12
  • 13. A RIVER HAS A COLLECTION OF POINTS X1, Y1 X3, Y3 X2, Y2 X4, Y4 A river Xn, Yn A collection of points 13
  • 14. UNLIKELY TO STORE IT LIKE THIS Id Name Affluent Rank X1 Y1 X2 Y2 XN YN 177 Budac Sieu 3 469490 615859 469451 615925 … 469442 615935 178 Bolovan Budac 4 541236 249243 541241 249234 … 543921 238388 179 Budusel Budac 4 … … … … … ... … 180 Petris Budusel 5 … … … … … … … 181 Ses Budac 4 … … … … … … … 182 Budus Budac 4 … … … … … … … 183 Bistrita Sieu 3 … … … … … … … 14
  • 15. USING ONE-TO-MANY RELATIONSHIPS Id Name Affluent Rank 177 Budac Sieu 3 178 Bolovan Budac 4 179 Budusel Budac 4 Id RiverId X Y 45 181 469490 615859 180 Petris Budusel 5 46 181 469451 615925 181 Ses Budac 4 48 181 469442 615935 182 Budus Budac 4 … … … … 183 Bistrita Sieu 3 762 181 459806 615809 Rivers table 763 181 459770 615779 RiverPoints table 15
  • 16. WHAT DO YOU SAY ABOUT GREECE? 16
  • 17. WE HAVE SOME ISSUES WITH GREECE •X1, Y1 •X20, Y20 •X30, Y30 •X40, Y •X50, Y50 40 •X1, Y1 Greece Islands •X1, Y1 •X10, Y10 •X •X30, Y3020, Y20 •X50, •X40, Y40 Y60 A collection of collection of points 17
  • 18. THE SOLUTION Spatial Type is a type that stores information about physical location and the shape of geometric objects. 18
  • 19. STORING A POLYLINE USING SPATIAL TYPE Id Name Affluent Ranking Shape 177 Budac Sieu 3 … 178 Bolovan Budac 4 … 179 Budusel Budac 4 … 0x00000000010497000000401CEBA237E811414072F9CFE 49D16414039B44847E8114180E61D67F39C164140DD244 180 Petris Budusel 5 63AE8114100AC1C9A229B16418010583959E81141C0AAC FD5BC99164100849E0DC2E81141C054 ToString() LINESTRING (497847 247498, 498003 247570, 498158 247627, 498362 247664, 498670 247693, 499097 247690, 499426 247637, 499796 247594, 500159 247452, 500338 247367 , … , 501521 245798) 19
  • 20. GEOMETRY VS. GEOGRAPHY Geometry Geography Euclidian (flat-earth) Ellipsoidal (round-earth) Stereo 70 WGS84 X: 488621 Longitude: 24° 51' 20.55'' Y: 386736 Latitude: 44° 58' 50.16'' 20
  • 21. SQL -- Create table CREATE TABLE Lakes( Id int IDENTITY (1,1), Name nvarchar(50), Location geometry) -- Insert lake INSERT INTO Lakes(Name, Location) VALUES( 'Morun', geometry::STGeomFromText( 'POLYGON ((0 0, 150 0, 150 150, 0 150, 0 0))', 0)) -- Update lake geometry UPDATE Lakes SET Location = geometry::STGeomFromText( 'POLYGON ((0 0, 150 0, 150 150, 75 200, 0 150, 0 0))', 0) WHERE Name = 'Morun' 21
  • 22. SHOW THE RESULTS -- Get the lake SELECT Id, Name, Location FROM LAKES WHERE Name = ‘Morun’ Spatial results Results 22
  • 23. SQL SERVER MANAGEMENT STUDIO 1. The table 3. The results 2. The query SELECT SHAPE FROM COUNTIES 23
  • 24. GEOMETRY METHODS -- Get hotel’s location DECLARE @hotelLocation geometry SET @hotelLocation = (SELECT hotel.Address FROM Hotels as hotel WHERE hotel.Id = 2) -- Get all lakes within 20 km SELECT Name,Location FROM Lakes WHERE (Location.STDistance(@hotelLocation) <= 20000 Calculate distance between a lake and a hotel 24
  • 25. ENTITY FRAMEWORK 5.0 Hotel class Lake class public class Hotel public class Lake { { public Int32 Id; public Int32 Id; public String Name; public String Name; public Int32 NumberOfRooms; public DBGeometry Location; public DBGeometry Location; } } Query using LINQ // Get hotel's location var hotel = db.Hotels.Single(hotel => hotel.Id == 2); // Get all lakes within 20 km range var lakes = from lake in db.Lakes where lake.Location.Distance(hotel.Location) <= 20000 select lake 25
  • 26. HOW TO STORE A CAR ACCIDENT POSITION? 26
  • 27. LINEAR REFERENCING Id RoadId Description M 45 234 Big accident 40.5 46 462 … 234 48 563 … 100 … … … … Accidents table Km 46 Road E 85 27
  • 28. HOW TO STORE ROAD SPEED LIMITS? 28
  • 29. DYNAMIC SEGMENTATION Km 0 Km 21 Km 44 2 lines 4 lines Lanes Km 17 Km 30 Asphalt Concrete Asphalt Material Good Fair Poor Good Quality 50 km/h 60 km/h 70 km/h 50 km/h Speed Km 0 Km 10 Km 20 Km 30 Km 40 Km 50 29
  • 30. MORE OPEN QUESTIONS • Q: What was the quality of Iasi-Botosani road from 2000 until now? • A: Archiving • Q: How can we ensure that there are no gaps between Iasi and Vaslui counties? • A: Spatial Data Integrity • Q: How do we reach to National Arena from Iasi? • A: Network Analyst 30
  • 31. FOR ALL THE REST THERE‘S GEODATABASE A geodatabase is a database with extensions for storing, querying, and manipulating geographic information. System Tables User Defined Tables 31
  • 32. •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data Map Services •Spatial Type •Tools •GIS Server •Web Services •Basemap Demo •SOAP •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 32
  • 33. WHAT IS A LAYER? Id Name Attribute Shape A layer is a collection of … … … … spatial elements that … … … … share the same attributes, … … … … the same geometry type. … … … … 33
  • 34. WHAT IS A LAYER? A layer is a collection of spatial elements that share the same attributes, the same geometry type and share symbols, etiquettes and scales. 34
  • 35. SIMPLE SIMBOLOGY A blue color point. 35
  • 36. GRAPHIC SYMBOLS An icon representing a point. 36
  • 37. QUANTITATIVE SIMBOLOGY Points having radius proportionally with the volume. 37
  • 38. CATEGORY SYMBOLS Counties symbolized by area. 38
  • 39. TEXT SYMBOLS Labels for cities and rivers. 39
  • 40. MAP DOCUMENT Data Source Layers Simbology Map Document Scales Fields 40
  • 41. ARCGIS SERVER ARCHITECTURE Map SOC Document F SOM d SOC s Data GIS Server Web Server 41
  • 42. GIS SERVICES Geocode Services Geoprocessing Services Finds address Provides spatial locations. analysis and data processing services. Geometry Services Network Analyst Provides geometric Performs analysis calculation such as such as routing, distance, buffer etc. closest facility etc. Feature Services Mapping Services Serves features and Serves cached and simbology. dynamic maps. 42
  • 43. •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data Map Services •Spatial Type •Tools •GIS Server •Web Services •Basemap Demo •SOAP •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 43
  • 44. HOW DO I GET DATA INTO MY APP? OGC Open Geospatial Consortium SOAP Simple Object Acces Protocol REST REpresentational State Transfer 44
  • 45. GIS SERVICES Service Resource URL Map Services http://tni-iasi-atlas/ArcGIS/rest/services/Basemap/MapServer Layer Services http://tni-iasi-atlas/ArcGIS/rest/services/Basemap/MapServer/34 Geometry http://tni-iasi-atlas/ArcGIS/rest/services/Geometry/GeometryServer Services Geoprocessing http://tni-iasi-atlas/ArcGIS/rest/services/GiurgiuShortRoute/GPServer Services Network http://tni-iasi-atlas/ArcGIS/rest/services/GiurgiuShortRoute/NAServer Analist Services All GIS services are exposed as resources. 45
  • 46. GIS SERVICES Service Operation Operation URL Map Services Export http://.../rest/services/Basemap/MapServer/export Map Layer Services Query http://.../rest/services/Basemap/MapServer/35/query Geometry Distance http://.../services/Geometry/GeometryServer/distance Services Geoprocessing Submit http://.../services/GPServer/GiurgiuShortRoute/submitJob Services Job Network Solve http://.../services/GiurgiuShortRoute/NAServer/Route/solve Analist Route Services Some services have operations.
  • 47. REST SAMPLE http://tni-iasi-atlas/arcgis/rest/services/Species/MapServer/export Input Parameters Output Bbox 46410,220928,1060872,761802 bboxSR PROJCS[”Stereo_70”] dpi 96 f image format png8 size 1908,932 Transparent true 47
  • 48. WHAT DOES A WEB MAPPING API OFFER? Easily integrate maps into web pages. 48
  • 49. HOW DO I GET DATA INTO MY BROWSER? ArcGIS Mapping for SharePoint ArcGIS API for Flex ArcGIS API for JavaScript ArcGIS API for Silverlight 49
  • 50. WHY JAVASCRIPT API? map.addLayer(baseLayer) vs. http://sampleserver1.arcgisonline.com/ArcGIS/ rest/services/Specialty/ESRI_StateCityHighway _USA/MapServer/export?bbox=-127.8,15.4,- 63.5,60.5&f=pjson 50
  • 51. HELLO WORLD ... THE CODE //JavaScript ... var map = new esri.Map("map"); //Add the topographic layer to the map var baseLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://..."); map.addLayer(baseLayer); <-- HTML ... > <div id="map" style="…"> <div style="…">Hello<div> </div> 51
  • 52. HELLO WORLD ... THE RESULT 52
  • 53. •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data Map Services •Spatial Type •Tools •GIS Server •Web Services •Basemap Demo •SOAP •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 53
  • 54. WHAT IS A WEB MAP APPLICATION? 1 One or more map services 2 Integrated into a web application 3 That users interact with 4 To accomplish meaningful tasks 54
  • 55. WHAT A WEB MAP APPLICATION IS NOT? 55
  • 56. WHAT MAKES WEB MAP APP TO BE GREAT? 1 Fast 2 Up to date 3 Informative and useful 4 Easy to use and understand 5 Great cartography and multi scale 56
  • 57. TWO TYPES OF DATA ORGANIZATION Basemaps Operational Layers Geographic frame of reference Show a focused item of interest Static data Editable data Reusable in multiple applications Displayed on top of a basemap 57
  • 58. MAP TYPES Dynamic maps Client graphics Cached tiles 58
  • 59. TILE CACHING File System Browser The server generates and stores the whole map at different scales. GIS Server Web Server 59
  • 60. WHAT YOU SEE First level of zoom in the browser 60
  • 61. IS NOT WHAT YOU GET First level of zoom on the server 61
  • 62. IS NOT WHAT YOU GET Second level of zoom on the server 62
  • 63. WHAT TO CACHE? National Geographic Basemaps Map Lakes Map Don’t change often Sandy Hurricane High traffic volume 63
  • 64. CACHING PRO‘S AND CON‘S 1 Performance 2 Quality 3 Large storage 4 Generation time 5 Out of date 64
  • 65. DYNAMIC MAPPING Map Data Document Browser Server generates images on the fly. GIS Server Web Server 65
  • 66. WHAT FOR TO USE? Road Traffic Map Real-time data Forecast Map Frequently changing data Heat Map Complex geometries 66
  • 67. DYNAMIC MAPS PRO‘S AND CON‘S 1 Reflects the actual data 2 No need to maintain caches 3 Slower than caching 4 Need for server resources 5 Trade quality for performance 67
  • 68. CLIENT SIDE GRAPHICS Map Data Document Browser The browser JSON draws maps. ArcObjects API GIS Server Web Server 68
  • 69. WHAT TO USE FOR? Parcel Editor Web editing Popup Info Interactive maps Parcel Query Query data 69
  • 70. GRAPHICS PRO‘S AND CON‘S 1 Nice user experience 2 Off-load the work from the server 3 The “pressure” is on the client 4 Limited number of features 5 Lower quality 70
  • 71. •Database •Geodatabase •SQL Server •Geometry •Map document •Geography •Layer •Table Store Data •Simbology •Create map •SQL •Map •JSON World •ESRI •REST •Entity Framework •Geoprocessing •Graphics •Data Map Services •Spatial Type •Tools •GIS Server •Web Services •Basemap Demo •SOAP •HTML5 •Dynamic Maps•Legend •Silverlight Web Map APIs •Caching •JavaScript Web Map Apps •Time •Flex aware 71
  • 75. WHAT IS COMMON? Map 75
  • 76. WHAT IS COMMON? Map Legend Grid Table of content 76
  • 77. WHAT IS COMMON? Map Legend Measure tool Grid Table of content Print tool Basemap gallery Search Spatial filter 77
  • 78. 78
  • 79. Thank you! Daniel Puiu TeamNet International 10th of November 2012 79
  • 80. Diamond Sponsors Platinum Sponsors Gold Sponsors Training Partners Media Partners Other Partners 80