Skip to main content

Posts

Showing posts with the label OpenLayers

Google Chart and OpenLayers Mashup

In a previous blog post , I demonstrated the new thematic map feature of the Google Chart API . I was not too impressed with the choropleth map it returned. A greater advantage of this API is the possibility to put charts on top of web maps. I here demonstrate how this can be achieved using OpenLayers . This map shows the total population and the age distribution in each country of the world in 2005. Instead of proportional circles , I’m here using pie charts to symbolise the population. The chart size is mathematically scaled in direct proportion of the total population. The pie chart itself shows the age distribution as shown in the right figure. The chart URL’s are generated with JavaScript from parameters stored in a GeoJSON FeatureCollection , and the chart images are loaded using the OpenLayers API. By loading the images into a vector layer (even though it sounds a bit strange), you have access to the new styling capabilities of OpenLayers 2.6. There are some performance issu...

Proportional symbol mapping with OpenLayers

This blog post shows how the new release of OpenLayers (2.6) and GeoJSON can be utilised to make proportional symbol maps. The performance is very good compared to choropleth world maps . This map shows the population in each country of the world in 2005. The population numbers (medium variant) were downloaded from UNdata . For the purpose of symbolisation, these are conceived as conceptual point data. The symbols are placed in the centre of each country, even though the data represents the country as a whole. The population data are provided as a GeoJSON FeatureCollection containing point coordinates (longitude/latitude) and parameters (name and population of country). Proportional symbols can be geometric or pictographic. I’m using circles on the map above, which have been the most frequently used geometric symbol. Scalable pictographic symbols are harder to create in a web interface. I will try different methods at a later stage. The size of the circle areas are mathematically s...

Thematic mapping with GeoJSON

Is GeoJSON a suitable data interchange format for thematic world mapping? The format has a lot of potential, but there are major performance issues due to browser restrictions. I've used OpenLayers to test how choropleth maps can be rendered from GeoJSON encoded data. The map is available on this page (best performance in Firefox). Directions Magazine has an excellent introduction to GeoJSON . Open source tools like OpenLayers , GDAL/OGR , GeoServer and FeatureServer already supports the GeoJSON draft specification . On the map above (number of Internet users), all countries are wrapped in a FeatureCollection . Each country is represented by a Feature containing MultiPolygon geometry and parameters. By using GeoJSON you are basically transferring vector data directly to the client instead of map images. This has several advantages: You can do client side processing of the data. One example is reprojecting of the data in the browser. The thematic display classifications or col...