make.opendata.ch




GeoAdmin API




Cédric Moullet
geo.admin.ch / swisstopo
Law

 Federal Act on Geoinformation (GeoIG), 1. Juli 2008
 Art. 1 Aim
 This Act has the aim of ensuring that geodata relating
 to the territory of the Swiss Confederation is made
 available for general use to the authorities of the
 Confederation, the cantons and communes, the private
 sector, the public and to academic and scientific
 institutions in a sustainable, up-to-date, rapid
 and easy manner, in the required quality and at a
 reasonable cost.
                                                   Picture by floofy
How
did we achieve this
Open Access
Open Standards
Open Source Software




Access not ownership is where
all content is going… (Kevin Kelly)
                                 Picture by ul_Marga
Architecture
API Architecture




                                                    mobile.geo.admin.ch
map.geo.admin.ch




                                  revision
                   globe

                           tsm



                                              are
                           API                                            Mobile API

                                             GeoServices

                                 Data (Tiles / Databases)
API Architecture: data

  • Tiles delivered with WMTS RESTFul: View
     • For vector
     • For raster
  • Database: Data access
     • For vector ;-)




http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#wmts
API Architecture:
                Geoservices
  • REST Services
    • Geocoding
    • Reverse geocoding
    • Feature
    • Profile
    • Height

http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#swisssearch-geocoding
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#swisssearch-reversegeocoding
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#feature
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#profile-json
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#height
API Architecture:
        API
<script type="text/javascript">
  function init() {
    var api = new GeoAdmin.API();
    api.createMap({
       div: "mymap1"
    });
  }
</script>
<body onload="init();">
 <div id="mymap1" style="width:500px;height:340px;border:1px solid grey;padding: 0 0 0
0;margin:10px !important;"></div>
 <script type="text/javascript" src="http://api.geo.admin.ch/loader.js"></script>
</body>


                                      GeoAdmin API

                                            GeoExt

               OpenLayers                                           ExtJS 3.4
API Architecture:
              Mobile API
Ext.setup({
       onReady: function(){
         m = new GeoAdminMobile.Map({handedness: 'right',
             contextinfo: true,
             featureinfo: true
         });

              var wmts2 = GeoAdmin.layers.buildLayerByName
                          ("ch.bfs.gebaeude_wohnungs_register",
                          {isBaseLayer: false});
              m.map.addLayers([wmts2]);
          }
    });


                                   GeoAdmin Mobile API

                                   GeoExt Mobile (GXM)

                   OpenLayers                                     Sencha Touch
Mashups ?
•   Permalink (WMS – KML (doc) - Address)
•   StreetView
•   GeoCoder
•   Routing
•   GoogleEarth
•   GPX
•   REST API
•   All the power of OpenLayers and ExtJS
http://map.geo.admin.ch/?Y=539275&X=182725&zoom=7&bgLayer=ch.swisstopo.pixelkarte-
farbe&layers=WMS%7C%7COrthophoto%20Yverdon%20banquise%20(22.02.2012)%7C%7Chttp://ogc.heig-vd.ch/mapserver/wms?%7C%7Cr-
pod_yverdon_banquise-2&layers_opacity=1
http://map.geo.admin.ch/?Y=541750&X=163000&zoom=5&bgLayer=ch.swisstopo.pixelkarte-
farbe&layers=KML%7C%7Chttps://docs.google.com/uc?id=0B_gmqEgDEiu5OGY0MDhmNmYtNTA5YS00MzVlLWI4ZWUtMzc1NzU4ZjU3NmM3&
layers_opacity=1&layers_visibility=true
http://www.geo.admin.ch/internet/geoportal/fr/commons/help/viewer_help.html#parsys_95922
http://map.geo.admin.ch/?swisssearch=berges%2037%20payerne
http://api.geo.admin.ch/main/wsgi/doc/build/api/streetview.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/geocoder.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/routing.html
http://sitn.ne.ch/
http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapiexamples4.html
http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html
http://www.openlayers.org/
Documentation

•     API Generator
•     API
•     Mobile API
•     FAQ




http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapigenerator.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapidoc.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/sdimapidoc.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/faq/index.html
Terms of use

• Terms of use
• GeoAdmin API is completely free and open
• All layers, except data of swisstopo web access WMTS,
  can be used freely. 25’000 MegaPixels are free.
• Domain registration is required (…one work week…)




http://www.geo.admin.ch/internet/geoportal/en/home/geoadmin/contact.html
http://api.geo.admin.ch/main/wsgi/doc/build/api/faq/index.html#which-layers-are-available
http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/products/services/web_services/webaccess.html
Tips and tricks

•    Develop with localhost
•    Use the mailing lists
•    Always test on IE ;-)
•    Use Google Chrome for mobile development (mobile=true)
•    You need the source code ? Just ask !

• All stations http://www.bav.admin.ch/dokumentation/publikationen/00475/01497/index.html?lang=fr
• Hiking trails
http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.vec25-
wander&layers_opacity=1&layers_visibility=true&lang=en

• Road network
http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.vec25-
strassennetz&layers_opacity=1&layers_visibility=true&lang=en

• Historical routes
http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.astra.ivs-
reg_loc&layers_opacity=1&layers_visibility=true&lang=en

• Traffic counting stations (see tooltips)
Mobile
Technology
Mobile App




Mobile Website
Why HTML5 ?

•   Not proprietary
•   No browser dependence
•   Advanced functions within browser
•   Standardardized API: Geolocation – Canvas –
    Appcache - etc..

HTML5 test: http://html5test.com/

http://www.html5rocks.com/
Perspective
Perspective ?

• 3D: WebGL
• 4D: Historical data view
• Offline
..and it works!
some awards:




                  Picture by swisstopo
Thank you for your attention
and welcome to www.geo.admin.ch

GeoAdmin API & Mobile API, 2012

  • 1.
  • 2.
    Law Federal Acton Geoinformation (GeoIG), 1. Juli 2008 Art. 1 Aim This Act has the aim of ensuring that geodata relating to the territory of the Swiss Confederation is made available for general use to the authorities of the Confederation, the cantons and communes, the private sector, the public and to academic and scientific institutions in a sustainable, up-to-date, rapid and easy manner, in the required quality and at a reasonable cost. Picture by floofy
  • 3.
  • 4.
    Open Access Open Standards OpenSource Software Access not ownership is where all content is going… (Kevin Kelly) Picture by ul_Marga
  • 5.
  • 6.
    API Architecture mobile.geo.admin.ch map.geo.admin.ch revision globe tsm are API Mobile API GeoServices Data (Tiles / Databases)
  • 7.
    API Architecture: data • Tiles delivered with WMTS RESTFul: View • For vector • For raster • Database: Data access • For vector ;-) http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#wmts
  • 8.
    API Architecture: Geoservices • REST Services • Geocoding • Reverse geocoding • Feature • Profile • Height http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#swisssearch-geocoding http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#swisssearch-reversegeocoding http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#feature http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#profile-json http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html#height
  • 9.
    API Architecture: API <script type="text/javascript"> function init() { var api = new GeoAdmin.API(); api.createMap({ div: "mymap1" }); } </script> <body onload="init();"> <div id="mymap1" style="width:500px;height:340px;border:1px solid grey;padding: 0 0 0 0;margin:10px !important;"></div> <script type="text/javascript" src="http://api.geo.admin.ch/loader.js"></script> </body> GeoAdmin API GeoExt OpenLayers ExtJS 3.4
  • 10.
    API Architecture: Mobile API Ext.setup({ onReady: function(){ m = new GeoAdminMobile.Map({handedness: 'right', contextinfo: true, featureinfo: true }); var wmts2 = GeoAdmin.layers.buildLayerByName ("ch.bfs.gebaeude_wohnungs_register", {isBaseLayer: false}); m.map.addLayers([wmts2]); } }); GeoAdmin Mobile API GeoExt Mobile (GXM) OpenLayers Sencha Touch
  • 11.
    Mashups ? • Permalink (WMS – KML (doc) - Address) • StreetView • GeoCoder • Routing • GoogleEarth • GPX • REST API • All the power of OpenLayers and ExtJS http://map.geo.admin.ch/?Y=539275&X=182725&zoom=7&bgLayer=ch.swisstopo.pixelkarte- farbe&layers=WMS%7C%7COrthophoto%20Yverdon%20banquise%20(22.02.2012)%7C%7Chttp://ogc.heig-vd.ch/mapserver/wms?%7C%7Cr- pod_yverdon_banquise-2&layers_opacity=1 http://map.geo.admin.ch/?Y=541750&X=163000&zoom=5&bgLayer=ch.swisstopo.pixelkarte- farbe&layers=KML%7C%7Chttps://docs.google.com/uc?id=0B_gmqEgDEiu5OGY0MDhmNmYtNTA5YS00MzVlLWI4ZWUtMzc1NzU4ZjU3NmM3& layers_opacity=1&layers_visibility=true http://www.geo.admin.ch/internet/geoportal/fr/commons/help/viewer_help.html#parsys_95922 http://map.geo.admin.ch/?swisssearch=berges%2037%20payerne http://api.geo.admin.ch/main/wsgi/doc/build/api/streetview.html http://api.geo.admin.ch/main/wsgi/doc/build/api/geocoder.html http://api.geo.admin.ch/main/wsgi/doc/build/api/routing.html http://sitn.ne.ch/ http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapiexamples4.html http://api.geo.admin.ch/main/wsgi/doc/build/services/sdiservices.html http://www.openlayers.org/
  • 12.
    Documentation • API Generator • API • Mobile API • FAQ http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapigenerator.html http://api.geo.admin.ch/main/wsgi/doc/build/api/sdiapidoc.html http://api.geo.admin.ch/main/wsgi/doc/build/api/sdimapidoc.html http://api.geo.admin.ch/main/wsgi/doc/build/api/faq/index.html
  • 13.
    Terms of use •Terms of use • GeoAdmin API is completely free and open • All layers, except data of swisstopo web access WMTS, can be used freely. 25’000 MegaPixels are free. • Domain registration is required (…one work week…) http://www.geo.admin.ch/internet/geoportal/en/home/geoadmin/contact.html http://api.geo.admin.ch/main/wsgi/doc/build/api/faq/index.html#which-layers-are-available http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/products/services/web_services/webaccess.html
  • 14.
    Tips and tricks • Develop with localhost • Use the mailing lists • Always test on IE ;-) • Use Google Chrome for mobile development (mobile=true) • You need the source code ? Just ask ! • All stations http://www.bav.admin.ch/dokumentation/publikationen/00475/01497/index.html?lang=fr • Hiking trails http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.vec25- wander&layers_opacity=1&layers_visibility=true&lang=en • Road network http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.vec25- strassennetz&layers_opacity=1&layers_visibility=true&lang=en • Historical routes http://map.geo.admin.ch/?Y=660000&X=190000&zoom=1&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.astra.ivs- reg_loc&layers_opacity=1&layers_visibility=true&lang=en • Traffic counting stations (see tooltips)
  • 15.
  • 16.
  • 17.
    Why HTML5 ? • Not proprietary • No browser dependence • Advanced functions within browser • Standardardized API: Geolocation – Canvas – Appcache - etc.. HTML5 test: http://html5test.com/ http://www.html5rocks.com/
  • 18.
  • 19.
    Perspective ? • 3D:WebGL • 4D: Historical data view • Offline
  • 21.
    ..and it works! someawards: Picture by swisstopo
  • 22.
    Thank you foryour attention and welcome to www.geo.admin.ch