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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.