Thursday, July 15, 2010

Apple buys mapping company

News has just started circulating that Apple Inc. has purchased Poly9, Canadian mapping company. It developed a cross-browser, cross-platform 3D globe application, similar to Google Earth and Bing’s 3D globes, but which apparently "...did not require special plug-ins to work". The list of users included Skype and LinkedIn. The site is barely working now so I am unable to verify how good it was in comparison to Google and Bing but it appears it is build with Flash! So, it requires a plug-in after all. Also, it makes it quite an interesting development given Apple’s recent history of resentment towards Adobe Flash…

This is actually the second acquisition of a mapping technology by Apple Inc. within a period of 12 months. Last year it bought map group Placebase – developer of Pushpin, an API used to layer commercial and other data sets, such as demographics and crime data, onto maps. It appears that Apple is trying to develop its own mapping platform to eliminate reliance on its main rival – Google!


Tuesday, July 13, 2010

Converting csv data into shapefile

In the inaugural post of the new Free GIS Tools series I presented Google Map API, a very powerful and functional alternative to open source and commercial online GIS software. Then I wrote about a handy tools for selecting colour scheme for thematic maps. Today a quick overview of csv to shapefile converter tool which can be very handy if you need to convert latitude and longitude coordinates in decimal degrees to point, line or polygon features for display in desktop GIS software or for further conversion to complex KML/KMZ. These could be geocoded locations of your clients, or locations derived from geoRSS feeds, outlines of features from online digitalisation tools (eg. using simple geocoder point coordinates tool), or similar.

CSV to Shapefile Converter is the best tool for such tasks and it can be downloaded from for free. It is a Windows based application and requires .NET 2.0 framework to run - quite a large download as a bundle but really worth the effort. Here are a few tips on how to use it:

  • Conversion steps are almost self-explanatory: open csv file, select shape type, specify which field is latitude and which is longitude, and which fields to use as data attributes - all in a single form - then press a button to execute.
  • CSV file you want to convert has to have a header row, otherwise you will lose the first record.
  • When creating a polygon, the last record relating to a particular polygon has to be identical as the first record in order to “close the loop”.
  • This converter supports complex shape structures like multi-part polygons (ie. many polygons with the same attribute) and doughnut type polygons – just need to remember a convention that in shp file format points for outer boundaries go clockwise and inner boundary points are listed in anti-clockwise order.
Here is an example of a csv input files to generate a multi-part polygon and a doughnut type polygon (the result of CSV to Shapefile conversion is depicted on the images below):

doughnut polygon:

1,1,-28.323724553546, 153.028564453125
1,1,-28.297125824492888, 153.49273681640625
1,1,-28.77488163974644, 153.5064697265625
1,1,-28.74117220459353, 153.10821533203125
1,1,-28.323724553546, 153.028564453125
1,2,-28.359984824037397, 153.12469482421875
1,2,-28.58693349906796, 153.1329345703125
1,2,-28.596580064634804, 153.43231201171875
1,2,-28.32130676215295, 153.39111328125
1,2,-28.359984824037397, 153.12469482421875

multi-part polygon:

1,1, -28.01584726281309, 153.39008331298828
1,1,-28.030015853768017, 153.38913917541504
1,1,-28.03024314216738, 153.40621948242188
1,1,-28.0140286990148, 153.4053611755371
1,1, -28.01584726281309, 153.39008331298828
1,2,-28.0140286990148, 153.41609001159668
1,2,-28.029182458863605, 153.41548919677734
1,2,-28.028955168224194, 153.43093872070312
1,2,-28.012740531077274, 153.4310245513916
1,2,-28.0140286990148, 153.41609001159668

More Handy Tools:
Free GIS Tools: Google Map
Free Address Validation Tool
Manual geocoder for 70 countries

For more useful tips please also see posts listed under “How to…” category.

Monday, July 12, 2010

Colours for thematic mapping

Thematic maps, more formally known as choropleth maps, are great for conveying information about differences between areas. Using shaded and/or patterned polygons makes it easier to visualise geographic distribution of specific attributes. But picking colours to show those differences can be a problem – the bigger the more classes the data is divided into. Colours are especially important when you work with orderable, numerical data and want to pinpoint hostpots (either concentration or deficiency) of certain characteristics. Coming up with 4-colour scheme is easy, 6 is a stretch but 10 is a real challenge!

For clarity of information, it is best to avoid more than 5 classes because with more classes the difference in shades becomes too subtle for a human eye to easily distinguish a “hierarchy”. It is especially the case when using thematic overlay in combination with a multi-colour background (eg. as a transparent overlay on Google Map). Dividing the data into meaningful classes is a science on its own and I will come back to it in a separate post. Today I just wanted to focus on colour selection and to introduce a free online tool that will help in choosing the right combination.

The most commonly used colours for thematic mapping are red, blue, green, and purple, with white, yellow or grey as a secondary, “lighter” colours in the mix. “ColorBrewer 2.0” is a great colour selection tool that allows to experiment with the most popular colour swatches in various combinations. It caters for 3 different data types: qualitative, sequential and diverging, and depending on the option, allows to specify up to 12 colour classes (as RGB, CMYK or HEX values). An interactive “map panel” allows previewing your selection with different transparency settings and background colours. ScoreCard feature provides a guide to useability aspect of the selected combination - in terms of potential issues for colour blind, B&W photocopying, colour-printing and/or displaying on LCD monitors.

To present “nominal/ qualitative data” which is un-orderable, non-numerical, the colour variation should not present a pattern and should be totally random. ColorBrewer allows do define up to 12 classes.
To present “sequential data”, like for example counts by certain characteristics, it is best to use shades of a single colour. ColorBrewer allows do define up to 9 classes. If you are desperate for 10 class scheme, use YlorRD variant with white as 10th class.

For “diverging data”, that is data that oscillates around a certain “standardised value” (like mean or median), it is best to use 2 diverging colours with a neutral midrange shade. Again, ColorBrewer goes only to 9 classes but if you require 10 classes, it is easy to combine 6 class contrasting colours from sequential option (just ignore the first lightest class and merge remaining 5 shades from each colour scheme for your customised 10 colour swatch).

A final word of caution if you are working with KLM file format. It is a common convention to use colour sequence as Red–Green-Blue, then Alpha channel for transparency. However, KML standard specifies everything in reverse: Alpha-B-G-R! For example, if hex colour code for blue is 0x045A8D, in KLM it has to be written as ff8D5A04 (where the first two digits indicate alpha transparency of 100%, ie non transparent). And to save you a headache or two while trying to work out the right codes for different transparency settings in KML, here is a list of the most common values:
  • 100% = ff
  • 90% = e5
  • 85% = d9
  • 80% = cc
  • 75% = bf
  • 70% = b2
  • 65% = a6
  • 50% = 7f
  • 30% = 4c
And if you want to explore unlimited gamut of colours to define your totally custom swatches, try these tools as well:

Related Free GIS Tools posts:
Google Map API
Address Validation Tool
Simple Geocoder

Monday, July 5, 2010

Arts on the Map

Lovers of Australian art can now search interactively for… Arts on the Map. This map centric website was published by the Australian Council for the Arts and features nearly 200 companies currently funded by the Council. Visitors can use a very simple yet quite attractive interactive search widget to query a database of various artforms or art companies in each State and Territory. The results are displayed as a side list and interactive markers on the map. There is also an alternative search option for stories published by individual art companies. The mapping application comes in two flavours, as Google Map or Google Earth version.

It is good to see that Google Maps and similar free online mapping applications have a wide range of potential uses. The truth is that if it wasn’t for Google, there would be no such interactive applications on the Internet. Before Google launched its maps such functionality was reserved only for expensive and/or technically challenging software that many could not afford, or would never contemplate, to deploy on their websites.

Thursday, July 1, 2010

Google Map API 5th Birthday

Five years ago, on 29 June 2005, Google officially released API for its online map to allow enthusiastic developers to add online mapping functionality and interactivity to thousands of websites. Current official figure of Google Map mashups stands at 350,000! What initially started as blatant but ingenuous hacks to present point data on an interactive map embedded in an ordinary HTML page was turned by Google engineers into a robust and continuously evolving tool that even the least experienced webmasters can easily deploy on their websites to mashup content from variety of sources.

To commemorate the occasion Keir Clarke from Google Maps Mania released Mappybirthday Google Map mashup … to map Google Map mashups from around the World! There are some 300 individual applications mapped so far and you can add you own in one simple step. So, add your favourite Google Map mashups to the map and/or explore to see what is being mashed up in your country!