public class ShapeFactory extends Object
Modifier and Type | Method and Description |
---|---|
static Circle |
circle(Point center,
double radius)
Creates a Circle instance
|
static LineString |
lineString(Collection<Point> points)
Creates a LineString instance from the specified points
|
static LineString |
lineString(Point first,
Point second,
Point... morePoints)
Creates a LineString instance from the specified points
|
static Shape |
parse(String s,
ShapeFormat shapeFormat)
Parses the specified string using the specified shape format
|
static Point |
point(double x,
double y)
Creates a Point instance.
|
static Polygon |
polygon(Collection<Point> points)
Creates a Polygon instance from the specified points
|
static Polygon |
polygon(Point first,
Point second,
Point third,
Point... morePoints)
Creates a Polygon instance from the specified points
|
static Rectangle |
rectangle(double minX,
double maxX,
double minY,
double maxY)
Creates a Rectangle instance
|
public static Point point(double x, double y)
x
- The X coordinate, or Longitude in geospatial contextsy
- The Y coordinate, or Latitude in geospatial contextspublic static Circle circle(Point center, double radius)
center
- The center of the circleradius
- The radius of the circlepublic static Rectangle rectangle(double minX, double maxX, double minY, double maxY)
minX
- The left edge of the X coordinatemaxX
- The right edge of the X coordinateminY
- The bottom edge of the Y coordinatemaxY
- The top edge of the Y coordinatepublic static LineString lineString(Point first, Point second, Point... morePoints)
first
- The first pointsecond
- The second pointmorePoints
- The rest of the pointspublic static LineString lineString(Collection<Point> points)
points
- The LineString pointspublic static Polygon polygon(Point first, Point second, Point third, Point... morePoints)
first
- The first pointsecond
- The second pointthird
- The third pointmorePoints
- The rest of the pointspublic static Polygon polygon(Collection<Point> points)
points
- The polygon pointspublic static Shape parse(String s, ShapeFormat shapeFormat)
s
- String to parseshapeFormat
- Shape format to use for parsingCopyright © GigaSpaces.