[postgis-users] Geometry precision setting

Mark Leslie mark.leslie at lisasoft.com
Mon Oct 22 00:33:23 PDT 2007


Ramachandran wrote:
> Hi,
> 
> I would like to change Geometry precision setup,  is it possible to
> change in postGIS?
> Actually, i need have precision of 5 digits after the dot placement in
> lat/lat with srid 4326
> for example...
>     42.65832, 12.58464
> 
> Can anyone advise me,  how to get this level of precision in postgis?
> 
> Thanks in advance,
> 

UPDATE table_name SET the_geom = ST_SnapToGrid(the_geom, 0.00001, 0.00001);

See http://postgis.refractions.net/docs/ch06.html#id2681426 under
ST_SnapToGrid for details.
If you need to maintain this precisions through updates and insertions,
you'll need to attach a trigger to the table.

-- 
Mark Leslie
Software Architect
LISAsoft Pty Ltd
www.lisasoft.com



More information about the postgis-users mailing list