mapnik/mapnik — pull request #1948 by tomhughes (2013-07-11 18:27:55+00:00)
Title: Avoid rounding errors comparing envelopes

This fixes a couple of test failures with 32 bit builds due to minor differences in precision:

```
======================================================================
FAIL: python_tests.map_query_test.test_map_query_works2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/mapnik-v2.2.0/tests/python_tests/map_query_test.py", line 66, in test_map_query_works2
eq_(str(m.envelope()),str(mapnik.Box2d(-179.999999975,-167.951396161,179.999999975,192.048603789)))
AssertionError: 'Box2d(-179.999999975,-167.95139616,179.999999975,192.04860379)' != 'Box2d(-179.999999975,-167.951396161,179.999999975,192.048603789)'
======================================================================
FAIL: python_tests.map_query_test.test_map_query_in_pixels_works2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/builddir/build/BUILD/mapnik-v2.2.0/tests/python_tests/map_query_test.py", line 89, in test_map_query_in_pixels_works2
eq_(str(m.envelope()),str(mapnik.Box2d(-179.999999975,-167.951396161,179.999999975,192.048603789)))
AssertionError: 'Box2d(-179.999999975,-167.95139616,179.999999975,192.04860379)' != 'Box2d(-179.999999975,-167.951396161,179.999999975,192.048603789)'
======================================================================
```