[postgis-devel] Rounding off coordinates

Gino Lucrezi gino-postgisdevel at lucrezi.net
Mon Jun 28 02:10:01 PDT 2004


Hi all!

I posted this request to the postgis-users mailing list, but I got no reply; I assume there is no way yet to do it.

Is anyone already working on this issue? If no one is, I'd try to do it myself and contribute some code to postgis.

Gino Lucrezi
Penta Consulting Services Srl


----------------8<----cut--here----8<------------

Since all coordinates are stored as double precision floating point numbers, they carry a great number of digits.

I know it is good to store them, because they help mitigate error propagation in many cases.

However, when displaying results, it is not really useful to show decimals up into the nanometer range. I'm sure noone's GIS data is SO precise :-)

SQL has the TRUNC and ROUND functions for scalar data. Is there any similar function for geometric data?

Gino Lucrezi
Penta Consulting Services Srl




More information about the postgis-devel mailing list