|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.features.Shape
Represents the data associated with any shape.
Field Summary | |
static double |
EQUAL_LIMIT
This is the number the shapes use to determine if one double is equal to another. |
static java.lang.String |
LINEARRING
|
static java.lang.String |
LINESTRING
|
static java.lang.String |
MULTILINESTRING
|
static java.lang.String |
MULTIPOINT
|
static java.lang.String |
MULTIPOLYGON
|
protected Envelope |
myEnvelope
stores the bounding rectangle of this shape. |
static java.lang.String |
NULLSHAPE
There are set of valid shape types |
static java.lang.String |
POINT
|
static java.lang.String |
POLYGON
|
static java.lang.String |
RASTER
|
Constructor Summary | |
Shape()
|
Method Summary | |
abstract int |
add(double inX,
double inY)
Add the a point to this shape. |
abstract boolean |
add(int inIndex,
double inX,
double inY)
Add the a point to this shape at this index. |
void |
calculateEnvelope()
Recalculates the extents on the object, should be called if the object is changed. |
abstract java.lang.Object |
clone()
Creates a copy of the shape |
boolean |
contains(Shape inShape)
Determines if this shape contains the shape sent in; Since this is the super class, it always returns false. |
static double |
distance(Point inPointA,
Point inPointB)
Distance from a point to another point. |
abstract int |
getClosestIndex(double inX,
double inY)
Get the index of the point within the shape nearest this location. |
static double |
getDistance(double inX1,
double inY1,
double inX2,
double inY2)
Determine the distance between two points. |
double |
getDistanceToEnvelope(double inX,
double inY)
Determines the distance from the given point to the extents of this shape. |
static double |
getDistanceToLine(double inP1X,
double inP1Y,
double inP2X,
double inP2Y,
double inX,
double inY)
Calculates the distance from the line defined by point 1 and 2 to the point defined by X and Y. |
static double |
getDistanceToLine(Point inPoint1,
Point inPoint2,
double inX,
double inY)
Calculates the distance from the line defined by point 1 and 2 to the point defined by X and Y. |
abstract double |
getDistanceToPoint(double inX,
double inY)
Get the distance from this shape to the given point |
abstract Envelope |
getEnvelope()
return the bounding rectangle of this shape. |
static Point |
getLinesIntersect(Point inL1A,
Point inL1B,
Point inL2A,
Point inL2B)
Determines if the Two Lines intersect. |
abstract int |
getNumPoints()
Returns the number of points in the shape. |
abstract Point |
getPoint(int inIndex)
Returns the point at the given index. |
abstract Point[] |
getPoints()
Returns the points that comprise the object. |
abstract java.lang.String |
getShapeType()
Return the type of shape this is |
abstract java.lang.String |
getWKT()
Returns the OGIS Well Know Text Representation of this shape |
abstract boolean |
intersects(Shape inShape)
Determines if the two shapes intersect |
static boolean |
linesIntersect(double inL1AX,
double inL1AY,
double inL1BX,
double inL1BY,
double inL2AX,
double inL2AY,
double inL2BX,
double inL2BY)
Determines if the Two Lines intersect. |
static boolean |
linesIntersect(Point inL1A,
Point inL1B,
Point inL2A,
Point inL2B)
Determines if the Two Lines intersect. |
static boolean |
pointOnLine(double inPointX,
double inPointY,
double inLAX,
double inLAY,
double inLBX,
double inLBY)
Determines if a point is exactly on a line. |
static boolean |
pointOnLine(Point inPoint,
Point inLA,
Point inLB)
Determines if a point is exactly on a line. |
abstract boolean |
remove(int inIndex)
Remove this point from the Shape. |
abstract void |
setPoint(int inIndex,
double inXCoordinate,
double inYCoordinate)
Sets the point at the given index to the given value. |
abstract void |
translate(double inXDistance,
double inYDistance)
Translate the shape the given distance in the X and Y directions |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NULLSHAPE
public static final java.lang.String POINT
public static final java.lang.String MULTIPOINT
public static final java.lang.String LINEARRING
public static final java.lang.String LINESTRING
public static final java.lang.String MULTILINESTRING
public static final java.lang.String POLYGON
public static final java.lang.String MULTIPOLYGON
public static final java.lang.String RASTER
public static final double EQUAL_LIMIT
protected Envelope myEnvelope
Constructor Detail |
public Shape()
Method Detail |
public abstract java.lang.String getShapeType()
public void calculateEnvelope()
public abstract Envelope getEnvelope()
public abstract java.lang.Object clone()
public abstract int getNumPoints()
public abstract Point getPoint(int inIndex)
public abstract void setPoint(int inIndex, double inXCoordinate, double inYCoordinate)
public abstract int add(double inX, double inY)
public abstract boolean add(int inIndex, double inX, double inY)
public abstract boolean remove(int inIndex)
public boolean contains(Shape inShape)
public static boolean linesIntersect(Point inL1A, Point inL1B, Point inL2A, Point inL2B)
public static boolean linesIntersect(double inL1AX, double inL1AY, double inL1BX, double inL1BY, double inL2AX, double inL2AY, double inL2BX, double inL2BY)
public static Point getLinesIntersect(Point inL1A, Point inL1B, Point inL2A, Point inL2B)
public static boolean pointOnLine(Point inPoint, Point inLA, Point inLB)
public static boolean pointOnLine(double inPointX, double inPointY, double inLAX, double inLAY, double inLBX, double inLBY)
public abstract Point[] getPoints()
public abstract java.lang.String getWKT()
public abstract void translate(double inXDistance, double inYDistance)
public static double distance(Point inPointA, Point inPointB)
public static double getDistance(double inX1, double inY1, double inX2, double inY2)
public static double getDistanceToLine(Point inPoint1, Point inPoint2, double inX, double inY)
public static double getDistanceToLine(double inP1X, double inP1Y, double inP2X, double inP2Y, double inX, double inY)
public double getDistanceToEnvelope(double inX, double inY)
public abstract int getClosestIndex(double inX, double inY)
public abstract double getDistanceToPoint(double inX, double inY)
public abstract boolean intersects(Shape inShape)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |