Package org.springframework.data.mongodb.core.geo

Examples of org.springframework.data.mongodb.core.geo.Point


    assertLocations(locations, "A", "C", "D");
  }

  @Test public void shouldFindWithinBox() {
    // when
    List<Location> locations = repo.findByPositionWithin(new Box(new Point(
        0.25, 0.25), new Point(1, 1)));

    // then
    assertLocations(locations, "B", "C");
  }
View Full Code Here


      double x = rnd(), y = rnd();
     
      // circle search
      c = new Circle( x, y, RADIUS);
      // box search
      b = new Box( new Point(x - HALF_BOX_WIDTH, y - HALF_BOX_WIDTH), new Point(x + HALF_BOX_WIDTH, y + HALF_BOX_WIDTH) );
     
      // perform circle query
      singleRun = System.currentTimeMillis();
      result = repo.findByPositionWithin(c);
      singleRun = System.currentTimeMillis() - singleRun;
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.geo.Point

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.