FME Version
Introduction
The WebMapTiler offers several tiling schemes. The best scheme to use depends on the type of output tile you require. Is a 256x256 tile OK, or do you need a custom size? Do you want Web Mercator or Geographic projection? The following illustration of each tiling scheme can help you decide which is most useful.
GoogleMapsCompatible
This is the most commonly used scheme, since it reproduces the tiling scheme used in Google and Bing Maps. An in-depth description of the tiling scheme can be found on MSDN.
The source raster for the tile must be in the Web Mercator projection (EPSG:3857). This is a simplified Mercator using a spherical earth, extending from latitude 85, longitude -180 to latitude -85, longitude 180, with units in meters.
Tile size is fixed at 256 x 256 pixels. Level 0 represents the entire world in a single tile. Tiling starts from the upper left corner, with rows numbering down and columns numbering to the right.
Some Tile Map Servers may need different tile numbering. This is easy to do using the ExpressionEvaluator transformer. For example, to convert to tile number starting in the center and numbering up and right, you can use the expressions:
column_1 = _tile_column - (2**(_zoom_level - 1)) row_1 = (2**(_zoom_level - 1) - 1) - _tile_row
GoogleMapsCompatible zoom level 0 tiles (column, row):
GoogleMapsCompatible zoom level 1 tiles:
GoogleMapsCompatible zoom level 3 tiles:
GoogleCRS84Quad
This is similar to the GoogleMapsCompatible described above, but uses geographic latitude, longitude coordinates instead of the Web Mercator projection. Source images for the WebMapTiler must in the WGS 84 lat/long coordinate system (EPSG:4326). Extents are from latitude 90, longitude -180 to latitude -90, longitude 180, with units in degrees.
Tile size is fixed at 256 x 256 pixels. Tiling starts from the upper left corner, with rows numbering down and columns numbering to the right. Zoom Level 0 represents the entire world in a single tile, but because the data extents are rectangular rather than square, the first and last 64 rows have null values. Zoom Level 1 has two tiles, an east and a west. Subsequent zoom levels have twice as many tiles horizontally as vertically.
Some Tile Map Servers may need different tile numbering. This is easy to do using the ExpressionEvaluator transformer. For example, to convert to tile number starting in the center and numbering up and right, you can use the expressions:
column_1 = _tile_column - (2**(_zoom_level - 1)) row_1 = (2**(_zoom_level - 2) - 1) - _tile_row
GoogleCRS84Quad zoom level 0:
GoogleCRS84Quad zoom level 1:
GoogleCRS84Quad zoom level 3:
GlobalCRS84Scale and GlobalCRS84Pixel
These two tiling schemes are essentially the same except for the zoom level scaling. Source images for the WebMapTiler must in the WGS 84 lat/long coordinate system (EPSG:4326). Extents are from latitude 90, longitude -180 to latitude -90, longitude 180, with units in degrees.
Unlike the previous schemes, these have a user defined tile size, so the number of tiles depends on both the zoom level and the tile size. For example, a GlobalCRS84Pixel tile set with zoom level 4 and tile size of 270, and a tile set with a zoom level of 5 and a tile size of 540 will produce the same number of tiles, but the zoom level 5 tiles will have twice the resolution:
GlobalCRS84Scale zoom levels use a consistent scale factor, with each level pixel size being half of that above it:
Level | Degrees |
0 | 1.25764139776733 |
1 | 0.628820698883665 |
2 | 0.251528279553466 |
3 | 0.125764139776733 |
4 | 6.28820698883665e-2 |
5 | 2.51528279553466e-2 |
6 | 1.25764139776733e-2 |
7 | 6.28820698883665e-3 |
8 | 2.51528279553466e-3 |
9 | 1.25764139776733e-3 |
10 | 6.28820698883665e-4 |
11 | 2.51528279553466e-4 |
12 | 1.25764139776733e-4 |
13 | 6.28820698883665e-5 |
14 | 2.51528279553466e-5 |
15 | 1.25764139776733e-5 |
16 | 6.28820698883665e-6 |
17 | 2.51528279553466e-6 |
18 | 1.25764139776733e-6 |
19 | 6.28820698883665e-7 |
20 | 2.51528279553466e-7 |
GlobalCRS84Pixel zoom levels are somewhat arbitrary, chosen for convenient pixel sizes:
Level | Spacing (degrees) |
0 | 2 |
1 | 1 |
2 | 0.5 |
3 | 0.333333333333333 |
4 | 0.166666666666667 |
5 | 8.333333333333333e-2 |
6 | 3.333333333333333e-2 |
7 | 1.666666666666667e-2 |
8 | 8.333333333333333e-3 |
9 | 4.166666666666667e-3 |
10 | 1.388888888888889e-3 |
11 | 8.333333333333333e-4 |
12 | 2.777777777777778e-4 |
13 | 1.388888888888889e-4 |
14 | 8.333333333333333e-5 |
15 | 2.777777777777778e-5 |
16 | 8.333333333333333e-6 |
17 | 2.777777777777778e-6 |
Comments
0 comments
Please sign in to leave a comment.