mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

17436 assertions failed in geometry_visual_test.cpp #167

Closed tomhughes closed 8 years ago

tomhughes commented 8 years ago

Using mapnik v3.0.9 when I run the mapnik-vector-tile tests they finish with:

test cases:    73 |   69 passed |     4 failed
assertions: 24976 | 7537 passed | 17439 failed

All bar three of those assertions are in geometry_visual_test.cpp basically due to differences in floating point values, for example:

../test/geometry_visual_test.cpp:144: FAILED:
  CHECK( expected_string == geojson_string )
with expansion:
  "{"type":"Polygon","coordinates":[[[292.640829384327,-52.3018495474332],[292
  .606505490839,-52.16772540059],[389.767150785774,40.5556504157971],[292
  .640829384327,-52.3018495474332]]],"properties":{"is_valid":false,
  "is_simple":true, "message":"Geometry has wrong orientation"}}"
  ==
  "{"type":"Polygon","coordinates":[[[292.133979890496,-52.6181589937385],[292
  .542434222996,-51.9173603264827],[292.606505490839,-52.16772540059],[292
  .133979890496,-52.6181589937385]]],"properties":{"is_valid":false,
  "is_simple":true, "message":"Geometry has wrong orientation"}}"

Some of the differences aren't particularly small though so I think there is something more going on here than just floating point innaccuracy.

flippmoke commented 8 years ago

@tomhughes I vaguely remember something that might have fixed this during v2_spec work, but it is hard to remember honestly and I would probably have to dig into your exact configuration. It might also be that you needed to simply update the test fixtures?

tomhughes commented 8 years ago

Looks like this was fixed in 0.14.2 but I had that test disabled by then so didn't notice.