|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.features.Shape
gistoolkit.features.LineString
A line string is a series of connected line segments.
Field Summary |
Fields inherited from class gistoolkit.features.Shape |
EQUAL_LIMIT, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, myEnvelope, NULLSHAPE, POINT, POLYGON, RASTER |
Constructor Summary | |
LineString()
Create a new empty Line String. |
|
LineString(double[] inXs,
double[] inYs)
Create a new LineString from the points. |
|
LineString(Point[] inPoints)
Create a new LineString from the points. |
Method Summary | |
int |
add(double inX,
double inY)
Add a point to the LineString returns the index of the newly added point, or -1 if it failed to add the point. |
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 Line String Creation date: (5/3/2001 8:45:46 AM) |
boolean |
contains(Shape inShape)
For line strings, since the shape is a line, it can only contain points, and other line strings. |
boolean |
containsLine(LineString inLineString)
For line strings, since the shape is a line, it can only contain points, and other line strings. |
boolean |
containsMultiLine(MultiLineString inMultiLineString)
For line strings, since the shape is a line, it can only contain points, and other line strings. |
boolean |
containsPoint(Point inPoint)
For line strings, since the shape is a line, it can only contain points, and other line strings. |
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()
Returns the points representing this line string. |
java.lang.String |
getShapeType()
Return the type of shape this is |
java.lang.String |
getWKT()
Returns the OGIS Well Know Text Representation of this shape |
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 LineString intersects a LinearRing if the LineString intersects the LinearRing, or if it is contained within the LinearRing. |
boolean |
intersectsLineString(LineString inLineString)
A LineString will intersect another line string if the two LineStrings cross at some point |
boolean |
intersectsMultiLineString(MultiLineString inMultiLineString)
A LineString intersects a MultiLineString if any of the constituent LineStrings intersect this LineString. |
boolean |
intersectsMultiPolygon(MultiPolygon inMultiPolygon)
A LineString intersects a MultiPolygon if it intersects any of the constituent Polygons |
boolean |
intersectsPoint(double inX,
double inY)
A line string will intersect a point if the point falls on the line, or is the same as one of the verticies. |
boolean |
intersectsPoint(Point inPoint)
A line string will intersect a point if the point falls on the line, or is the same as one of the verticies. |
boolean |
intersectsPolygon(Polygon inPolygon)
A LineString intersects a Polygon if it intersects any of the rings of the polygon, or if it is contained within the Polygon. |
boolean |
intersectsRasterShape(RasterShape inRasterShape)
A LineString intersects a RasterShape if it intersects the envelope of the raster, or if it is contained within the envelope of the raster. |
boolean |
remove(int inIndex)
Removes the point at the given index from the LineString. |
void |
setPoint(int inIndex,
double inXCoordinate,
double inYCoordinate)
Set the point at the given index. |
void |
translate(double inXDistance,
double inYDistance)
Translate the shape the given distance in the X and Y directions |
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, toString, wait, wait, wait |
Constructor Detail |
public LineString()
public LineString(double[] inXs, double[] inYs)
public LineString(Point[] inPoints)
Method Detail |
public double[] getXCoordinates()
public double[] getYCoordinates()
public java.lang.String getShapeType()
getShapeType
in class Shape
public java.lang.Object clone()
clone
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 boolean contains(Shape inShape)
contains
in class Shape
inShape
- features.Shape
public boolean containsLine(LineString inLineString)
A point is contained within a line string if it falls on the line. A line is contained in the line string if it falls completely on the lines of the containing line string. Polygons, and rings can not be contained in a line.
public boolean containsMultiLine(MultiLineString inMultiLineString)
public boolean containsPoint(Point inPoint)
public Point[] getPoints()
getPoints
in class Shape
public java.lang.String getWKT()
getWKT
in class Shape
public void translate(double inXDistance, double inYDistance)
translate
in class Shape
public Point getClosestPoint(double inX, double inY)
public int getClosestIndex(double inX, double inY)
getClosestIndex
in class Shape
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 intersectsLineString(LineString inLineString)
public boolean intersectsMultiLineString(MultiLineString inMultiLineString)
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 |