[postgis-users] Rounding off coordinates

strk strk at keybit.net
Mon Jun 28 06:47:46 PDT 2004


I've implemented a grid-based reduction function for postgis
which in fact rounds off coordinates.

It currently take a reference point and
a grid size (height, width of grid cell). Makes each geometry
point stick on the grid and removes duplicated point (thus
reduction).

If you are interested in supporting integration in postgis
I'll work on that.

--strk;

On Mon, Jun 28, 2004 at 03:33:09PM +0200, Gino Lucrezi wrote:
> > new.lon := round(X(new.the_geom)::numeric,2);
> > new.lat := round(Y(new.the_geom)::numeric,2);
> 
> This is simple if you're working with point data; but what if you're using any more complex data type, e.g. a line or a polygon? 
> :-(
> 
> Gino Lucrezi
> Penta Consulting Services Srl
> 
> 
> _______________________________________________
> 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