public static SearchGeoHashIndex ( SessionBase session, double lat, double lon, double radius ) : HashSet |
||
session | SessionBase | |
lat | double | |
lon | double | |
radius | double | |
Résultat | HashSet |
static void Main(string[] args) { CreateData(); using (SessionNoServer session = new SessionNoServer(s_systemDir)) { session.BeginRead(); int ct = GeoHashQuery.SearchGeoHashIndex(session, 32.715736, -117.161087, 10000).Count; Console.WriteLine($@"GeoObj located in San Diego by 10000 meter radius: {ct}"); ct = GeoHashQuery.SearchGeoHashIndex(session, 32.715736, -117.161087, 100000).Count; Console.WriteLine($@"GeoObj located in San Diego by 100000 meter radius: {ct}"); ct = GeoHashQuery.SearchGeoHashIndex(session, 40.730610, -73.935242, 10000).Count; Console.WriteLine($@"GeoObj located in New York City by 10000 meter radius: {ct}"); ct = GeoHashQuery.SearchGeoHashIndex(session, 40.730610, -73.935242, 100000).Count; Console.WriteLine($@"GeoObj located in New York City by 100000 meter radius: {ct}"); // Sweden bounding box ct = GeoHashQuery.SearchGeoHashIndex(session, 55.34, 10.96, 69.06, 24.17).Count; Console.WriteLine($@"GeoObj located in Sweden: {ct}"); // Alaska bounding box ct = GeoHashQuery.SearchGeoHashIndex(session, 51.21, -169.01, 71.39, -129.99).Count; Console.WriteLine($@"GeoObj located in Alaska: {ct}"); // California bounding box ct = GeoHashQuery.SearchGeoHashIndex(session, 32.53, -124.42, 42.01, -114.13).Count; Console.WriteLine($@"GeoObj located in California: {ct}"); // USA bounding box //GeoHashQuery.SearchGeoHashIndex(session, 18.9, -67.0, 71.4, 172.4); //Console.WriteLine($@"Persons located in USA: {ct}"); } }
static void Main(string[] args) { CreateData(); // Sweden bounding box GeoHashQuery.SearchGeoHashIndex(s_systemDir, 55.34, 10.96, 69.06, 24.17); // Alaska bounding box GeoHashQuery.SearchGeoHashIndex(s_systemDir, 51.21, -169.01, 71.39, -129.99); // California bounding box GeoHashQuery.SearchGeoHashIndex(s_systemDir, 32.53, -124.42, 42.01, -114.13); // USA bounding box //GeoHashQuery.SearchGeoHashIndex(s_systemDir, 18.9, -67.0, 71.4, 172.4); }