School of Informatics Data Hack- Geo.pptx - GitHub

0 downloads 138 Views 5MB Size Report
Feb 18, 2013 - Build spa-al queries from user or sensor inputs. – Return results in several different formats: • kml
Geo  APIs    

February  18th  2013  

Smart  Data  Hack  

h3p://gogeo.blogs.edina.ac.uk

Overview  

• Maps  in  your  apps   • Going  beyond  just  showing  maps   • GeospaEal  data:  it  isn’t  just  maps  

h3p://gogeo.blogs.edina.ac.uk

Back  to  Google,  Bing  and  Here  (Nokia)   •  These  don’t  just  offer  map  data   •  Each  service  has  a  suite  of  APIs  for  JavaScript,   iOS,  Android,  HTML5  etc.   –  h3ps://developers.google.com/maps/   –  h3p://www.microsoS.com/maps/developers/ web.aspx   –  h3p://developer.here.net/en_GB    

h3p://gogeo.blogs.edina.ac.uk

Going  beyond  just  showing  maps  

Leaflet:  h3p://leafletjs.com/   •  Easy  to  use   •  Nice  default  graphics   •  Very  light  weight   •  Not  very  flexible   –  Only  uses  GeoJSON  or  NaEve  layers   –  You  may  need  to  parse  your  data  before  it  will  work  

h3p://gogeo.blogs.edina.ac.uk

Leaflet:  h3p://leafletjs.com/  

h3p://gogeo.blogs.edina.ac.uk

Leaflet:  h3p://leafletjs.com/  

h3p://gogeo.blogs.edina.ac.uk

OpenLayers:  h3p://openlayers.org/   •  Very  Powerful   •  Open  Source  with  a  huge  user  community   •  Much  more  flexible  for  reading  in  different   datasets   •  Not  as  easy  to  use   •  Defaults  seYngs  and  visuals  are  a  li3le  ugly   •  Larger  Codebase,  harder  to  streamline  for   mobile  devices  

h3p://gogeo.blogs.edina.ac.uk

OpenLayers:  h3p://openlayers.org/  

h3p://gogeo.blogs.edina.ac.uk

OpenLayers:  h3p://openlayers.org/  

h3p://gogeo.blogs.edina.ac.uk

ConsideraEons  

•  Traffic  

–  Google  etc.  have  caps  above  which  they  charge  

•  Hosted  or  Download?  

–  Easier  to  use  hosted  but  can  be  more  stable  to   download  the  code  

•  ProjecEon  and  conversion   –  Different  datasets  can  be  in  different  projecEons   •  APIs  tend  to  use  Web  Mercator  

–  Different  conversions  have  different  accuracies   •  Default  is  usually  poor!  Ask  [email protected]  for  advice  

 

h3p://gogeo.blogs.edina.ac.uk

SpaEal  data  without  maps  

GeospaEal  data:  it  isn’t  just  all  about  maps  

•  Most  data  has  an  element  that  is   geospaEal  or  can  be  georeferenced  

–  Postcode,  Place  name,  LocaEon  Stamp,  IP  Address  

•  Get  data  with  coordinates   –  h3p://poi.gps-­‐data-­‐team.com/  

•  Use  a  “Gaze3eer  Service”  to  add   coordinates  to  your  data   –  Unlock  Places,  Here  Places  

h3p://gogeo.blogs.edina.ac.uk

Unlock:  h3p://unlock.edina.ac.uk/home/  

•  Unlock  Places   –  Build  spaEal  queries  from  user  or  sensor  inputs   –  Return  results  in  several  different  formats:   •  kml,  json,  xml,  txt,  georss…  

–  Returns,  points,  bounding  boxes,  footprints…  

•  Unlock  Text     –  generates  a  list  of  places  from  a  txt  or  html  file   –  RESTful  Client   –  Geoparser  made  by  the  LTG  here  in  InformaEcs  

h3p://gogeo.blogs.edina.ac.uk

Where’s  the  nearest  Hotel?   Get Location from device’s GPS

Enter Location

Unlock Places

Coordinates

•  Hilton Edinburgh Grosvenor: 0.2 miles

•  100 metres turn right into Princes Street

•  Edinburgh residence: 0.4 miles

•  500 metres turn left onto Hanover street

•  Holiday Inn Edinburgh North: 1.2 miles

•  50 metres turn left onto George Street

App Coordinates

Geonames feature type: Hotel

Unlock Places

h3p://gogeo.blogs.edina.ac.uk

h3p://gogeo.blogs.edina.ac.uk