Esempio n. 1
0
            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());
            }
Esempio n. 2
0
            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
                });
            }
Esempio n. 3
0
 /// <summary>
 /// Register a field to be spatially indexed
 /// </summary>
 protected void Spatial(string field, Func <SpatialOptionsFactory, SpatialOptions> indexing)
 {
     SpatialIndexesStrings.Add(field, indexing(new SpatialOptionsFactory()));
 }