Commit Graph

17517 Commits

Author SHA1 Message Date
Petr Sloup 6431622881 Use better URL for BNG tiles in reprojection example 2015-10-16 09:28:43 +02:00
Petr Sloup 00a8b4da16 Increase readability of reprojection example
Use map/layer terminology more clearly and clarify checkbox usage
2015-10-16 09:28:43 +02:00
Petr Sloup 0f09607725 Slightly decrease build size when reprojection code is disabled 2015-10-16 09:28:43 +02:00
Petr Sloup 94caa07168 Minor code style, documentation and typo fixes 2015-10-16 09:28:43 +02:00
Petr Sloup 5388f96551 Reproject image sources only if actually needed 2015-10-16 09:28:42 +02:00
Petr Sloup 3353eeb0c3 Fix IE9 test timeouts by using different pixel placeholder
IE9 seems to have occasional problems with decoding
the data protocol url used before (single pixel placeholder).
2015-10-16 09:28:42 +02:00
Petr Sloup 402697c369 Specify crossOrigin in reprojection examples to fix WebGL errors 2015-10-16 09:28:42 +02:00
Petr Sloup 4bcea473eb Fix reprojection-by-code example in IE9 by using JSONP 2015-10-16 09:28:42 +02:00
Dalibor Janák 043b206705 OpenStreetMap reprojection example 2015-10-16 09:28:42 +02:00
Petr Sloup 76974a5888 Minor improvements of reprojection examples 2015-10-16 09:28:42 +02:00
Petr Sloup 59bce75d2a Improved documentation 2015-10-16 09:28:42 +02:00
Petr Sloup 7a1533925a Reprojection code refactoring and cleaning 2015-10-16 09:28:42 +02:00
Petr Sloup a2ae2f0f3e Add rendering tests for ol.reproj.Image 2015-10-16 09:28:42 +02:00
Petr Sloup f078a9c935 Add rendering tests for ol.reproj.Tile 2015-10-16 09:28:42 +02:00
Petr Sloup 404fa10bb7 Make resembleCanvas available to tests 2015-10-16 09:28:42 +02:00
Petr Sloup 8f1aab9236 Add tests for ol.source.TileImage 2015-10-16 09:28:42 +02:00
Petr Sloup c899100dab Add tests for ol.reproj.* 2015-10-16 09:28:42 +02:00
Petr Sloup 0c48a560b2 Add reprojection example with proj4 defs loading from EPSG.io 2015-10-16 09:28:42 +02:00
Petr Sloup 690a5f1f90 Add reprojection example for ol.source.ImageStatic 2015-10-16 09:28:42 +02:00
Petr Sloup 87337570e0 Add reprojection example for tiled raster sources 2015-10-16 09:28:42 +02:00
Petr Sloup 7864ed7861 Force subdivision when transformation returns infinite coordinate 2015-10-16 09:28:42 +02:00
Petr Sloup 03c75a8648 Transformation caching during reprojection triangulation
This usually saves around 30-35% of transformation calls.
2015-10-16 09:28:42 +02:00
Petr Sloup 726bcbef83 Alternative reprojection triangulation strategy
The quads are now subdivided more granually (to 2 instead of 4), which
usually leads to reduced number of triangles and higher performance.
2015-10-16 09:28:42 +02:00
Petr Sloup 016df5b902 Minor ol.reproj.Image fixes 2015-10-16 09:28:42 +02:00
Petr Sloup 14e20e23a0 Correctly reproject projections with undefined units 2015-10-16 09:28:42 +02:00
Petr Sloup aad5f94556 Minor type fix in ol.reproj.Image 2015-10-16 09:28:42 +02:00
Petr Sloup 615b54eb67 Use error threshold for image sources reprojection 2015-10-16 09:28:42 +02:00
Petr Sloup fc23a38692 Take target extent into account when ensuring minimal reproj subdivision 2015-10-16 09:28:41 +02:00
Petr Sloup 3b1d72202a Correctly reproject sources in wrappable projection
With extent smaller than the projection extent
2015-10-16 09:28:41 +02:00
Petr Sloup 4c236a64b8 Handle canvas clip antialiasing during reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup 3cc8291df4 Support pixelRatio during reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup c2b21985f4 Add ol.source.TileImage#setTileGridForProjection method 2015-10-16 09:28:41 +02:00
Petr Sloup 168b675191 Add reprojectionErrorThreshold option to the tiled image sources 2015-10-16 09:28:41 +02:00
Petr Sloup ebc1bc0096 Better handling of tilegrids without extent during reprojection
For WMTS source, the tilegrid has no extent, but the projection can
2015-10-16 09:28:41 +02:00
Petr Sloup be6bf00d74 Add defines for certain reprojection constants 2015-10-16 09:28:41 +02:00
Petr Sloup f481070f82 Handle tilegrids without extent during tile reprojection 2015-10-16 09:28:41 +02:00
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 0f408e341f Rename ol.source.Image#getImage implementations to #getImageInternal
This allows for the reprojection to be initialized in the #getImage,
while #getImageInternal is used to obtain the actual data.
2015-10-16 09:28:41 +02:00
Petr Sloup ed1e49045a Allow different source and view projection in image layer renderers
To enable image layer reprojection.
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 15575288e0 Add ol.ENABLE_RASTER_REPROJECTION define 2015-10-16 09:28:41 +02:00
Petr Sloup f2f77091ad Handle tile sources without projection
Such sources should never be reprojected (and no additional tilecache or
tilegrid should be created).
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 b0694c1e3b Add projection parameter to ol.source.Tile#expireCache and #useTile
This is required to be able to determine which cache the xyz coordinates
refer to (in case we have more caches).
2015-10-16 09:28:41 +02:00
Petr Sloup e0cfa1951a Add projection parameter to ol.source.Tile#forEachLoadedTile 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