|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.spatial.Circle
public class Circle
This class provides operations for handling the usage of Circles and arcs in Geometries.
Date: Oct 15, 2007
Nested Class Summary | |
---|---|
class |
Circle.Arc
|
Constructor Summary | |
---|---|
Circle(com.vividsolutions.jts.geom.Coordinate point1,
com.vividsolutions.jts.geom.Coordinate point2,
com.vividsolutions.jts.geom.Coordinate point3)
Three point method of circle construction. |
|
Circle(com.vividsolutions.jts.geom.Coordinate center,
double radius)
Create a circle with a defined center and radius |
|
Circle(double xCenter,
double yCenter,
double radius)
Create a circle using the x/y coordinates for the center. |
|
Circle(double xLeft,
double yUpper,
double xRight,
double yLower)
Creates a circle based on bounding box. |
|
Circle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Three point method of circle construction. |
Method Summary | |
---|---|
Circle.Arc |
createArc(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p2,
com.vividsolutions.jts.geom.Coordinate p3)
|
double |
distanceFromCenter(com.vividsolutions.jts.geom.Coordinate p)
|
boolean |
equals(java.lang.Object o)
|
double |
getAngle(com.vividsolutions.jts.geom.Coordinate p)
Returns the angle of the point from the center and the horizontal line from the center. |
com.vividsolutions.jts.geom.Coordinate |
getCenter()
|
com.vividsolutions.jts.geom.Coordinate |
getPoint(double angle)
|
double |
getRadius()
|
com.vividsolutions.jts.geom.Coordinate[] |
linearizeArc(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p2,
com.vividsolutions.jts.geom.Coordinate p3,
double tolerence)
Given 2 points defining an arc on the circle, interpolates the circle into a collection of points that provide connected chords that approximate the arc based on the tolerance value. |
static com.vividsolutions.jts.geom.Coordinate[] |
linearizeArc(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Given 2 points defining an arc on the circle, interpolates the circle into a collection of points that provide connected chords that approximate the arc based on the tolerance value. |
static com.vividsolutions.jts.geom.Coordinate[] |
linearizeArc(double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double tolerence)
Given 2 points defining an arc on the circle, interpolates the circle into a collection of points that provide connected chords that approximate the arc based on the tolerance value. |
static com.vividsolutions.jts.geom.Coordinate[] |
linearizeCircle(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Given a circle defined by the 3 points, creates a linearized interpolation of the circle starting and ending on the first coordinate. |
void |
move(double x,
double y)
Move the circle to a new center |
static double |
normalizeAngle(double angle)
Returns an angle between 0 and 2*PI. |
void |
shift(double deltaX,
double deltaY)
shift the center of the circle by delta X and delta Y |
static double |
subtractAngles(double a1,
double a2)
Returns the angle between the angles a1 and a2 in radians. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Circle(com.vividsolutions.jts.geom.Coordinate center, double radius)
center
- The coordinate representing the center of the circleradius
- The radius of the circlepublic Circle(double xCenter, double yCenter, double radius)
xCenter
- The x coordinate of the circle's centeryCenter
- The y coordinate of the circle's centerradius
- the radius of the circlepublic Circle(double xLeft, double yUpper, double xRight, double yLower)
xLeft
- yUpper
- xRight
- yLower
- public Circle(com.vividsolutions.jts.geom.Coordinate point1, com.vividsolutions.jts.geom.Coordinate point2, com.vividsolutions.jts.geom.Coordinate point3)
point1
- point2
- point3
- public Circle(double x1, double y1, double x2, double y2, double x3, double y3)
x1
- y1
- x2
- y2
- x3
- y3
- Method Detail |
---|
public void shift(double deltaX, double deltaY)
public void move(double x, double y)
public com.vividsolutions.jts.geom.Coordinate getCenter()
public double getRadius()
public static com.vividsolutions.jts.geom.Coordinate[] linearizeArc(double x1, double y1, double x2, double y2, double x3, double y3, double tolerence)
x1
- x coordinate of point 1y1
- y coordinate of point 1x2
- x coordinate of point 2y2
- y coordinate of point 2x3
- x coordinate of point 3y3
- y coordinate of point 3tolerence
- maximum distance between the center of the chord and the outer
edge of the circle
public static com.vividsolutions.jts.geom.Coordinate[] linearizeArc(double x1, double y1, double x2, double y2, double x3, double y3)
x1
- x coordinate of point 1y1
- y coordinate of point 1x2
- x coordinate of point 2y2
- y coordinate of point 2x3
- x coordinate of point 3y3
- y coordinate of point 3
public static com.vividsolutions.jts.geom.Coordinate[] linearizeCircle(double x1, double y1, double x2, double y2, double x3, double y3)
x1
- x coordinate of point 1y1
- y coordinate of point 1x2
- x coordinate of point 2y2
- y coordinate of point 2x3
- x coordinate of point 3y3
- y coordinate of point 3
public com.vividsolutions.jts.geom.Coordinate[] linearizeArc(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p2, com.vividsolutions.jts.geom.Coordinate p3, double tolerence)
p1
- begin coordinate of the arcp2
- any other point on the arcp3
- end coordinate of the arctolerence
- maximum distance between the center of the chord and the outer
edge of the circle
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public double getAngle(com.vividsolutions.jts.geom.Coordinate p)
p
- a point in space
public com.vividsolutions.jts.geom.Coordinate getPoint(double angle)
public double distanceFromCenter(com.vividsolutions.jts.geom.Coordinate p)
p
- A point in space
public Circle.Arc createArc(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p2, com.vividsolutions.jts.geom.Coordinate p3)
public static double normalizeAngle(double angle)
angle
- an angle in radians to normalize
public static double subtractAngles(double a1, double a2)
a1
- first anglea2
- second angle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |