Showing posts with label kml. Show all posts
Showing posts with label kml. Show all posts

Wednesday, 11 November 2009

British National Grid and Google Maps

This post follows on from a recent one about the Scottish Index of Multiple Deprivation 2009 and in particular the interactive mapping function they provide.

The most deprived area in Scotland, according to the new Index, just happens to be centred on Celtic Park, Glasgow. This is, in technical terms, Data Zone
S01003279. But, there's a slight problem - the Data Zones are somewhat displaced. It's not too big an issue in relation to the SIMD data because Data Zones match Ordnance Survey data and the Scottish Government have all this behind the scenes so they do of course know on a street-by-street basis where things are.

However, for the online map interface, it does mean that the Data Zone is not in the right place. It also means that people using the interactive mapping facility could end up thinking they live in one area, when they actually live in another since the level of displacement often moves Data Zones into the wrong street.

So, it got me thinking. What would you have to do to get the Data Zones in the right place on Google Maps (this also applies to Google Earth)? It's quite simple really (if you're a nerd and you have the right software)... N.B. the SIMD data is not based on Google Maps, but rather the Microsoft Virtual Earth mapping facility.

  1. Convert the Data Zone Shapefile from British National Grid to WGS84 in ArcGIS. Best done via ArcToolbox/Data Management Tools/Projections and Transformations/Feature/Project and then selecting the right files for transformation to the correct projection. More useful information can be found here.
  2. Use Kevin Martin's excellent Export to KML tool to convert the Shapefile to KML. You can set transparency here and it will export as a transparent KML layer, as in the maps below.
  3. If you've got a Google account you can then upload the KML file directly into the My Maps facility and the Data Zone appears there. From there you can add a description and edit in other ways.
Here's what it looks like if you don't get the projection right the first time (click the link below the map to see the full thing) - note how the edges of the Data Zone don't match the streets.


View Data Zone S01003279 - Displaced in a larger map

And here's how it looks if you convert to the correct projection before you export to KML (again, click the link below the map to see it full size):

View S01003279 in a larger map

So, a simple bit of GIS work before putting all this online solves the problem.

Monday, 19 January 2009

Still working on things

January has been pretty quiet on the blogging front, but that's because I've been working on papers. One of these is in revision and the other is a new piece of work based on my PhD writings (but it's taken on new life too).

Anyway, more on the former. I'm attempting to revise a paper on flow mapping and to make things more interactive and more effective so I decided that I would build a small site in google sites and then put links to content there. So, if you're at all interested in flow mapping, kml, google sites, GIS, spatial interaction or anything closely related to any of these it may be of interest. If not, it does look quite nice.

There's an introductory page, some information about the data, a few colour maps, direct links to kml files overlaid onto google maps and some links to the KML files on my web space. There's also a few words about me and about the project that all this came from. As you can see, I've also added a slightly psychedelic banner. Link to site here.


In future, I plan to blog a lot more on non-flow-mapping-related issues. It's just that for the past year or so this has been a big part of my work. That's all for now...

Tuesday, 6 January 2009

Google Earth API - Embed in Web Browser

With the Google Earth API, you can embed and view actual Google Earth imagery in a web browser (you'll need the plug-in). I've been doing some other work relating to dynamic mapping so was looking for ways to implement Google Earth's time lapse functionality in a web browser rather than running it via a kml/kmz file which loads into Google Earth. That's how I came across this. I put the page here rather than on the blog because I wanted it to be separate:

http://ajrae.staff.shef.ac.uk/ge1.html - if your browser says 'load failed' or something similar, just click 'Ok' and where the Google Earth image should be you can install the plug-in from there.

Here's some images:
In the image above, you can see the search box. If I enter, 'Glasgow', for example, it will automatically zoom to here:


If you have a place that occurs in more than one location, then you may have to insert a comma and then enter the city or country it is in. For example, in the image below I've searched for Hillsborough, Sheffield and it's taken me right there...

Friday, 13 June 2008

From Data to Knowledge using Google Maps?

About time for another post I think. This time about things I'm doing with data which I turn into useable information in the hope that it can generate new knowledge. Well, that's the basic idea. Specifically, I've been playing around with google mashup editor, kml and kmz files, and Index of Multiple Deprivation data for 2007. What I've been trying to do is work my way round methods to display IMD data on google maps so that anyone can view it, understand it and maybe even remember it.

One of the main problems with using IMD data is that it means using lots of polygons and when you try to load them in google maps they render very slowly and sometime you get a script error in your browser (IE and FF). This is something to do with the way it all works 'under the hood' but I've been trying to investigate ways to make rendering polygons quicker... We'll see. Here's an example I created quickly with google mashup editor for an area in North Liverpool:

http://jrf-googlemaps-test.googlemashups.com/ - see how polygons load slowly


I've been reading and listening and watching online and it seems once you get beyond about 100 polygons everything goes awry. The solution would appear to be image/tile overlays but then this has some limitations that go against what I'm trying to achieve (query clickability, for example). I know people at CASA have used similar approach with their Gmap creator (I've used this and it works very well) and I can understand why but I just wonder if there is another way...


Since I'm on the subject of CASA, everyone with an interest in GIS/spatial analysis should go and see MapTube. This is really part of a much wider project about spatial literacy - which I am all for! I've said enough today. Will try a less technical post next time.