OpenGeoscience / geojs

High-performance visualization and interactive data exploration of scientific and geospatial location aware datasets
https://opengeoscience.github.io/geojs
Apache License 2.0
433 stars 75 forks source link

Handle high zoom levels better #481

Closed manthey closed 8 years ago

manthey commented 8 years ago

At high zoom levels, there are several issues:

At zoom levels 17 or 18, the html and d3 renderers fail to show tiles because the css offsets are too large for browsers to handle. To fix this, we need to adjust the camera and tile offsets. This needs to be done keeping in mind that we want to rotate and tilt camera views in the future.

When using the standard map projections, at zoom levels about 18 or so, the vgl renderer starts misaligning tiles. This is due to a loss in precision from the proj4 computations. Either we need to increase the precision used in proj4 or provide an alternative for common projections.

At zoom level 25 or so, the vgl renderer starts having issues with tile alignment even when using pixel coordinates rather than a map projection.

When panning at zoom levels of 19 or higher, the pan becomes rough.

manthey commented 8 years ago

The loss of precision in the vgl renderer is caused by using a vec3 to store the tile origins. vec3 uses a GLMAT_ARRAY_TYPE, which is 32-bit floating point, and thus loses precision of the origin. I'll have a simple change to vgl that addresses this. It doesn't fix the problems with the html and d3 renderers or with panning.

aashish24 commented 8 years ago

The loss of precision in the vgl renderer is caused by using a vec3 to store the tile origins. vec3 uses a GLMAT_ARRAY_TYPE, which is 32-bit floating point, and thus loses precision of the origin. I'll have a simple change to vgl that addresses this. It doesn't fix the problems with the html and d3 renderers or with panning.

:snowman: I saw the change.. cool!

manthey commented 8 years ago

With PR #482 and the appropriate vgl updates, the vgl renderer looks flawless up to zoom level 42 in Chrome. At levels above that I start to see precision issues.

jbeezley commented 8 years ago

Well, 2^-42 degrees latitude is 25 nanometers.

aashish24 commented 8 years ago

@manthey @jbeezley should we close after https://github.com/OpenGeoscience/geojs/pull/485 goes into master?

manthey commented 8 years ago

This requires the changes in VGL to be complete.

manthey commented 8 years ago

Resolved via PR #497, #482, and others.