<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi!<br>
<br>
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.<br>
<br>
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.<br>
<br>
The problem is that I seem to get the are to select points from
wrong. So, here's the question:<br>
<br>
<blockquote>Given that<br>
<br>
ST_SnapToGrid(ST_Point(lon, lat), sizeLon, sizeLat) =
ST_Point(resultLon, resultLat)<br>
<br>
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?<br>
<br>
</blockquote>
This does not seem to be documented anywhere in
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<a href="http://postgis.net/docs/manual-2.0/ST_SnapToGrid.html">http://postgis.net/docs/manual-2.0/ST_SnapToGrid.html</a>
:(<br>
<br>
Best regards,<br>
Egil<br>
<br>
<br>
</body>
</html>