16
Geo APIs February 18 th 2013 Smart Data Hack h3p://gogeo.blogs.edina.ac.uk

School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Geo  APIs  February  18th  2013  

 Smart  Data  Hack  

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

Page 2: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Overview  

• Maps  in  your  apps  

• Going  beyond  just  showing  maps  

• GeospaEal  data:  it  isn’t  just  maps  

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

Page 3: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

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

Page 4: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Going  beyond  just  showing  maps  

Page 5: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Leaflet:  h3p://leafletjs.com/  

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

•  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  

Page 6: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Leaflet:  h3p://leafletjs.com/  

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

Page 7: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

Leaflet:  h3p://leafletjs.com/  

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

Page 8: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

OpenLayers:  h3p://openlayers.org/  

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

•  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  

Page 9: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

OpenLayers:  h3p://openlayers.org/  

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

Page 10: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

OpenLayers:  h3p://openlayers.org/  

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

Page 11: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

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

Page 12: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

SpaEal  data  without  maps  

Page 13: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

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

Page 14: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

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

Page 15: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

App

Where’s  the  nearest  Hotel?  Enter Location

Get Location from device’s GPS

Unlock Places

Coordinates

Geonames feature type: Hotel

Coordinates

Unlock Places

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

•  Hilton Edinburgh Grosvenor: 0.2 miles

•  Edinburgh residence: 0.4 miles

•  Holiday Inn Edinburgh North: 1.2 miles

•  100 metres turn right into Princes Street

•  500 metres turn left onto Hanover street

•  50 metres turn left onto George Street

Page 16: School of Informatics Data Hack- Geo...App Where’sthenearestHotel? Enter Location Get Location from device’s GPS Unlock Places Coordinates Geonames feature type: Hotel Coordinates

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