[OSM-dev] WMSC - bachelor thesis

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Thu Aug 18 05:43:51 BST 2011


sorel johann wrote:
> hi again.
>
>>> 1) WMTS
>>> + provide all requiered informations to properly place tiles in any
>>> position
>> That's not completely true. It only describes the top left coordinate
>> and scale denominator. The client needs to know if the projection is in
>> meter, feet or degrees to convert the scale to resolution, so that it
>> can calculate the lower right corner. Don't know what they where
>> thinking

> WMTS gives you the projection code. so you know what are the projection
> axis and units.
> If your library can't provide those informations, you should change,
> handeling projections
> is the De-Facto thing that makes a GIS library, It's just a cartesian
> library like hundred others if it can't.
>
> beside I don't understand why you need the resolution to find to lower
> right corner,
> you have the grid size, the size of a tile and the top left corner
> coordinate, nothing more needed.

Size of the tile is in pixels. Excerpt from the standard:

"A tile matrix set is composed of a collection of tile matrices, each one
with a resolution optimized for a particular scale and identified by a
tile matrix identifier (see figure 3). Each tile matrix set has an
optional approximated bounding box but each tile matrix has an exact
bounding box that is deduced indirectly from other parameters. Tile matrix
bounding boxes at each scale will usually vary slightly due to pixel
alignment, and it is important for the client and server to take this
variation into account. Given the top left point of the tile matrix in CRS
coordinates (tileMatrixMinX, tileMatrixMaxY), the width and height of the
tile matrix in tile units (matrixWidth, matrixHeight), the width and
height of a tile in pixels (tileWidth, tileHeight), the coefficient to
convert the coordinate reference system (CRS) units into meters
(metersPerUnit) and the scale (1:scaleDenominator), the bottom right
corner of the bounding box of a tile matrix (tileMatrixMaxX,
tileMatrixMinY) can be calculated as follows:
pixelSpan = scaleDenominator × 0.28 10-3 / metersPerUnit(crs);
tileSpanX = tileWidth × pixelSpan;
tileSpanY = tileHeight × pixelSpan;
tileMatrixMaxX = tileMatrixMinX + tileSpanX × matrixWidth;
tileMatrixMinY = tileMatrixMaxY - tileSpanY × matrixHeight;"

What I do not like is that metersPerUnit(crs) is not explained in the
GetCapabilities but you really need to use a library or at least a
handbook for connecting the crs name with its units.

-Jukka Rahkonen-




More information about the dev mailing list