public Events_SpatialIndex() { Map = events => from e in events select new { Name = e.Name, Coordinates = CreateSpatialField(e.Latitude, e.Longitude) }; SpatialIndexesStrings.Add("Coordinates", new SpatialOptions()); }
public Shapes_SpatialIndex() { Map = shapes => from s in shapes select new { Bbox = CreateSpatialField(s.Wkt) }; SpatialIndexesStrings.Add("Bbox", new SpatialOptions { MaxTreeLevel = 6, Strategy = SpatialSearchStrategy.GeohashPrefixTree }); }
/// <summary> /// Register a field to be spatially indexed /// </summary> protected void Spatial(string field, Func <SpatialOptionsFactory, SpatialOptions> indexing) { SpatialIndexesStrings.Add(field, indexing(new SpatialOptionsFactory())); }