interview with developer jose luis arenas regarding google app engine & geospatial datas
DESCRIPTION
Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Data search. Plus detail about opensource project on using Search API & Google Datastore with Geospatial Datas from UK Government.TRANSCRIPT
![Page 1: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/1.jpg)
GDG London & Google Developer Experts
at Google London
![Page 2: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/2.jpg)
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
![Page 3: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/3.jpg)
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
![Page 4: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/4.jpg)
Where to find us
● Find out about our events & goals at http://www.meetup.com/Google-Cloud-Platform-App-Engine-Compute-Engine-BigQuery/
![Page 5: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/5.jpg)
Google Cloud Platform HackathonBuilding 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
![Page 6: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/6.jpg)
Retrospective GameWrite on coloured Post-it note your ideas for the following.
Only 1 idea per Post-it note
Green - Favourite announcement in the keynotePink - Feature Request for Google App EngineOrange - Feature Request for Google Compute Engine Yellow - Other Feature
Other info Job Role & Which product you're using.
![Page 7: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/7.jpg)
Interview with Developer Jose Luis Arenas
Jose Luis Arenas from NDS & TeamUno
Rif Kiamil from FOODit & TeamUno
![Page 8: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/8.jpg)
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.
![Page 9: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/9.jpg)
![Page 10: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/10.jpg)
Application Architecture v1
Search API is the forgotten database of Google Cloud Platform. It has it’s own SLA and totally different to datastore
![Page 11: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/11.jpg)
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
![Page 12: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/12.jpg)
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)
![Page 13: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/13.jpg)
Went back to Search API, but with our workaround
![Page 14: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/14.jpg)
Latitude
![Page 15: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/15.jpg)
Latitude & Longitude
![Page 16: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/16.jpg)
Check which 4 results are 3km away
![Page 17: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/17.jpg)
Using Haversine Formula found objects
![Page 18: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/18.jpg)
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….
![Page 19: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/19.jpg)
Application Architecture v2
![Page 21: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/21.jpg)
Why I love endpoints
Google APIs ExplorerField filtering and versioningGenerate client libraries for iOS and Android
![Page 22: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/22.jpg)
End Points
![Page 23: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/23.jpg)
![Page 24: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/24.jpg)
![Page 25: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/25.jpg)
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!
![Page 26: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/26.jpg)
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)
![Page 27: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/27.jpg)
Find us online at
Jose Luis Arenas [email protected] from NDS & TeamUno
Rif Kiamil [email protected] from FOODit & TeamUno
![Page 28: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/28.jpg)
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 & LongPHPCoord http://www.jstott.me.uk/phpcoord/
![Page 29: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/29.jpg)
Notes - mySQL Geo Query $query = <<<EODSELECT 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 DISTANCEEOD;
![Page 30: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/30.jpg)
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))
![Page 31: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/31.jpg)
Retrospective Game Summary
![Page 32: Interview with Developer Jose Luis Arenas regarding Google App Engine & Geospatial Datas](https://reader033.vdocuments.site/reader033/viewer/2022052900/555e0976d8b42a9e188b491c/html5/thumbnails/32.jpg)
Retrospective GameWrite on coloured Post-it note your ideas for the following.
Only 1 idea per Post-it note
Green - Favourite announcement in the keynotePink - Feature Request for Google App EngineOrange - Feature Request for Google Compute Engine Yellow - Other Feature
Other info Job Role & Which product you're using.