|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.features.Shape
gistoolkit.features.LinearRing
A ring is a closed group of line segments. These are usefull for implementing polygons. The rules for rings are that they can not overlap (No Self Intersections), there can be no shared line segments, although single points can be shared.
Field Summary |
Fields inherited from class gistoolkit.features.Shape |
EQUAL_LIMIT, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, myEnvelope, NULLSHAPE, POINT, POLYGON, RASTER |
Constructor Summary | |
LinearRing()
Create a new empty linear ring. |
|
LinearRing(double[] inXs,
double[] inYs)
Create a new linear ring from the points. |
|
LinearRing(Point[] inPoints)
Create a new linear ring from the points. |
Method Summary | |
int |
add(double inX,
double inY)
Adds a point to the LineString at the given point index. |
boolean |
add(int inIndex,
double inX,
double inY)
Adds a point to the LineString at the given point index. |
void |
calculateEnvelope()
Recalculates the envelope for the shape. |
java.lang.Object |
clone()
Creates a copy of the Linear Ring Creation date: (5/3/2001 8:45:46 AM) |
boolean |
contains(Shape inShape)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsLine(LineString inLineString)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsLinearRing(LinearRing inRing)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsMultiLine(MultiLineString inMultiLineString)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsMultiPolygon(MultiPolygon inMultiPolygon)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsPoint(double inX,
double inY)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsPoint(Point inPoint)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
boolean |
containsPolygon(Polygon inPolygon)
For linear rings, since the shape is representing a simple polygon, if the shape is contained within the interior of the ring, then it is said to be within the simple polygon. |
void |
ensureClosed()
Ensure that the ring is closed |
int |
getClosestIndex(double inX,
double inY)
Return the point in the LineString that is the closest to this point. |
Point |
getClosestPoint(double inX,
double inY)
Return the point in the LineString that is the closest to this point. |
double |
getDistanceToPoint(double inX,
double inY)
Get the distance from this shape to the given point |
Envelope |
getEnvelope()
return the bounding rectangle of this shape. |
int |
getNumPoints()
Return the number of points in this shape. |
Point |
getPoint(int inIndex)
Get the point at the given index. |
Point[] |
getPoints()
Return the Points which make up the linear ring. |
Point[] |
getRingPoints()
Return the Points which make up the linear ring. |
java.lang.String |
getShapeType()
Return the type of shape this is |
java.lang.String |
getWKT()
There is no WKT for a linear ring |
double[] |
getXCoordinates()
Return the array of X Coordinates. |
double[] |
getYCoordinates()
Return the array of Y Coordinates. |
boolean |
intersects(Shape inShape)
Determines if the two shapes intersect |
boolean |
intersectsLinearRing(LinearRing inLinearRing)
A LinearRing intersects another LinearRing if the boundaries of the LinearRing cross, or one LinearRing is entirely within the other |
boolean |
intersectsMultiPolygon(MultiPolygon inMultiPolygon)
A LinearRing intersects a MultiPolygon if it intersects any of the constituent Polygons contained within the MultiPolygon. |
boolean |
intersectsPoint(double inX,
double inY)
A Linear Ring will intersect a point if the point falls on the line, within the boundary of the linear ring. |
boolean |
intersectsPoint(Point inPoint)
A Linear Ring will intersect a point if the point falls on the line, or within the boundary of the linear ring. |
boolean |
intersectsPolygon(Polygon inPolygon)
A LinearRing intersects a Polygon if it intersects any of the rings of the polygon, or if it is contained within the posative ring of the polygon. |
boolean |
intersectsRasterShape(RasterShape inRasterShape)
A LinearRing intersects a RasterShape if it intersects the envelope of the raster, or if it is contained within the raster. |
boolean |
isClockwise()
Returns true if this is a valid ring, and it is oriented clockwise. |
boolean |
overlaps(Shape inShape)
Checks if the shape overlaps this shape, and returns true if it does. |
boolean |
remove(int inIndex)
Removes the point at the given index from the linear ring. |
void |
reorder()
Exactly changes the orientation of the nodes in the ring |
void |
setPoint(int inIndex,
double inXCoordinate,
double inYCoordinate)
Set the point at the given index. |
java.lang.String |
toString()
Returns the string representation of this Ring. |
void |
translate(double inXDistance,
double inYDistance)
Translate the shape the given distance in the X and Y directions |
Shape |
union(Shape inShape)
Create the union of the two objects |
Methods inherited from class gistoolkit.features.Shape |
distance, getDistance, getDistanceToEnvelope, getDistanceToLine, getDistanceToLine, getLinesIntersect, linesIntersect, linesIntersect, pointOnLine, pointOnLine |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LinearRing()
public LinearRing(double[] inXs, double[] inYs)
public LinearRing(Point[] inPoints)
Method Detail |
public double[] getXCoordinates()
public double[] getYCoordinates()
public java.lang.String getShapeType()
getShapeType
in class Shape
public int getNumPoints()
getNumPoints
in class Shape
public Point getPoint(int inIndex)
getPoint
in class Shape
public void setPoint(int inIndex, double inXCoordinate, double inYCoordinate)
setPoint
in class Shape
public int add(double inX, double inY)
add
in class Shape
public boolean add(int inIndex, double inX, double inY)
add
in class Shape
public boolean remove(int inIndex)
remove
in class Shape
public Envelope getEnvelope()
getEnvelope
in class Shape
public void calculateEnvelope()
calculateEnvelope
in class Shape
public java.lang.Object clone()
clone
in class Shape
public boolean contains(Shape inShape)
contains
in class Shape
inShape
- features.Shape
public boolean containsPoint(Point inPoint)
public boolean containsPoint(double inX, double inY)
public Point[] getPoints()
getPoints
in class Shape
public Point[] getRingPoints()
public boolean containsLine(LineString inLineString)
public boolean containsLinearRing(LinearRing inRing)
public boolean containsMultiLine(MultiLineString inMultiLineString)
public boolean containsMultiPolygon(MultiPolygon inMultiPolygon)
public boolean containsPolygon(Polygon inPolygon)
public boolean isClockwise()
public void reorder()
public java.lang.String toString()
public void ensureClosed()
public java.lang.String getWKT()
getWKT
in class Shape
public void translate(double inXDistance, double inYDistance)
translate
in class Shape
public Shape union(Shape inShape)
public boolean overlaps(Shape inShape)
public int getClosestIndex(double inX, double inY)
getClosestIndex
in class Shape
public Point getClosestPoint(double inX, double inY)
public double getDistanceToPoint(double inX, double inY)
getDistanceToPoint
in class Shape
public boolean intersects(Shape inShape)
intersects
in class Shape
public boolean intersectsPoint(Point inPoint)
public boolean intersectsPoint(double inX, double inY)
public boolean intersectsLinearRing(LinearRing inLinearRing)
public boolean intersectsPolygon(Polygon inPolygon)
public boolean intersectsMultiPolygon(MultiPolygon inMultiPolygon)
public boolean intersectsRasterShape(RasterShape inRasterShape)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |