[postgis-users] quantiles, quartiles, or jenks natural breaks

Randy Goss rsgoss at comcast.net
Thu Feb 16 05:22:23 PST 2006


I have set up an instance of Postgres with PostGIS and PL/R.  It is not 
that difficult to do, and it is quite powerful.  You will not need to 
know much about R, as there are good examples for setting up your own 
custom aggregate functions included within the plr distribution 
including one for calculating the median.   Modifying the median 
aggregate to calculate other quantiles should be easy.

With regard to the natural breaks, you might want to reference the 
following paper.

http://spatial.nhh.no/papers/aag04.pdf

>I'm looking at creating some classification methods for PostGIS data
>for display in MapServer.  I'd like to classify my data using either 5
>quantiles or 5 class Jenks Natural Breaks.  Has anyone out there done
>similar classifications?  I think I could get at the quantiles through
>PL/R (which would entail learning some R), but have no idea where I
>would even start with the Natural Breaks.  Ideally, I'd love to
>perform both of these in PL/PGSQL to keep the number of different PL's
>I use in check.
>
>Has anyone implemented any of these classifications in PostgreSQL?
>_______________________________________________
>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