[postgis-users] Rounding off coordinates

Gino Lucrezi gino-postgis at lucrezi.net
Fri Jun 25 01:29:35 PDT 2004


> While I'm a strong proponent of recording spatial coordinates to the 
> extents of their accuracy, I'm similarly a proponent of appropriate 
> management of the error terms to not infer extended accuracy in cases 
> where we have no basis.

That's what I'd like to do. Keep as many digits as possible for internal storage, display to the user only those digits which are accurate enough.

A double precision floating point number has enough digits to allow for molecular-precision positioning :-) but I don't want to show them.

Is there a way to truncate those digits easily without adding more tools? When I inspect geometry data inside psql or pgadmin they get in the way.

If there is no way, and no one is working on it, I'd like to extend ROUND and TRUNC to handle geometry objects.

Gino Lucrezi
Penta Consulting Services Srl




More information about the postgis-users mailing list