org.elasticsearch.common.geo
Class ShapeBuilder.PolygonBuilder

java.lang.Object
  extended by org.elasticsearch.common.geo.ShapeBuilder.PolygonBuilder
Enclosing class:
ShapeBuilder

public static class ShapeBuilder.PolygonBuilder
extends Object

Builder for creating a Shape instance of a Polygon


Constructor Summary
ShapeBuilder.PolygonBuilder()
           
 
Method Summary
 com.spatial4j.core.shape.Shape build()
          Builds a Shape instance representing the polygon
 ShapeBuilder.PolygonBuilder point(double lon, double lat)
          Adds a point to the Polygon
 com.vividsolutions.jts.geom.Polygon toPolygon()
          Creates the raw Polygon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeBuilder.PolygonBuilder

public ShapeBuilder.PolygonBuilder()
Method Detail

point

public ShapeBuilder.PolygonBuilder point(double lon,
                                         double lat)
Adds a point to the Polygon

Parameters:
lon - Longitude of the point
lat - Latitude of the point
Returns:
this

build

public com.spatial4j.core.shape.Shape build()
Builds a Shape instance representing the polygon

Returns:
Built polygon

toPolygon

public com.vividsolutions.jts.geom.Polygon toPolygon()
Creates the raw Polygon

Returns:
Built polygon


Copyright © 2009-2012. All Rights Reserved.