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

Stephen Woodbridge woodbri at swoodbridge.com
Mon Apr 2 11:44:12 PDT 2012

Hi John,

I think you need to decide if you want to do the classification on 
server or in the client or both.

1. in the client
This implies that you have to send all the polygons and attributes to 
the client and have code in the client for classifing the polygons and 
and assigning colors and drawing them

2. on the server
You need to decide what tool is best for classifying you polygons and if 
it can output data in a format you need or work with a tools that can 
output the format you need at the client.
Now you have to decide what you want the format output to be then pick 
the best tool for that. Mapserver generally renders images, but it is 
possible to get it to render MKL, GeoJson and other formats other than 
images. I often write simple PHP Ajax handlers that talk to 
PostgreSQL/PostGIS to issues queries and then reformat the query output 
into the form I want.

3. some combined approach
Here you need to decide what is best done in the client vs the server 
and build that out as needed.

There are trade offs for each approach. Maybe you can extend your Django 
project. There are lots of articles and books written on choropleth 
generation there is no "standard" choropleth. The best choropleth for a 
given data set is highly dependent on the data and what you need to show 
about the data.

   -Steve W

On 4/2/2012 12:48 PM, John Abraham 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
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list