Hello,

I have 1 million points and I need to group them on a grid.
I also need to know how many of thouse points are on each cell of the grid.


My first thought was some SQL like this one:

select count(*) as n , st_snaptogrid(geom, size)
from myPoints group by st_snaptogrid(geom, size)

I thought as well about indexing myPoints table and even do some clustering (Cluster geom on myPoints)

Which is the best way to do this query?

Thanks in advanced
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to