Commit Graph

68 Commits

Author SHA1 Message Date
Petr Sloup 9a460b5f6b Handle cross-browser canvas antialiasing issues during reprojection
By doing strictly 1 drawImage per triangle; triangle overlapping and
using different blending mode.
2015-10-16 09:28:41 +02:00
Petr Sloup 8b38928aad Make rendering of reprojection edges configurable 2015-10-16 09:28:41 +02:00
Petr Sloup 30cd0aa584 Improve reprojection performance
Utilize the numerical shifting during reprojection to easily reduce
complexity of the linear system that needs to be solved.
2015-10-16 09:28:41 +02:00
Petr Sloup 8ab197eba6 Optimize the reprojection by stitching the sources prior to rendering
This solves canvas antialiasing issues and also simplifies the code
handling wrapX in the source projection.
2015-10-16 09:28:41 +02:00
Petr Sloup 6482ccf2f7 Make ol.reproj.Triangulation a class 2015-10-16 09:28:41 +02:00
Petr Sloup be0a0de759 Integrate image reprojection with ol.source.Image 2015-10-16 09:28:41 +02:00
Petr Sloup c205323ff2 Reproject correctly when transform returns +-Infinity values 2015-10-16 09:28:41 +02:00
Petr Sloup 63084d30e9 Improve numerical stability of reprojection
By shifting the source points before calculating the affine transform to
obtain values from similar ranges (inputs and outputs of the transform).
2015-10-16 09:28:41 +02:00
Petr Sloup 9b82f19cc2 Simplify triangle-shifting logic for reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup bc74273208 Reproject every image only once per triangle
If the triangle has to be shifted, determine if the image has to be rendered shifted or not.
2015-10-16 09:28:40 +02:00
Petr Sloup 6e08fc9e13 Rename triangles to triangulation to be more precise 2015-10-16 09:28:40 +02:00
Petr Sloup bf65b8a4fe Stronger typing of triangles and triangulation 2015-10-16 09:28:40 +02:00
Petr Sloup ac76989447 Detect and handle triangles (tiles) crossing the dateline (projection edge) 2015-10-16 09:28:40 +02:00
Petr Sloup ebc3f24671 Clamp the triangulation vertices if partially outside source extent 2015-10-16 09:28:40 +02:00
Petr Sloup fcffce46b4 More robust way of handling non-global projections
If the target projection has specified extent, it is respected.
Also adds various checks to optimize performance and/or
prevent potential errors.
2015-10-16 09:28:40 +02:00
Petr Sloup 2cc2027353 More precise and robust way of calculating source resolution 2015-10-16 09:28:40 +02:00
Petr Sloup c425b9c0e6 Verify triangulation against source/target extents
If we do this here, we can avoid some computations on triangles that will
be unused in the future anyway + reduce problems with non-global projections
without specified extents.
2015-10-16 09:28:40 +02:00
Petr Sloup 1222287f22 Add ol.reproj 2015-10-16 09:28:40 +02:00