2025-02-27 18:46:32 +01:00
|
|
|
|
#if WPF
|
2020-03-20 18:12:56 +01:00
|
|
|
|
using System.Windows;
|
2025-08-19 19:43:02 +02:00
|
|
|
|
#elif AVALONIA
|
|
|
|
|
|
using Avalonia;
|
2020-03-20 18:12:56 +01:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2025-09-15 17:46:31 +02:00
|
|
|
|
// See 07-057r7_Web_Map_Tile_Service_Standard.pdf, section 6.1.a, page 8:
|
|
|
|
|
|
// "standardized rendering pixel size" is 0.28 mm
|
|
|
|
|
|
//
|
|
|
|
|
|
public class WmtsTileMatrix(
|
|
|
|
|
|
string identifier, double scaleDenominator, Point topLeft,
|
|
|
|
|
|
int tileWidth, int tileHeight, int matrixWidth, int matrixHeight)
|
2020-03-20 18:12:56 +01:00
|
|
|
|
{
|
2025-09-15 17:46:31 +02:00
|
|
|
|
public string Identifier { get; } = identifier;
|
|
|
|
|
|
public double Scale { get; } = 1 / (scaleDenominator * 0.00028); // 0.28 mm
|
|
|
|
|
|
public Point TopLeft { get; } = topLeft;
|
|
|
|
|
|
public int TileWidth { get; } = tileWidth;
|
|
|
|
|
|
public int TileHeight { get; } = tileHeight;
|
|
|
|
|
|
public int MatrixWidth { get; } = matrixWidth;
|
|
|
|
|
|
public int MatrixHeight { get; } = matrixHeight;
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|