Hi!

I'm implementing a dynamic clustering of points in a map, where if you
zoom out, any area with too many points in it has its points replaced by
a big circle with the number of points it's covering written on it. When
you zoom in, the big circles are gradually replaced with several smaller
circles and finally with individual points.

On the server side this is implemented using ST_SnapToGrid followed by a
group by (with count) over the table with the points. Then for each row
where count < some number, a new select query is done to get the actual
points in the area.

The problem is that I seem to get the are to select points from wrong.
So, here's the question:

    Given that

    ST_SnapToGrid(ST_Point(lon, lat), sizeLon, sizeLat) =
    ST_Point(resultLon, resultLat)

    for a given pair of values resultLon and resultLat, and given
    sizeLon and sizeLat, what are the min and max values for lon and lat?

This does not seem to be documented anywhere in
http://postgis.net/docs/manual-2.0/ST_SnapToGrid.html :(

Best regards,
Egil


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to