How easy is it to combine different tile services in one map? For instance, how easy is it to combine Google Maps aerial photos with a roads overlay from a TMS. Well this depends on two things, 1) how smart is the client, and 2) how compatible are the tile schemas. Here we look at several levels of compatibility taking the TMS specification as an example.
In TMS a tile schema is described in a TileMap. The main parameters involved are:
- Origin: the coordinate where the first tile starts. It is the bottom left corner of tile (0, 0).
- BoundingBox: the extent in which tiles are available. The BoudingBox's bottom left coordinate is often identical to the origin but doesn't have to be.
- TileSets (levels): a list of the available tile levels and their resolutions.
1) The same
Okay, lets keep this short, sometimes the schema's are just the same.
2) In the same tile system
When the BoundingBox's are different but the Origin and TileSets are the same a tile in one schema will have the same x ,y and level as it's corresponding tile in the other schema. The only difference between the schema's is that some tiles can be available in one scheme but not in the other.
The two schemas can be said to be in the same tile system. If the TileSets are perceives as a Z-axis it forms a kind of three dimensional coordinate system for tiles. The origin of that space is defined by Origin.X, Origin.Y and the resolution of the first TileSet. The steps are defined by the tile width, tile height, the step size between resolutions (which can be irregular to complicate things).
3) Project to another tile system
When the tile system differs it is sometimes possible to transform a tile in one tile system to the other tile system. For instance when in one schema the Y-Axis is inverted with respect to the other it is easy to see how tile (0, 0) can be mapped to tile (0, count - 1). Such a trick is sometimes used in simple cases. I have not seen it done for more complicated relations.
4) Project to the map
When all parameters are different it is still possible to simply project the tiles to the map canvas not one tile onto another. The price is that you have to do this for every tile layer separately. This can hit performance and might consume more memory because more tile layers and possibly image containers will be needed (depending on your client).
0 comments:
Post a Comment