SlideShare a Scribd company logo
GDG London & Google
Developer Experts
at Google London
Next 2 hours
● Who is GDG London & GDE
● What we trying to do
● Retrospective Game on Google Cloud Platform
● Interview with Developer Jose Luis Arenas
● Retrospective Game continue
● Wrap up
● 8:15pm Live Broadcast After Party
Goal of the Group
● Hold event every 2 months
● Work with PHP, Java, Python and other user
groups
● Spread the knowledge of Google Cloud
Platform
● Give feedback to Google
Where to find us
● Find out about our events & goals at http:
//www.meetup.com/Google-Cloud-Platform-
App-Engine-Compute-Engine-BigQuery/
Google Cloud Platform Hackathon
Building apps with opendata from data.gov.uk
● Friday 18th July to 20th
● Build apps in 48 hours using data from data.
gov.uk
● 13,000+ government dataset
● Hosted at Google Campus
Retrospective Game
Write on coloured Post-it note your ideas for the following.
Only 1 idea per Post-it note
Green - Favourite announcement in the keynote
Pink - Feature Request for Google App Engine
Orange - Feature Request for Google Compute Engine
Yellow - Other Feature
Other info Job Role & Which product you're using.
Interview with Developer
Jose Luis Arenas
Jose Luis Arenas from NDS & TeamUno
Rif Kiamil from FOODit & TeamUno
Problem
Need to find all the names of streets in a
radius.
Wanted to take open source data “OS Locator”
from Ordnance Survey and make it into an API.
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas
Application Architecture v1
Search API is the forgotten database of Google Cloud Platform. It has it’s own SLA and totally different to datastore
Search API still learning to count
Search API - Giving us results outside search radius
Link to source code https://github.com/FOODit/street-geo-search/blob/master/streetsearch.py#L123
Issue 8824: Distance queries in Search API return results that are further away than specified https:
//code.google.com/p/googleappengine/issues/detail?id=8824
We could have
● Used CloudSQL - Cost a lot more!
Customer said No (see mySQL geo euery example)
● Tried GeoHashing with a Project called
“geomodel” - But it was too slow. But we
liked to idea of it using datastore over
search api. (see geomodel example)
Went back to Search API, but with
our workaround
Latitude
Latitude & Longitude
Check which 4 results are 3km away
Using Haversine Formula found objects
Why not do this in datastore?
Inequality Filters Are Allowed On One Property Only
Street.query().filter(‘lat >’, min_lat).filter(‘lat <’ max_lat).filter(‘lon >’, min_lon).filter(‘lon <’,max_lon)
Workarround:
[s for s Street.query().filter(‘lat >’, min_lat).filter(‘lat <’ max_lat) if s.lon > and s.lon < max_lon]
but an stripe of 2 km wide from East to West in UK has lots of streets….
Application Architecture v2
End Points
Go to https://street-geo-search.appspot.com/
Why I love endpoints
Google APIs Explorer
Field filtering and versioning
Generate client libraries for iOS and Android
End Points
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas
What I like about End Points & GAE
I like this style as never have to think about it
again..
I know always going to work and not going to
cost me or client much!
I liked Endpoints so much that..
My new startup TeamUno using just Google
End Points and AngularJS
We don’t have any server side templates.
I would love to see it Google make it easier to bind
datastore/cloudsql to End Points ( LESS CODE)
Find us online at
Jose Luis Arenas jla@sblk.co from NDS & TeamUno
Rif Kiamil rif@foodit.com from FOODit & TeamUno
Notes - Import
How did you do the import…
https://github.com/FOODit/street-geo-
search/blob/master/tools/OSLocator-Import.php
How did covert OS Grid References to Lat &
Long
PHPCoord http://www.jstott.me.uk/phpcoord/
Notes - mySQL Geo Query
$query = <<<EOD
SELECT NAME, CLASSIFICATION, SETTLEMENT, LOCALITY, COU_UNIT, LOCAL_AUTHORITY, TILE_10K, TILE_25K, SOURCE, CENTLAT, CENTLNG, DISTANCE
FROM (
SELECT NAME, CLASSIFICATION, SETTLEMENT, LOCALITY, COU_UNIT, LOCAL_AUTHORITY, TILE_10K, TILE_25K, SOURCE, CENTLAT, CENTLNG, r,
(6378.10 * ACOS(COS(RADIANS(latpoint))
* COS(RADIANS(CENTLAT))
* COS(RADIANS(longpoint) - RADIANS(CENTLNG))
+ SIN(RADIANS(latpoint))
* SIN(RADIANS(CENTLAT)))) AS DISTANCE
FROM OSL
JOIN (
SELECT $lat AS latpoint, $lng AS longpoint, $rad AS r
) AS p
WHERE CENTLAT
BETWEEN latpoint - (r / 111.045)
AND latpoint + (r / 111.045)
AND CENTLNG
BETWEEN longpoint - (r / (111.045 * COS(RADIANS(latpoint))))
AND longpoint + (r / (111.045 * COS(RADIANS(latpoint))))
) d
WHERE DISTANCE <= r
ORDER BY DISTANCE
EOD;
Notes - Example of GeoHashing
geomodel Project https://code.google.com/p/geomodel/
from geo.geomodel import GeoModel
class OSLocator(GeoModel, ndb.Model):
…….
entity = OSLocator()
entity.location = ndb.GeoPt(item.centlat, item.centlng)
……
results = OSLocator.proximity_fetch(
OSLocator.query(),
ndb.GeoPt(request.latitude, request.longitude),
max_results=10000,
max_distance=int(request.radius * 1000.0))
Retrospective Game Summary
Retrospective Game
Write on coloured Post-it note your ideas for the following.
Only 1 idea per Post-it note
Green - Favourite announcement in the keynote
Pink - Feature Request for Google App Engine
Orange - Feature Request for Google Compute Engine
Yellow - Other Feature
Other info Job Role & Which product you're using.

More Related Content

PDF
How to make GAE adapt the Great Firewall
PDF
Google Cloud Dataflow meets TensorFlow
ODP
Desktop Summit 2011 Talk
PDF
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
PDF
Git 101 Workshop
PDF
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
PDF
Intro to Google Apps Script
PDF
How to become a Git power user
How to make GAE adapt the Great Firewall
Google Cloud Dataflow meets TensorFlow
Desktop Summit 2011 Talk
使用 Raspberry pi + fluentd + gcp cloud logging, big query 做iot 資料搜集與分析
Git 101 Workshop
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
Intro to Google Apps Script
How to become a Git power user

What's hot (17)

PDF
GCPUG Shimane #02-1
PPTX
GitHub Data and Insights
PDF
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
KEY
Gittalk
PDF
Sparknize - Visualize CSV Data With Sparkline In Seconds
PDF
From airflow to google cloud composer
PDF
Weightlifting at SimplySocial
PDF
DevOpsDays Cape Town 2018 - Serverless with Google App Engine
PDF
Manageable data pipelines with airflow (and kubernetes) november 27, 11 45 ...
PDF
Big Data Analytics with Google BigQuery. GDG Summit Spain 2014
PDF
GCPUG Shimane #02-2
PDF
Git in pills : git stash
PDF
Ansible party in the [Google] clouds
PDF
LF_APIStrat17_Bringing GraphQL to the Enterprise: When REST Isn't Enough
PPTX
Knockout extender
PDF
Implementing GraphQL - Without a Backend
PPTX
Introduction To Git Workshop
GCPUG Shimane #02-1
GitHub Data and Insights
WordPress RESTful API & Amazon API Gateway - WordCamp Kansai 2016
Gittalk
Sparknize - Visualize CSV Data With Sparkline In Seconds
From airflow to google cloud composer
Weightlifting at SimplySocial
DevOpsDays Cape Town 2018 - Serverless with Google App Engine
Manageable data pipelines with airflow (and kubernetes) november 27, 11 45 ...
Big Data Analytics with Google BigQuery. GDG Summit Spain 2014
GCPUG Shimane #02-2
Git in pills : git stash
Ansible party in the [Google] clouds
LF_APIStrat17_Bringing GraphQL to the Enterprise: When REST Isn't Enough
Knockout extender
Implementing GraphQL - Without a Backend
Introduction To Git Workshop
Ad

Similar to Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas (20)

PPTX
Day 6 - PostGIS
PDF
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
KEY
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
PDF
Geographical Data Management for Web Applications
PDF
MongoDB + GeoServer
PDF
CARTO ENGINE
PPTX
NGSI: Geoqueries & Carto integration
PDF
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
PDF
Geo search introduction
PPTX
Stratio's Cassandra Lucene index: Geospatial Use Cases (Andrés de la Peña & J...
PPTX
Stratio's Cassandra Lucene index: Geospatial use cases
PDF
Building Location Aware Apps - Get Started with PostGIS, PART I
PDF
Pg intro part1-theory_slides
KEY
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
PPTX
Open Source Mapping with Python, and MongoDB
PPTX
Geoindexing with MongoDB
PDF
Proximity Service - Discovering Nearby Places
PPTX
Getting Started with Geospatial Data in MongoDB
PDF
Geolocation on Rails
Day 6 - PostGIS
Comparing Geospatial Implementation in MongoDB, Postgres, and Elastic
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Geographical Data Management for Web Applications
MongoDB + GeoServer
CARTO ENGINE
NGSI: Geoqueries & Carto integration
Spatial functions in MySQL 5.6, MariaDB 5.5, PostGIS 2.0 and others
Geo search introduction
Stratio's Cassandra Lucene index: Geospatial Use Cases (Andrés de la Peña & J...
Stratio's Cassandra Lucene index: Geospatial use cases
Building Location Aware Apps - Get Started with PostGIS, PART I
Pg intro part1-theory_slides
Mapping Flatland: Using MongoDB for an MMO Crossword Game (GDC Online 2011)
Open Source Mapping with Python, and MongoDB
Geoindexing with MongoDB
Proximity Service - Discovering Nearby Places
Getting Started with Geospatial Data in MongoDB
Geolocation on Rails
Ad

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Approach and Philosophy of On baking technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Approach and Philosophy of On baking technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Advanced methodologies resolving dimensionality complications for autism neur...
“AI and Expert System Decision Support & Business Intelligence Systems”
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Weekly Chronicles - August'25 Week I

Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas

  • 1. GDG London & Google Developer Experts at Google London
  • 2. Next 2 hours ● Who is GDG London & GDE ● What we trying to do ● Retrospective Game on Google Cloud Platform ● Interview with Developer Jose Luis Arenas ● Retrospective Game continue ● Wrap up ● 8:15pm Live Broadcast After Party
  • 3. Goal of the Group ● Hold event every 2 months ● Work with PHP, Java, Python and other user groups ● Spread the knowledge of Google Cloud Platform ● Give feedback to Google
  • 4. Where to find us ● Find out about our events & goals at http: //www.meetup.com/Google-Cloud-Platform- App-Engine-Compute-Engine-BigQuery/
  • 5. Google Cloud Platform Hackathon Building apps with opendata from data.gov.uk ● Friday 18th July to 20th ● Build apps in 48 hours using data from data. gov.uk ● 13,000+ government dataset ● Hosted at Google Campus
  • 6. Retrospective Game Write on coloured Post-it note your ideas for the following. Only 1 idea per Post-it note Green - Favourite announcement in the keynote Pink - Feature Request for Google App Engine Orange - Feature Request for Google Compute Engine Yellow - Other Feature Other info Job Role & Which product you're using.
  • 7. Interview with Developer Jose Luis Arenas Jose Luis Arenas from NDS & TeamUno Rif Kiamil from FOODit & TeamUno
  • 8. Problem Need to find all the names of streets in a radius. Wanted to take open source data “OS Locator” from Ordnance Survey and make it into an API.
  • 10. Application Architecture v1 Search API is the forgotten database of Google Cloud Platform. It has it’s own SLA and totally different to datastore
  • 11. Search API still learning to count Search API - Giving us results outside search radius Link to source code https://github.com/FOODit/street-geo-search/blob/master/streetsearch.py#L123 Issue 8824: Distance queries in Search API return results that are further away than specified https: //code.google.com/p/googleappengine/issues/detail?id=8824
  • 12. We could have ● Used CloudSQL - Cost a lot more! Customer said No (see mySQL geo euery example) ● Tried GeoHashing with a Project called “geomodel” - But it was too slow. But we liked to idea of it using datastore over search api. (see geomodel example)
  • 13. Went back to Search API, but with our workaround
  • 16. Check which 4 results are 3km away
  • 17. Using Haversine Formula found objects
  • 18. Why not do this in datastore? Inequality Filters Are Allowed On One Property Only Street.query().filter(‘lat >’, min_lat).filter(‘lat <’ max_lat).filter(‘lon >’, min_lon).filter(‘lon <’,max_lon) Workarround: [s for s Street.query().filter(‘lat >’, min_lat).filter(‘lat <’ max_lat) if s.lon > and s.lon < max_lon] but an stripe of 2 km wide from East to West in UK has lots of streets….
  • 20. End Points Go to https://street-geo-search.appspot.com/
  • 21. Why I love endpoints Google APIs Explorer Field filtering and versioning Generate client libraries for iOS and Android
  • 25. What I like about End Points & GAE I like this style as never have to think about it again.. I know always going to work and not going to cost me or client much!
  • 26. I liked Endpoints so much that.. My new startup TeamUno using just Google End Points and AngularJS We don’t have any server side templates. I would love to see it Google make it easier to bind datastore/cloudsql to End Points ( LESS CODE)
  • 27. Find us online at Jose Luis Arenas jla@sblk.co from NDS & TeamUno Rif Kiamil rif@foodit.com from FOODit & TeamUno
  • 28. Notes - Import How did you do the import… https://github.com/FOODit/street-geo- search/blob/master/tools/OSLocator-Import.php How did covert OS Grid References to Lat & Long PHPCoord http://www.jstott.me.uk/phpcoord/
  • 29. Notes - mySQL Geo Query $query = <<<EOD SELECT NAME, CLASSIFICATION, SETTLEMENT, LOCALITY, COU_UNIT, LOCAL_AUTHORITY, TILE_10K, TILE_25K, SOURCE, CENTLAT, CENTLNG, DISTANCE FROM ( SELECT NAME, CLASSIFICATION, SETTLEMENT, LOCALITY, COU_UNIT, LOCAL_AUTHORITY, TILE_10K, TILE_25K, SOURCE, CENTLAT, CENTLNG, r, (6378.10 * ACOS(COS(RADIANS(latpoint)) * COS(RADIANS(CENTLAT)) * COS(RADIANS(longpoint) - RADIANS(CENTLNG)) + SIN(RADIANS(latpoint)) * SIN(RADIANS(CENTLAT)))) AS DISTANCE FROM OSL JOIN ( SELECT $lat AS latpoint, $lng AS longpoint, $rad AS r ) AS p WHERE CENTLAT BETWEEN latpoint - (r / 111.045) AND latpoint + (r / 111.045) AND CENTLNG BETWEEN longpoint - (r / (111.045 * COS(RADIANS(latpoint)))) AND longpoint + (r / (111.045 * COS(RADIANS(latpoint)))) ) d WHERE DISTANCE <= r ORDER BY DISTANCE EOD;
  • 30. Notes - Example of GeoHashing geomodel Project https://code.google.com/p/geomodel/ from geo.geomodel import GeoModel class OSLocator(GeoModel, ndb.Model): ……. entity = OSLocator() entity.location = ndb.GeoPt(item.centlat, item.centlng) …… results = OSLocator.proximity_fetch( OSLocator.query(), ndb.GeoPt(request.latitude, request.longitude), max_results=10000, max_distance=int(request.radius * 1000.0))
  • 32. Retrospective Game Write on coloured Post-it note your ideas for the following. Only 1 idea per Post-it note Green - Favourite announcement in the keynote Pink - Feature Request for Google App Engine Orange - Feature Request for Google Compute Engine Yellow - Other Feature Other info Job Role & Which product you're using.