Package org.springframework.data.geo

Examples of org.springframework.data.geo.Shape


  public void convertsBoxToDbObjectAndBackCorrectly() {

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

    DBObject dbo = GeoConverters.BoxToDbObjectConverter.INSTANCE.convert(box);
    Shape shape = GeoConverters.DbObjectToBoxConverter.INSTANCE.convert(dbo);

    assertThat(shape, is((org.springframework.data.geo.Shape) box));
  }
View Full Code Here


  public void convertsCircleToDbObjectAndBackCorrectly() {

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

    DBObject dbo = GeoConverters.CircleToDbObjectConverter.INSTANCE.convert(circle);
    Shape shape = GeoConverters.DbObjectToCircleConverter.INSTANCE.convert(dbo);

    assertThat(shape, is((org.springframework.data.geo.Shape) circle));
  }
View Full Code Here

  public void convertsPolygonToDbObjectAndBackCorrectly() {

    Polygon polygon = new Polygon(new Point(1, 2), new Point(2, 3), new Point(3, 4), new Point(5, 6));

    DBObject dbo = GeoConverters.PolygonToDbObjectConverter.INSTANCE.convert(polygon);
    Shape shape = GeoConverters.DbObjectToPolygonConverter.INSTANCE.convert(dbo);

    assertThat(shape, is((org.springframework.data.geo.Shape) polygon));
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.geo.Shape

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.