Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a grid of points, each with a value to it as shown in the image below. The data was retrieved from PostGIS and rendered in Quantum GIS. The final result should be a polygons of a choropleth map that will be used to render on the browser.

Question: How can PostGIS use the grid of weighted points to create the choropleth polygons?

Initial enter image description here

Desired result

Polygons to be created in PostGIS, rendered in Leaflet. Classes group according to some rule like:

d > 1000 ? '#800026' :
d > 500  ? '#BD0026' :
d > 200  ? '#E31A1C' :
d > 100  ? '#FC4E2A' :
d > 50   ? '#FD8D3C' :
d > 20   ? '#FEB24C' :
d > 10   ? '#FED976' :

enter image description here

share|improve this question
Of course it's possible that there will be more than one polygon for given value (they're not near by), rigth? – Jakub Kania Apr 19 '13 at 12:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.