Commit 1779ac75 authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

Fix coordinate translation

off-by-one error witnessed by improved translation tests
in commit c503d9d7
parent c503d9d7
......@@ -49,8 +49,8 @@ func (c *Composite) calibrateProjection() {
// calibrate scaling
resx, resy := c.Translate(edgeBottom, edgeRight)
c.Rx = resx / float64(c.Dx-1)
c.Ry = resy / float64(c.Dy-1)
c.Rx = (resx) / float64(c.Dx)
c.Ry = (resy) / float64(c.Dy)
}
// Translate translates geographical coordinates (latitude north, longitude east) to the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment