go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 195 forks source link

Reduce precision to 8 places for query tokens (including BBOX) so that tests pass #949

Closed jchamberlain closed 10 months ago

jchamberlain commented 1 year ago

The purpose of this PR is to make tests pass on Apple silicon without breaking tests for x86. The assumption (possibly incorrect) is that 8 places of precision is enough for scale demoninator, pixel width and height, and bounding box.

jchamberlain commented 1 year ago

There's more going on here than just precision. I tried getting the TestGenerateTilesForBounds test passing without fully understanding it, but now realize it's failing on arm64 but not amd64 because overflow of unsigned ints is implementation-specific (see https://github.com/golang/go/issues/52943). We'll need a different solution for that test case.

gdey commented 1 year ago

Sounds like there is still an issue here. Were you looking for advice or looking to find a new way to write this test case?

jchamberlain commented 1 year ago

Looking for feedback, including advice on other approaches. I've never used Tegola or anything go-spatial before a couple weeks ago, so I'm assuming there are probably obvious things I'm missing. Any pointers are appreciated.

I've opened #951 to track this better.

jchamberlain commented 1 year ago

This address the first part of #951.

I've removed the changes to TestGenerateTilesForBounds as that is handled in #952. Now this contains only precision formatting changes.

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build f609b1416-PR-949


Totals Coverage Status
Change from base Build a6f1b0cd3: 0.0%
Covered Lines: 6571
Relevant Lines: 14024

💛 - Coveralls
ARolek commented 10 months ago

I just merged this into master but the PR didn't close. ref: https://github.com/go-spatial/tegola/commit/b7ad33bafd713e72254c01786c45dc441b7c3406