points and vertices offset in aven

Olly Betts olly at survex.com
Mon Aug 29 04:54:33 BST 2022

On Sun, Aug 21, 2022 at 12:01:33PM +0100, Wookey wrote:
> I've just noticed that on an extremely large dataset there is an
> offset between station positions and line vertexes, (of about 4-5cm in
> the examples below), visible when the scale bar is between 5m and 1m
> long.  The whole dataset is (due to a coordinate cockup) 5million
> metres long, so we are getting into the limits of the sliding point
> resolution, no doubt. However why would the leg vertices and the
> station positions be slightly different? They represent the same location/co-ordinates.
> This does not appear with 'normal sized' datasets. Quite possibly the
> offset is still there, but too small to be visible?
> (Debian, survex 1.4.2, on a high-DPI screen in case it matters)
> An example illustrating the issue is here:
> http://wookware.org/files/1623.3d
> turn on surface legs, search for p161a or p258b and zoom in all the
> way to see this issue.

For additional fun, then set it rotating.

> Why?

As the survey extent grows, the near and far planes in the OpenGL
projection that aven creates have to be moved apart.  I suspect this
ends up pushing the precision of calculations that are done by the
OpenGL implementation so you're essentially seeing rounding artifacts.

The result is different for legs and labels because they are drawn using
two different OpenGL projections (which projection is used for markers
depends on what the OpenGL implementation supports).

5 million metres is about 1/8 of the circumference of the Earth, so this
probably isn't an problem in practice.


More information about the Survex mailing list