[postgis-users] showing the distribution of locations from a table on a world's map

Michael Fuhr mike at fuhr.org
Sun Aug 6 07:00:39 PDT 2006


On Sun, Aug 06, 2006 at 08:13:36AM +0000, XorX xorx wrote:
> I've a table with locations from around the world, I'd like to show a kind 
> of "index map" that allows users to see the world with an overlay of 
> rectangular areas on it showing the number of locations existing inside 
> each area. I was thinking in drawing the gist index bounding boxes as those 
> rectangular areas and write some SQL to count the number of locations that 
> fall within and then draw each area and its number of locations on the map.
> 
> Do you think this is a good approach or are some simpler or better way to 
> do that? Actually I don't know if getting the gist bounding boxes is 
> possible.

You can use gevel to get statistics, including bounding boxes, about
GiST indexes.  Whether that'll help generate a useful map is another
matter :-)

http://www.sai.msu.su/~megera/postgres/gist/

-- 
Michael Fuhr



More information about the postgis-users mailing list