public class CircleBuilder extends ShapeBuilder
ShapeBuilder.CoordinateNode, ShapeBuilder.Edge, ShapeBuilder.GeoShapeType, ShapeBuilder.OrientationToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_RADIUS |
static ShapeBuilder.GeoShapeType |
TYPE |
autoIndexJtsGeometry, autoValidateJtsGeometry, DATELINE, FACTORY, FIELD_COORDINATES, FIELD_GEOMETRIES, FIELD_ORIENTATION, FIELD_TYPE, INTERSECTION_ORDER, LOGGER, multiPolygonMayOverlap, orientation, SPATIAL_CONTEXT, wrapdatelineEMPTY_PARAMS| Constructor and Description |
|---|
CircleBuilder() |
| Modifier and Type | Method and Description |
|---|---|
com.spatial4j.core.shape.Circle |
build()
Create a new Shape from this builder.
|
CircleBuilder |
center(com.vividsolutions.jts.geom.Coordinate center)
Set the center of the circle
|
CircleBuilder |
center(double lon,
double lat)
set the center of the circle
|
CircleBuilder |
radius(DistanceUnit.Distance radius)
Set the radius of the circle
|
CircleBuilder |
radius(double radius,
DistanceUnit unit)
Set the radius of the circle
|
CircleBuilder |
radius(double radius,
String unit)
Set the radius of the circle
|
CircleBuilder |
radius(String radius)
Set the radius of the circle.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
ShapeBuilder.GeoShapeType |
type()
get the shapes type
|
coordinate, debugEnabled, intersection, intersections, jtsGeometry, newCircleBuilder, newEnvelope, newEnvelope, newGeometryCollection, newGeometryCollection, newLineString, newMultiLinestring, newMultiPoint, newMultiPolygon, newMultiPolygon, newPoint, newPoint, newPolygon, newPolygon, orientationFromString, parse, parse, shift, toString, toXContentpublic static final String FIELD_RADIUS
public static final ShapeBuilder.GeoShapeType TYPE
public CircleBuilder center(com.vividsolutions.jts.geom.Coordinate center)
center - coordinate of the circles centerpublic CircleBuilder center(double lon, double lat)
lon - longitude of the centerlat - latitude of the centerpublic CircleBuilder radius(String radius)
DistanceUnitradius - Value and unit of the circle combined in a stringpublic CircleBuilder radius(DistanceUnit.Distance radius)
radius - radius of the circle (see DistanceUnit.Distance)public CircleBuilder radius(double radius, String unit)
radius - value of the circles radiusunit - unit name of the radius value (see DistanceUnit)public CircleBuilder radius(double radius, DistanceUnit unit)
radius - value of the circles radiusunit - unit of the radius value (see DistanceUnit)public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionpublic com.spatial4j.core.shape.Circle build()
ShapeBuilderbuild in class ShapeBuilderShape defined by the builderpublic ShapeBuilder.GeoShapeType type()
ShapeBuildertype in class ShapeBuilderCopyright © 2009–2017. All rights reserved.