XAML-Map-Control/MapControl/Shared/WmtsTileMatrix.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2020-03-20 18:12:56 +01:00
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
2024-02-03 21:01:53 +01:00
// Copyright © 2024 Clemens Fischer
2020-03-20 18:12:56 +01:00
// Licensed under the Microsoft Public License (Ms-PL)
2024-05-22 11:25:32 +02:00
#if WPF
2020-03-20 18:12:56 +01:00
using System.Windows;
#endif
namespace MapControl
{
public class WmtsTileMatrix
{
2022-11-22 19:15:34 +01:00
// See 07-057r7_Web_Map_Tile_Service_Standard.pdf, section 6.1.a, page 8:
// "standardized rendering pixel size" is 0.28 mm
2020-03-20 18:12:56 +01:00
public WmtsTileMatrix(string identifier, double scaleDenominator, Point topLeft,
int tileWidth, int tileHeight, int matrixWidth, int matrixHeight)
{
Identifier = identifier;
2022-11-22 19:15:34 +01:00
Scale = 1 / (scaleDenominator * 0.00028); // 0.28 mm
2020-03-20 18:12:56 +01:00
TopLeft = topLeft;
TileWidth = tileWidth;
TileHeight = tileHeight;
MatrixWidth = matrixWidth;
MatrixHeight = matrixHeight;
}
2021-11-13 00:28:31 +01:00
public string Identifier { get; }
public double Scale { get; }
public Point TopLeft { get; }
public int TileWidth { get; }
public int TileHeight { get; }
public int MatrixWidth { get; }
public int MatrixHeight { get; }
2020-03-20 18:12:56 +01:00
}
}