2025-02-27 18:46:32 +01:00
|
|
|
|
using System;
|
2020-03-20 18:12:56 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public class WmtsTileMatrixSet
|
|
|
|
|
|
{
|
2025-10-30 16:33:35 +01:00
|
|
|
|
public WmtsTileMatrixSet(string identifier, string supportedCrsId, IEnumerable<WmtsTileMatrix> tileMatrixes)
|
2020-03-20 18:12:56 +01:00
|
|
|
|
{
|
2025-10-30 16:33:35 +01:00
|
|
|
|
if (string.IsNullOrEmpty(supportedCrsId))
|
2020-03-20 18:12:56 +01:00
|
|
|
|
{
|
2025-10-30 16:33:35 +01:00
|
|
|
|
throw new ArgumentException($"The {nameof(supportedCrsId)} argument must not be null or empty.", nameof(supportedCrsId));
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2021-02-11 23:34:37 +01:00
|
|
|
|
if (tileMatrixes == null || !tileMatrixes.Any())
|
2020-03-20 18:12:56 +01:00
|
|
|
|
{
|
2025-02-28 16:25:12 +01:00
|
|
|
|
throw new ArgumentException($"The {nameof(tileMatrixes)} argument must not be null or an empty collection.", nameof(tileMatrixes));
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Identifier = identifier;
|
2025-10-30 16:33:35 +01:00
|
|
|
|
SupportedCrsId = supportedCrsId;
|
2020-03-20 18:12:56 +01:00
|
|
|
|
TileMatrixes = tileMatrixes.OrderBy(m => m.Scale).ToList();
|
|
|
|
|
|
}
|
2022-12-01 23:01:06 +01:00
|
|
|
|
|
|
|
|
|
|
public string Identifier { get; }
|
2025-10-30 16:33:35 +01:00
|
|
|
|
public string SupportedCrsId { get; }
|
2022-12-01 23:01:06 +01:00
|
|
|
|
public IList<WmtsTileMatrix> TileMatrixes { get; }
|
2020-03-20 18:12:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|