Package org.springframework.data.geo

Examples of org.springframework.data.geo.Point


   */
  @Test
  public void shouldWriteEntityWithGeoCircleCorrectly() {

    ClassWithGeoCircle object = new ClassWithGeoCircle();
    Circle circle = new Circle(new Point(1, 2), 3);
    Distance radius = circle.getRadius();
    object.circle = circle;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);
View Full Code Here


   */
  @Test
  public void shouldReadEntityWithGeoCircleCorrectly() {

    ClassWithGeoCircle object = new ClassWithGeoCircle();
    object.circle = new Circle(new Point(1, 2), 3);

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);

    ClassWithGeoCircle result = converter.read(ClassWithGeoCircle.class, dbo);
View Full Code Here

   */
  @Test
  public void shouldWriteEntityWithGeoSphereCorrectly() {

    ClassWithGeoSphere object = new ClassWithGeoSphere();
    Sphere sphere = new Sphere(new Point(1, 2), 3);
    Distance radius = sphere.getRadius();
    object.sphere = sphere;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);
View Full Code Here

   */
  @Test
  public void shouldWriteEntityWithGeoSphereWithMetricDistanceCorrectly() {

    ClassWithGeoSphere object = new ClassWithGeoSphere();
    Sphere sphere = new Sphere(new Point(1, 2), new Distance(3, Metrics.KILOMETERS));
    Distance radius = sphere.getRadius();
    object.sphere = sphere;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);
View Full Code Here

   */
  @Test
  public void shouldReadEntityWithGeoSphereCorrectly() {

    ClassWithGeoSphere object = new ClassWithGeoSphere();
    object.sphere = new Sphere(new Point(1, 2), 3);

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);

    ClassWithGeoSphere result = converter.read(ClassWithGeoSphere.class, dbo);
View Full Code Here

   */
  @Test
  public void shouldWriteEntityWithGeoShapeCorrectly() {

    ClassWithGeoShape object = new ClassWithGeoShape();
    Sphere sphere = new Sphere(new Point(1, 2), 3);
    Distance radius = sphere.getRadius();
    object.shape = sphere;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);
View Full Code Here

  @Test
  @Ignore
  public void shouldReadEntityWithGeoShapeCorrectly() {

    ClassWithGeoShape object = new ClassWithGeoShape();
    Sphere sphere = new Sphere(new Point(1, 2), 3);
    object.shape = sphere;

    DBObject dbo = new BasicDBObject();
    converter.write(object, dbo);
View Full Code Here

   * Returns the center of the {@link Circle}.
   *
   * @return will never be {@literal null}.
   */
  public Point getCenter() {
    return new Point(this.center);
  }
View Full Code Here

   * @see DATAMONGO-858
   */
  @Test
  public void convertsBoxToDbObjectAndBackCorrectly() {

    Box box = new Box(new Point(1, 2), new Point(3, 4));

    DBObject dbo = BoxToDbObjectConverter.INSTANCE.convert(box);
    Box result = DbObjectToBoxConverter.INSTANCE.convert(dbo);

    assertThat(result, is(box));
View Full Code Here

   * @see DATAMONGO-858
   */
  @Test
  public void convertsCircleToDbObjectAndBackCorrectlyNeutralDistance() {

    Circle circle = new Circle(new Point(1, 2), 3);

    DBObject dbo = CircleToDbObjectConverter.INSTANCE.convert(circle);
    Circle result = DbObjectToCircleConverter.INSTANCE.convert(dbo);

    assertThat(result, is(circle));
View Full Code Here

TOP

Related Classes of org.springframework.data.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.