Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.factual.driver;
Represents a geographic sub query confining results to a circle.

public class Circle {
  private final double lat;
  private final double lon;
  private final int meters;

Constructs a geographic Circle representation.

lat the latitude of the center of this Circle.
lon the longitude of the center of this Circle.
metersRadius the radius, in meters, of this Circle.
  public Circle(double latdouble lonint meters) {
    this. = lat;
    this. = lon;
    this. = meters;
  public Circle(Coord coordint meters) {
    this(coord.getLatitude(), coord.getLongitude(), meters);
  public String toJsonStr() {
    return "{\"$circle\":{\"$center\":[" +  + "," +  + "],\"$meters\":" +  + "}}";
New to GrepCode? Check out our FAQ X