[postgis-devel] Rounding in Tests

David Zwarg dzwarg+postgis at azavea.com
Tue Nov 2 15:15:04 PDT 2010


Hello Raster devs,

I'm setting up regression tests for rotation, skew, etc.

I'm finding that the values of rotation, skew, and pixel size are off by
very small floating point errors (on the order of 3.85e-15). Is it unholy
and wrong to do some rounding in the tests, to accommodate these floating
point errors in the regression tests?

I'm thinking of something like:

... where round(st_rotationx(rast)::numeric,15) = 30.0;

Please advise,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20101102/7dc75ccd/attachment.html>


More information about the postgis-devel mailing list