mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
f58dd3d04f
lat lon -> geopoint correct location for gps if small keypoints number
28 lines
676 B
C#
28 lines
676 B
C#
using Azaion.Common.Extensions;
|
|
|
|
namespace Azaion.Common.DTO;
|
|
|
|
public class SatTile
|
|
{
|
|
public int X { get; }
|
|
public int Y { get; }
|
|
public GeoPoint LeftTop { get; }
|
|
public GeoPoint BottomRight { get; }
|
|
public string Url { get; set; }
|
|
|
|
|
|
public SatTile(int x, int y, int zoom, string url)
|
|
{
|
|
X = x;
|
|
Y = y;
|
|
Url = url;
|
|
|
|
LeftTop = GeoUtils.TileToWorldPos(x, y, zoom);
|
|
BottomRight = GeoUtils.TileToWorldPos(x + 1, y + 1, zoom);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"Tile[X={X}, Y={Y}, TL=({LeftTop.Lat:F6}, {LeftTop.Lon:F6}), BR=({BottomRight.Lat:F6}, {BottomRight.Lon:F6})]";
|
|
}
|
|
} |