Skip to main content

Thematic Mapping Engine: Source code and technical documentation now available

Many people have asked, - and today, I've released the source code of the Thematic Mapping Engine (TME) under a GPLv3 license. The engine takes statistical data, spatial features and thematic mapping parameters as input and returns a KMZ file. This file can be viewed in Google Earth, or other geobrowsers supporting the KML standard. TME can be accessed from a web interface or a PHP script. 


TME web interface
With the TME web interface, thematic maps can be created in a web browser, without a single line of code. This is achieved through an interactive web form where the user can select between statistical indicators and various thematic mapping techniques. Mapping parameters, like the colour and size, can be readily changed. The form returns a KMZ file which can be visualised directly in the web browser using the new Google Earth plug-in, or downloaded to a computer. 

TME Application Programming Interface (API)
The Thematic Mapping Engine can also be used as an application programming interface (API). This allows thematic maps to be created with a few lines of PHP code. Existing or new applications can use this API to add thematic mapping functionality. This is the code required to create a choropleth map: 

include ('TME_MySQL_DataConnector.php');
include ('TME_Engine.php');

$dataConnector = new DataConnector();
$dataStore = $dataConnector->getDataStore(68, 2005, 0);

$parameters = array( 
'mapType' => 'choropleth',
'indicator' => 68,
'year' => 2005,
'classification' => 'equal');

$map = new ThematicMap($dataStore, $parameters);
$file = $map->getKML();


Requirements
The Thematic Mapping Engine requires the following software (all are open source and available free of charge):
  • PHP 5
  • MySQL 5+
  • Apache HTTP Server 
  • Ext JS 2.1
  • Google Earth Plug-in
Documentation
This PDF document (7 Mb) gives a detailed description of the Thematic Mapping Engine. The documentation is available under a Creatice Commons Attribution-Share Alike License 3.0.

You should have a basic knowledge of PHP, MySQL and JavaScript before installing the Thematic Mapping Engine.

Download the TME source code on Google Code

Enjoy!

Comments

Anonymous said…
Great news. I've been dabbling with some of your ideas for an internal project but this will enable me to really get a jump start on it. Can't wait to get started
Unknown said…
Hi Bjørn,

Thanks for this gift :o) I will use it with my students :o)

Greetings from Africa
Henri Willox
Le Technoblog du LAC (Conakry, Guinea)
Anonymous said…
Thank you, it's a great news.
Anonymous said…
nice work
congrats.
Archaeogeek said…
Wow, this is really cool! I am really looking forward to giving it a go. Couldn't download the documentation though- I got a 302 error from the link on googlecode.

Jo
Bjørn Sandvik said…
Hi Archaeogeek,

Documentation is available from this computer. Might be a firewall issue. You can try to download from this page.
Mano Marks said…
Bjørn,

This is awesome news, thanks for doing it!

Mano
KAKAW said…
Bjørn !!!!
I cant believe that!!!
since first time I´v seen your engine I hope that someday I could do something cool like this for my project, its perfect!
Its wonderfull that you´ve done this!
I hope show you something soon with brazilian Aids data,
Please tell me the true your real name its Santa Claus??
Archaeogeek said…
The documentation downloads fine with firefox, but not with google chrome. Weird!
wpcamargo said…
Very good job man. Also, a cleary and well-writeen source code.
I think this idea is a simple way to implement rich map designs with a few clicks on a web-browser.
Thanks for sharing!
Sangy said…
Hi, Your work is amazing. I am a newbie to GIS and I i am in search of city borders. (In your application u had a link to world borders dataset).
Could you please let me know where can I find city borders ie; Polygan coordinates. I have the lat and long information for each city and I need the city border dataset.
Anonymous said…
@Sangy
You're better off creating your own borders as a new KML file. Depending on which country you're planning to map out there are multiple definitions of "cities" (urban extent, administrative area etc, etc.) so it could all get a bit subjective.
I'd suggest, first off, that you create a simple points file (say based on the centre of the cities) and try using the application to set up a proportional symbol map.
Have fun

Popular posts from this blog

Creating a WebGL Earth with three.js

This blog post will show you how to create a WebGL Earth with three.js , a great JavaScript library which helps you to go 3D in the browser. I was surprised how easy it seemed when reading a blog post  by Jerome Etienne . So I decided to give it a try using earth textures  from one of my favourite cartographers, Tom Patterson . WebGL is a JavaScript API for rendering interactive 3D graphics in modern web browsers without the use of plug-ins. Three.js is built on top of WebGL, and allows you to create complex 3D scenes with a few lines of JavaScript. If your browser supports WebGL you should see a rotating Earth below: [ Fullscreen ] To be able to display something with three.js, you need three things: a scene, a camera and a renderer. var width  = window.innerWidth,     height = window.innerHeight; var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(45, width / height, 0.01, 1000); camera.position.z = 1.5; var rende...

Thematic Mapping Engine

It's time to introduce the Thematic Mapping Engine (TME). In my previous blog posts, I've shown various techniques of how geobrowsers can be used for thematic mapping. The goal has been to explore the possibilites and to make these techniques available to a wider audience. The Tematic Mapping Engine provides an easy-to-use web interface where you can create visually appealing maps on-the-fly. So far only prism maps are supported, but other thematic mapping techniques will be added in the upcoming weeks. The engine returns a KMZ file that you can open in Google Earth or download to your computer. My primary data source is UNdata . The above visualisation is generated by TME ( download KMZ ) and shows child mortaility in the world ( UNdata ). The Thematic Mapping Engine is also an example of what you can achieve with open source tools and datasets in the public domain: A world border dataset is loaded into a MySQL database . The same database contains tables with statistics ...

Creating 3D terrains with Cesium

Previously, I’ve used three.js to create 3D terrain maps in the browser ( 1 , 2 , 3 , 4 , 5 , 6 ). It worked great for smaller areas, but three.js doesn’t have built-in support for tiling and advanced LOD algorithms needed to render large terrains. So I decided to take Cesium for a spin. Cesium is a JavaScript library for creating 3D globes and 2D maps in the browser without a plugin. Like three.js, it uses WebGL for hardware-accelerated graphics. Cesium allows you to add your own terrain data, and this blog post will show you how. Impressed by the terrain rendering in @CesiumJS - with a 10m elevation model for Norway! Farewell Google Earth. pic.twitter.com/RQKvfu2hBb — Bjørn Sandvik (@thematicmapping) October 4, 2014 Compared to  the dying Google Earth plugin , it's quite complicated to get started with Cesium. The source code is well documented and the live coding Sandcastle is great, but there is a lack of tutorials  and my development slows down when ...