Johannes Kebeck's

Virtual Earth

Home
Twitter
Gallery - Automotive
Gallery - Logistics
Gallery - Manufacturing
Gallery - Media
Gallery - Oil & Gas
Gallery - Public Sector
Gallery - Real Estate
Gallery - Retail
Gallery - Telco
Gallery - Travel
Gallery - Utilities
Gallery - Various
More Info
About Me
Contact Me
The Donkeys
Site Map

01 February

A Different Look at the Latest Imagery Updates using Microsoft Live Labs Pivot

Recently I became aware of Microsoft Live Labs Pivot. From their website: “Pivot is a really ambitious project that makes it easier to interact with massive amounts of data in ways that are powerful, informative, and fun.” Well in the latest Bing Maps imagery update we had updates

from

  • 2 suppliers

with

  • 4 different ground-resolutions

for

  • 4 continents,
  • 7 sub-regions,
  • 21 countries or
  • 471 areas.

A total of

  • 605,751 square-kilometres

That appears to be enough to give Pivot a first crack. To set up a Pivot-Collection proved to be amazingly simple and it was indeed fun to work with it. My first result is available here:

Check out the various dimensions…

image

…select a data point to look at the details and get more information from Bing…

image

…and then click on “Open” to explore the area directly in Bing Maps:

image

Unfortunately Pivot is currently available by invitation only. So if you are interested visit the website and request an invitation.



16:42 GMT  |  Read comments(0)

28 January

Creating Bing Maps Tile-Layers from SQL Server 2008 on the Fly

Many ways lead to Rome or in this case to a connection between your spatial data in SQL Server 2008 and the visualization in Bing Maps.

  1. You can overlay the data as vectors in a VEShapeLayer by retrieving spatial data from SQL Server 2008 as GML (see for example this blog post). This is quite straight forward but since we have to render the data in the client the user experience will not be great when we have loads of geometries or geometries with many points. Using SQL Server’s Reduce-function we could increase the performance by generalizing the polygons, i.e. adjusting the distance between points to the map-resolution in Bing Maps dynamically for each zoom-level but even then we can’t really cope with Polygons with Holes in the Bing Maps API;
  2. For data that doesn’t change very frequently you can use my favourite spatial ETL tool Safe FME to generate static tile layers (see for example this blog post);
  3. For more dynamic data you could render the tiles on the fly using 3rd party tools such as the MapServer (see for example this blog post)
  4. In SQL Server 2008 R2 you will also be able to use the SQL Server Reporting Services (see for example this blog post) but unfortunately this will not come with a lot of interactivity.
  5. Recently Ricky Brundritt had blogged about his dynamic tile layer that he presented on a Bing Maps Developer Event. In the meantime I have heard from quite a few who have implemented Ricky’s code and have run into 2 issues:
    1. In the sample Ricky processes only exterior rings of polygons which means that he wouldn’t draw the holes in polygons with holes. Such a “Donut” is not as rare as you might think; for example: if we look at thematic maps on the country level, Italy is represented by a polygon with 2 holes for Vatican City and San Marino.
      Keep in mind that this was just a quick sample meant to be demonstrated during his speech in front of developers. Of course it is relatively simple to extend the code and process the interior rings as well. If you do so you might want to change the method from Graphics.DrawPolygon to Graphics.DrawRegion as well. Why? Well, the DrawPolygon-method draws a path. By setting the property Fillmode.Winding you can draw holes but it still remains a path and that might create weird-looking side-effects:
      image

      A Region on the other side allows you to combine or exclude other regions, e.g.
    2. Dim extRing As New GraphicsPath
      extRing.AddPolygon({ _
         New Point(10, 10), _
         New Point(10, 490), _
         New Point(490, 490), _
         New Point(490, 10), _
         New Point(10, 10)})
      Dim myRegion As New Region(extRing)
      
      Dim intRings As New GraphicsPath
      intRings.AddPolygon({ _
         New Point(50, 50), _
         New Point(100, 50), _
         New Point(100, 100), _
         New Point(50, 100), _
         New Point(50, 50)})
      intRings.AddPolygon({ _
          New Point(150, 150), _
          New Point(200, 150), _
          New Point(200, 200), _
          New Point(150, 200), _
          New Point(150, 150)})
      intRings.AddPolygon({ _
          New Point(50, 250), _
          New Point(50, 200), _
          New Point(100, 200), _
          New Point(100, 250), _
          New Point(50, 250)})
      myRegion.Exclude(intRings)


      Dim img As Image = New Bitmap(PictureBox1.Width, PictureBox1.Height)
      Dim g As Graphics = Graphics.FromImage(img)
      g.FillRegion(Brushes.Blue, myRegion)
      image 
    3. The second problem and that might actually be more of an issue if you want to use this in a production environment is that Ricky uses a 3rd party library that does not come with source code so you have little control over it. The library is actually from Morten Nielsen’s SQL Server 2008 Spatial Tools and Morten specifically mentions: “These tools are NOT meant for use in a production environment”.

Based on Ricky’s concept I have now created a dynamic tile rendering service that is using the SQL Server 2008 spatial library in the middleware. This library is installed along with SQL Server 2008 but can also be downloaded separately from the Microsoft SQL Server System CLR Types in the Feature Pack. There is certainly room for improvement but all libraries are fully supported and the code is just a start :-)

You will find a sample database here

…and the sample code here




08:27 GMT  |  Read comments(0)

12 January

Bing Maps Imagery Updates

A great resource to find out about the latest imagery updates is of course Chris Pendleton’s blog. A fancy tour through the highlights of the latest updates is available in the Bing Maps World Tour. Sometimes people are however interested in the geographic extend of these updates. If you are one of those you might find this little Bing Maps Silverlight application helpful that I have put together.

image



08:54 GMT  |  Read comments(0)

17 December

Bringing the Beauty (Bing Maps) and the Beast (SQL Server 2008) together

Do you work with geospatial datasets in a database? Are you interested in thematic mapping? Do you consider to add a spatial component to your risk analysis application? If any of this sounds interesting to you than you should join us for a full day of technical training in the the Microsoft office in Reading.

Microsoft Campus, Reading, RG6 1WG, UK
Microsoft Campus, Reading, RG6 1WG, UK

 

I have 6 and a half hours on the 21st of January to torture the attendees and dive really deep into SQL Server 2008’s spatial capabilities and the data visualization with Bing Maps.

After an introduction into the spatial data types, spatial indexing and spatial functions in SQL Server 2008 we will look into the complete spatial ETL process including nasty things like coordinate system conversions or re-projections. Once we have the data in SQL Server we can already start with interesting analysis but more often we would want to get them out and display the data on our Bing Maps. We will of course do that as well and throughout the day we will look at the do’s and don’ts.

If you are interested register here.

Technorati Tags: ,



09:56 GMT  |  Read comments(0)

Bing Maps UK User Group Founded

A big thanks to Brian Norman, Alastair Aitchison and Ricky Brundritt who founded the Bing Maps UK User Group. The inaugural meeting will be on Wednesday the 13th of January 2010 from 18:00 to 21:00 in the Microsoft Office at…

100 Victoria Street, London
100 Victoria Street, London

There will be 2 ‘formal’ sessions:

  • Adventures in Mapping at the BBC, Jim Lynn
  • Integrating SQL Server 2008 and Bing Maps, Alastair Aitchison

If you get a chance join us for the evening. I’m sure it’ll be fun.

Technorati Tags: ,


09:25 GMT  |  Read comments(0)

 

More on my Blog