[postgis-users] Easiest web-gis for choropleth map or should I use QGIS plugin?

Barend Köbben kobben at itc.nl
Tue Apr 3 10:38:43 PDT 2012

If you're inclined to program in Javascript, the excellent D3 javascript API (mbostock.github.com/d3/) is very powerfull, relatively simple and renders stunning quality.

A small example I knocked together for Choropleth and Proportional Point Symbol maps , direct from a geojson file of statistical data of my home town (Enschede):

Barend Köbben (Senior Lecturer)
ITC - University of Twente,
Faculty of Geo-Information Science and Earth Observation
PO Box 217, 7500AE Enschede (The Netherlands)
+31-(0)53 4874 253
From: postgis-users-bounces at postgis.refractions.net [postgis-users-bounces at postgis.refractions.net] On Behalf Of Andrew Hill [andrew at vizzuality.com]
Sent: 03 April 2012 18:22
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Easiest web-gis for choropleth map or should I use QGIS plugin?

Hi John,

We develop an open source tool called CartoDB that can do some really nice choropleth maps. You can check-out the code over here,


Depending on what you run it on, it can handle some pretty large datasets, here is a choropleth map of thousands of polygons representing human population,


Shoot us an email if you have any questions.



On Mon, Apr 2, 2012 at 12:48 PM, John Abraham <jea at hbaspecto.com<mailto:jea at hbaspecto.com>> wrote:
I've been looking for an open-source and easily deployable solution to allow users to view choropleth maps of PostGIS layers.  The layers are straightforward enough, just a geometry column, a GID, and then a bunch of value columns.  I simply want the user to be able to use his own computer resources to select the value columns, select the ranges of the classes for the colors, and perhaps select the color ramp.  I already have a Django project which allows the user to generate the layers (select the appropriate geometry and value columns and crosstab them into a single PostGIS view.)

We have a partially implemented system using Mapserver and Openlayers, but the maps are delivered as bitmaps by the server, which means sending full bitmaps every time the user changes the ranges or selects a different value column.  Here are the technologies I think I can use to do it in the browser alongside my existing Django code:

1) Javascript, probably GeoEXT http://geoext.org/ using open layers, so the browser draws the map, it seems this should be dead-easy and there should be a cut-n-paste example out there but I've been struggling a bit trying to find one,

2) Java applet, there must be one out there I can customize but I haven't found one yet (admittedly haven't looked too hard yet for a Java applet, because I've been preferring the idea of Javascript)

3) Adobe flash/flex, I have no experience with this and the development environment is not open-source, but it looks pretty flexible. I can probably grab code from a colleague of mine who does have something similar already working, but when I looked his code it looked pretty complex internally and it used a few non-open-source libraries.

Any suggestions or thoughts?  I have a feeling that there is A Very Easy Solution out there that I'm not finding.

Alternatively, I could use

4) a QGIS plugin, abandoning the web interface all together, moving my existing python code for generating the layer out of Django and into QGIS, then using QGIs to view the layer.  This would require me to deliver and support QGIS.

John Abraham
postgis-users mailing list
postgis-users at postgis.refractions.net<mailto:postgis-users at postgis.refractions.net>


Andrew W. Hill

Faculty of Geo-Information Science and Earth Observation (ITC)
University of Twente
Chamber of Commerce: 501305360000

E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.

More information about the postgis-users mailing list