Azure SQL 2008 – Bing Maps – Near Route Demo

Azure SQL 2008 – Bing Maps – Near Route Demo

After the announcement http://bingmapswatch.blogspot.com/2010/03/bing-maps-sql-azure-support-april-2010.html that Azure SQL 2008 was implmenting Spatial Support (Geography and Geometry) this now enabled.

This is an example of combining, Windows Azuew, SQL Azure, Silverlight and Bing Maps to produce a find along a route example

Windows Azure SQL 2008 Bing Maps Find Near a Route
Finding Petrol (Gas) Stations along a route (Boston to Chicago) within 1km (1000m) of the route.

The code inside Azure SQL 2008 doing this is

@myGEOM is the lat and lng (x1,y2)+(x2,y2) start and end points for the route
@myBuffer is the buffer distance (1000m default)
@myRoute is the (xy,xy,xy,xy) of the enitre route creating a polyline
This polyline is then buffered creating a polygon (area) around the route.
SQL 2008 Azure then uses Geoproccessing 'Buffer' and 'Intersect' to pull-out
any points (gas stations in this example) and then displays the points as markers
on bing maps

code:

 CREATE PROCEDURE [FindNearRoute] @myGEOM nvarchar(MAX), @myBuffer int
AS
   --Create the Buffer
   DECLARE @myRoute geography;
   SET @myRoute = @myGEOM;

   DECLARE @SearchArea geography;
   SET @SearchArea = @myRoute.STBuffer(@myBuffer);

   --Return all POI in the search area
   SELECT Lat, Lon, Name
   FROM PetrolStations
   WHERE (@SearchArea.STIntersects(GEOM)) = 1

Live Example (Silverlight required)
http://talkingdonkey.cloudapp.net/BM-SL-FindNearRoute/Default.htm

There is also a zip file (BM-FindNearRoute.zip) with all the source code required to create your own find near a route example.

Source
http://johanneskebeck.spaces.live.com/blog/cns!42E1F70205EC8A96!12533.entry

Chromium to Feature in Pwn2Own Contest!

We’re excited that the Google Chrome browser will feature in this year’s Pwn2Own contest. Chrome wasn’t originally going to be included as a target browser in the competition, but Google volunteered to sponsor Chrome’s participation by contributing monetary rewards for Chrome exploits. For the past year we’ve enjoyed working with the security community and rewarding researchers for high quality work through our Chromium Security Reward program. Sponsoring this contest to discover more bugs was a logical step. We thought we’d answer some frequently asked questions in the form of a Q&A session:
Q) Is Chrome OS a target?
A) No, not this year, as Chrome OS is still in beta. Per HP TippingPoint / ZDI guidelines, the actual target will be the latest stable version of the Chrome browser at the time, running on an up-to-date Windows 7 system. A Chrome OS device will, however, be awarded in addition to the prize money.
Q) Are you betting that Chrome can’t be hacked?
A) No. We think the Chrome browser has a strong security architecture, and Chrome has fared well in past years at Pwn2Own. But we know that web browsers from all vendors are very large pieces of software that invariably do have some bugs and complex external dependencies. That’s why the Chromium Security Reward program exists, along with our newer web application reward program. As a team comprised largely of security researchers, we think it’s important to reward the security community for their work which helps us learn. Naturally, we’ll learn the most from real examples of Chrome exploits.
Q) How do the rules work?
A) We worked with ZDI to come up with a rules structure that would reward exploits in code specific to Chromium and in third-party components such as the kernel or device drivers.
Of course, we prefer to pay rewards for bugs in our own code because we learn more and can make fixes directly. On day 1 of the competition, Google will sponsor $20,000 for a working exploit in Chrome, if it uses only Chrome bugs to compromise the browser and escape the sandbox. Days 2 and 3 will also allow for bugs in the kernel, device drivers, system libraries, etc., and the $20,000 prize will be sponsored at $10,000 by Google and $10,000 by ZDI to reflect the occurrence of the exploit partially outside of the Chrome code itself.
Note that ZDI is responsible for the rules and may change them at their own discretion.
Q) Does this competition impact the Chromium Security Reward program?
A) The program still pays up to $3,133.7 per bug. As always, submissions to the program don’t require exploits in order to be rewarded. In addition, we continue to reward classes of bugs (such as cross-origin leaks) that would otherwise not be eligible for prizes at Pwn2Own. We encourage researchers to continue submitting their bugs through the Chromium Security Reward program.

Bing Spatial Data Services – Next Gen Spatial Search Comes to the Bing API

In August of 2001, we released the MapPoint Web Service that introduced spatial search and data hosting capabilities for our users. Since then, large and small businesses, government agencies and non-profits have used the service to support geospatial functionality such as store locators, fleet tracking, and real estate applications for their customers.

Today, we launched Bing Spatial Data Services, adding next generation spatial search to the Bing API offering. This release offers the benefits of cloud hosting and distributed computing, allowing customers to upload their data to our servers and perform spatial queries under the umbrella of their existing Bing Maps License.

Here’s a little more detail about what the service does and how it works.

Geocode Dataflow API (Batch Geocode):

  • Use it to batch geocode large sets of data (upload a process a then download)

Data Source Management API (Load):

    • Use to load, manage (update, delete) data for long term hosting.
    • Data can be in a file or a Windows Azure™ Blob Service location.
    • Load is required before being able to query with Query API.

Query API (Spatial Query):

    • Used to query hosted data; a query response can contain a maximum number of 250 results (the new Bing Maps AJAX v7 makes light work of displaying large numbers of points on a map)

By Area <aka FindNearby>:

· Either specify a center point (radius search) or bounding box to search for matching entities. Use built in filters to refine the response. Results are “as the crow flies”. Example:

How many matching entities fall within this specified area (circle or rectangle)?

By Property:

· Search a hosted data source for one or more entities by specifying property values. Example:

Return all entities (customers) with sales person John Smith.

By ID:

· Specify an entity ID and receive in response all related information for the given entity. Example for Contoso Corporation:

For entity of ID “Contoso Store 1200”, return all associated property information (store #, address, open times, WiFi, etc)

For entity of ID “Contoso’s Best Coffee Store 5”, return all associated property information (store #, address, open times, WiFi, etc)

For more details, you can check out our documentation, or sign up for our upcoming webcast on March 1st. Try it out and let us know what you think.

Max Artemov
Senior Program Manager
Bing Mobile