namespace WIDESEAWCS_RedisService.Geo { public interface IGeoLocationService { /// /// 添加地理位置 /// bool Add(string key, double longitude, double latitude, string member); /// /// 获取成员位置 /// GeoPosition? GetPosition(string key, string member); /// /// 计算两个成员之间的距离(米) /// double? GetDistance(string key, string member1, string member2); /// /// 搜索指定半径内的成员 /// List SearchRadius(string key, double longitude, double latitude, double radiusMeters, int count = 10); /// /// 移除成员 /// bool Remove(string key, string member); } public class GeoPosition { public double Longitude { get; set; } public double Latitude { get; set; } } public class GeoRadiusResult { public string Member { get; set; } = string.Empty; public double? Distance { get; set; } public GeoPosition? Position { get; set; } } }