Petr Sloup
965b88d7c8
Save context state only when it's actually necessary
2015-10-16 16:30:16 +02:00
Petr Sloup
d950dada31
Minor type fix
2015-10-16 16:30:16 +02:00
Petr Sloup
e49f529fe6
Add typedefs for functions returning tiles/images
2015-10-16 16:30:16 +02:00
Petr Sloup
6f9fa4c12e
Minor documentation improvements
2015-10-16 16:30:04 +02:00
Petr Sloup
b816128728
Avoid assignment in return statement
2015-10-16 15:46:51 +02:00
Petr Sloup
70021be919
Use lower-case parameter names even for matrices
2015-10-16 15:45:34 +02:00
Petr Sloup
32fa3501df
Update tests
2015-10-16 09:28:43 +02:00
Petr Sloup
a7cde96056
Simplified wrapX handling
...
"Unwrap" the coordinates obtained from transformations and utilize wrapX
capabilities of the sources to handle calculations of TileRanges and
unwrapped tile extents.
2015-10-16 09:28:43 +02:00
Petr Sloup
52a7c5e582
Rename some private/local variables to increase readability
2015-10-16 09:28:43 +02:00
Petr Sloup
f52f9b6817
Rename ol.RASTER_REPROJ_* constants to full ol.RASTER_REPROJECTION_*
2015-10-16 09:28:43 +02:00
Petr Sloup
9f8ab48f1f
Minor improvements based on pull request comments
2015-10-16 09:28:43 +02:00
Petr Sloup
8fb1d1f244
Remove usage of various goog.* functions
...
goog.isNull, goog.isDefAndNotNull and goog.array.*
2015-10-16 09:28:43 +02:00
Petr Sloup
f3d5d16a82
Remove use of goog.isDef
2015-10-16 09:28:43 +02:00
Petr Sloup
783acfa961
Use ol.math.clamp instead of goog.math.clamp
2015-10-16 09:28:43 +02:00
Petr Sloup
3f897cfb79
Minor typo fix
2015-10-16 09:28:43 +02:00
Petr Sloup
c6e2c6a16e
Add demonstration of layer extent setting to reprojection example
2015-10-16 09:28:43 +02:00
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
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
Petr Sloup
9b82f19cc2
Simplify triangle-shifting logic for reprojection
2015-10-16 09:28:41 +02:00
Petr Sloup
3f567b0bf0
Use per-projection tilecaches and tilegrids (persistent instances)
2015-10-16 09:28:40 +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
e14bede9e9
Make projection parameter of ol.source.Tile#getTile no longer optional
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
b221e1ac1f
Basic integration of raster reprojection for tiled sources
...
To allow for easier testing and debugging
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
Petr Sloup
44a64ba451
Add ol.math.solveLinearSystem
2015-10-16 09:28:40 +02:00
Petr Sloup
eac5d652cf
Check projection.canWrapX() before wrapping tiles
...
Even if wrapX is true on the source
2015-07-02 15:21:34 +02:00
Petr Sloup
5993b45c63
Allow custom tileGrid in ol.source.XYZ
2015-06-19 19:58:06 +02:00
Petr Sloup
f1f0b37bdc
Stronger type checking to continue only if data is defined
2015-04-14 14:15:47 +02:00
Petr Sloup
65583a8b77
preemptive is now true by default + improved documentation
2014-12-12 12:19:20 +01:00
Petr Sloup
7bcd925cdb
Minor code style fix
2014-12-12 11:55:55 +01:00
Petr Sloup
82a30b4cd5
Modified the sync/async behavior logic of the forDataAtCoordinate* methods
2014-12-12 11:47:35 +01:00
Petr Sloup
d28ffc4808
Use null instead of undefined in the callback
2014-12-06 15:42:40 +01:00
Petr Sloup
b03b762500
More properties made private
2014-12-06 15:26:49 +01:00
Petr Sloup
48478c6868
Listen 'mousemove' and 'click' rather than 'pointermove' in the TileUTFGrid example
2014-12-06 15:21:14 +01:00
Petr Sloup
ca77a20b57
Improved TileUTFGrid example
2014-12-06 15:07:52 +01:00
Petr Sloup
ac144d934f
Documentation blocks for the option members
2014-12-06 14:19:56 +01:00
Petr Sloup
250a1e4da3
Various code style fixes
2014-12-06 14:13:22 +01:00
Petr Sloup
363ac54509
Suppress warning about dot notation (compiler would report undefined properties)
2014-12-05 20:26:33 +01:00
Petr Sloup
c8bc3620d3
Added TileUTFGrid example
2014-12-05 17:33:30 +01:00
Petr Sloup
4b605d40d9
getTemplate method to get the Mustache template from the TileJSON
2014-12-05 16:07:37 +01:00
Petr Sloup
ef816d30ed
The preemptive loading of UTFGrid tiles is now optional
2014-12-05 16:07:37 +01:00
Petr Sloup
99eab24b20
Implementation of the ol.source.TileUTFGridTile_#getData method
2014-12-05 16:07:36 +01:00
Petr Sloup
9f7e94ec85
Added UTFGridJSON to the TileJSON externs
2014-12-05 16:07:35 +01:00
Petr Sloup
641a829918
Incomplete getFeatureInfo implementation
2014-12-05 16:07:34 +01:00
Petr Sloup
794c7950c8
Added ol.source.TileUTFGrid
2014-12-05 16:07:34 +01:00
Petr Sloup
d7027a6a64
Export getLayers and setLayers methods of ol.layer.Group
...
This is nicer than having to use .get("layers") and .set("layers", x).
2014-08-18 13:48:42 +02:00