mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:36:30 +00:00
31 lines
793 B
C#
31 lines
793 B
C#
using Azaion.Common.Extensions;
|
|
|
|
namespace Azaion.Common.DTO;
|
|
|
|
public class SatTile
|
|
{
|
|
public int X { get; }
|
|
public int Y { get; }
|
|
public double LeftTopLat { get; }
|
|
public double LeftTopLon { get; }
|
|
|
|
public double BottomRightLat { get; }
|
|
public double BottomRightLon { get; }
|
|
public string Url { get; set; }
|
|
|
|
|
|
public SatTile(int x, int y, int zoom, string url)
|
|
{
|
|
X = x;
|
|
Y = y;
|
|
Url = url;
|
|
|
|
(LeftTopLat, LeftTopLon) = GeoUtils.TileToWorldPos(x, y, zoom);
|
|
(BottomRightLat, BottomRightLon) = GeoUtils.TileToWorldPos(x + 1, y + 1, zoom);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"Tile[X={X}, Y={Y}, TL=({LeftTopLat:F6}, {LeftTopLon:F6}), BR=({BottomRightLat:F6}, {BottomRightLon:F6})]";
|
|
}
|
|
} |