2

I am trying to write a program which will render tiles from EPSG2180-based WMTS server. Given coordinates of a point (WSG84 or EPSG2180, I can convert from one to another) I want to render a tile containing it.

Each TileMatrix has info about TileWidth/Height, MatrixWidth/Height, TopLeftCorner and I understand what they mean. However, they don't seem sufficient to translate lat/lon to row/column. Apart from those each TileMatrix has mysterious ScaleDenominator value.

What is ScaleDenominator and what is the relationship between it and other values describing TileMatrix? How can I use it to translate lat/lon to tile's row/column?

  • 2
    The standard portal.opengeospatial.org/files/?artifact_id=35326 tries to give an answer to both of your questions. Please quote the parts that remains unclear for you. – user30184 Mar 18 at 19:54
  • 1
    Everything is clear now, thank you very much! As an amateur I didn't even think of googling "wmts standard", I didn't expect such doc to be so human-friendly. Thanks again! – hugo Mar 18 at 20:54
  • 2
    @hugo please add and accept an answer to help out future users who have the sam equestion – Ian Turton Mar 19 at 8:34
2

Standard linked by @user30184 ( portal.opengeospatial.org/files/?artifact_id=35326 ) explicitly and precisely defines ScaleDenominator.

Scale of tiled map is 1:ScaleDenominator. Each pixel is assumed to be 0.28mm, which allows to calculate span of each tile in meters by multiplying TileWidth (or TileHeight) by ScaleDenominator * 0.00028.

Knowing real-world size of each tile in meters (and knowing that the CRS used is EPSG 2180, which uses meter as its base unit), I was finally able to determine size of the whole matrix and choose appropriate tile for given coordinates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.