Example usage for org.springframework.data.geo Circle getCenter

List of usage examples for org.springframework.data.geo Circle getCenter

Introduction

In this page you can find the example usage for org.springframework.data.geo Circle getCenter.

Prototype

public Point getCenter() 

Source Link

Document

Returns the center of the Circle .

Usage

From source file:com.frank.search.solr.core.query.Criteria.java

/**
 * Creates new {@link Criteria.Predicate} for {@code !circle} for a
 * specified distance. The difference between this and
 * {@link #within(org.springframework.data.geo.Circle)} is this is
 * approximate while {@code within} is exact.
 *
 * @param circle//from   w  ww  .  jav a  2  s.com
 * @return
 * @since 1.2
 */
public Criteria near(Circle circle) {

    Assert.notNull(circle, "Circle for 'near' must not be 'null'.");
    return near(circle.getCenter(), circle.getRadius());
}

From source file:com.frank.search.solr.core.query.Criteria.java

/**
 * Creates new {@link Criteria.Predicate} for {@code !geodist}.
 *
 * @param circle//from   w w  w  . j ava2 s.  c o  m
 * @return
 * @since 1.2
 */
public Criteria within(Circle circle) {

    Assert.notNull(circle, "Circle for 'within' must not be 'null'.");
    return within(circle.getCenter(), circle.getRadius());
}