Matthew Murray UK Products Manager Axiell UK SWRLS - Blue Sky Thinking event.
Blue Sky Thinking
-
Upload
thomas-sykes -
Category
Technology
-
view
83 -
download
0
Transcript of Blue Sky Thinking
![Page 1: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/1.jpg)
BLUE SKY THINKINGSQL Azure Geospatial Mashup
![Page 2: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/2.jpg)
ABOUT ME▪ Thomas Sykes▪ Data Platform Consultant for Quorum in Edinburgh▪ Using SQL Server since version 7.0▪ MCDBA, MCITP and MCSE in SQL Server▪ MCS in Azure Implementation and Hyper-V▪ Certified Technical Trainer
![Page 3: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/3.jpg)
THIS SESSION▪ SQL Azure with Geospatial Data▪ Azure Websites with Bing Maps▪ Integrate another live data source
![Page 4: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/4.jpg)
HOLIDAY CLIMBING
![Page 5: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/5.jpg)
AZURE SQL DATABASE▪ Windows Azure SQL Database
▪ Microsoft’s PaaS offering for SQL Server Database Engine▪ With V12 is much closer to our IaaS or On-Premise Database Engine▪ Scalable with various options from Basic development to Mission Critical Premium
![Page 6: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/6.jpg)
AZURE SQL DATABASE▪ Connect straight from Management Studio once you’ve allowed access▪ Database size based on DTU’s▪ Actively developing
![Page 7: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/7.jpg)
AZURE SQL DATABASE
![Page 8: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/8.jpg)
NEW AZURE SQL DATABASE
![Page 9: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/9.jpg)
AZURE WEB HOSTING▪ Azure Websites - Microsoft’s Web Hosting Offering
▪ Various Tiers from Free, Shared, Basic, Standard Tier▪ Scalable -More servers/Bigger servers▪ Staged Publishing/Deployment slots
▪ http://<site>-<slot name>.azurewebsites.net/
![Page 10: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/10.jpg)
AZURE WEB HOSTING
![Page 11: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/11.jpg)
NEW AZURE WEB HOSTING
![Page 12: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/12.jpg)
SQL SPATIAL▪ A spatial data type, such as geography (or geometry) can be indexed with a spatial index▪ Various functions supported by spatial indexes▪ We will use the STDistance function
▪ Returns the shortest distance between two geography points
![Page 13: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/13.jpg)
DATA - GEOSPATIALS▪ Get started with free digital map data
▪ OS Locator - A searchable gazetteer of road namesWe need current postcode’s▪ Code-Point Open - All of the current postcode
![Page 14: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/14.jpg)
DATABASE – POSTCODESFor the postcodes table the obvious candidate for clustered index is the postcode field
![Page 15: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/15.jpg)
DATABASE – HILLSFor the Hills table a natural unique index would Latitude and Longitude
![Page 16: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/16.jpg)
DATABASE
Spatial Reference System Identifier (SRID) WGS84 — SRID 4326
"The World Geodetic System (WGS) is a standard for use in cartography, geodesy, and navigation. It comprises a standard coordinate system for the Earth, a standard spheroidal reference surface (the datum or reference ellipsoid) for raw altitude data, and a gravitational equipotential surface (the geoid) that defines the nominal sea level." - Wikipedia
![Page 17: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/17.jpg)
DATABASELoch Ness Centre Exhibition Experience at IV63 6TU
![Page 18: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/18.jpg)
DATABASEUsing nearest neighbour in SQL Azure we get the results:
![Page 19: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/19.jpg)
DEMO
![Page 20: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/20.jpg)
BING MAPS - RENDER
![Page 21: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/21.jpg)
DATA – WEATHER
DataPoint is a way of accessing freely available Met Office data feeds in a format that is suitable for application developers. UK 3-hourly site-specific forecast -A quality controlled forecast out to 5 days for more than 5,000 locations. The DataPoint service is operating as BETA
![Page 22: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/22.jpg)
SCOTTISH WEATHER ICON
![Page 23: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/23.jpg)
DATA – WEATHER – STATION DATA
We can either get an XML stream or download the weather station locations as below;
![Page 24: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/24.jpg)
DATA – WEATHER - GET STATIONDECLARE @CurrentLocation geographySET @CurrentLocation = geography::Point(@lat,@long, 4326)SELECT TOP(1) ID,name,ROUND(GeoLocation.STDistance(@CurrentLocation)/1000,2) AS [Distance (Km)]FROM [dbo].[WeatherPlaces] WITH(INDEX([ix_GeoLocation]))WHERE GeoLocation.STDistance(@CurrentLocation)IS NOT NULLORDER BYGeoLocation.STDistance(@CurrentLocation) ASC
![Page 25: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/25.jpg)
DATA – WEATHER
![Page 26: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/26.jpg)
DATA – DISPLAY WEATHER
![Page 27: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/27.jpg)
THE SITE - VIDEO
![Page 28: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/28.jpg)
USEFUL LINKS▪ Azure
▪ http://azure.microsoft.com/en-us/documentation/articles/sql-database-preview-whats-new/▪ http://azure.microsoft.com/en-us/pricing/details/sql-database/▪ http://azure.microsoft.com/en-us/documentation/articles/sql-database-elastic-scale-get-started/
▪ OS▪ http://www.ordnancesurvey.co.uk/business-and-government/products/opendata-products.html
▪ Met Office - DataPoint▪ http://www.metoffice.gov.uk/datapoint
![Page 29: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/29.jpg)
CONTACT▪ Thomas Sykes▪ Blog: sqltomato.com▪ twitter: @sqltomato▪ email:[email protected]
![Page 30: Blue Sky Thinking](https://reader036.fdocuments.in/reader036/viewer/2022062502/589eb81e1a28ab4a5c8b53c7/html5/thumbnails/30.jpg)
THANK YOU