|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.features.Shape
gistoolkit.features.MultiPolygon
Represents a collection of Polygons.
Field Summary |
Fields inherited from class gistoolkit.features.Shape |
EQUAL_LIMIT, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, myEnvelope, NULLSHAPE, POINT, POLYGON, RASTER |
Constructor Summary | |
MultiPolygon()
Creates a new MultiPolygon |
|
MultiPolygon(Polygon[] inPolygons)
Creates a MultiPolygon from the Polygons |
|
MultiPolygon(Polygon[] inPolygons,
Envelope inEnvelope)
Creates a MultiPolygon from the Polygons and the envelope |
Method Summary | |
int |
add(double inX,
double inY)
Add the a point to this shape. |
boolean |
add(int inIndex,
double inX,
double inY)
Adds the point to this shape at the given index. |
void |
addPolygon(int inIndex,
Polygon inPolygon)
Add a Polygon to this MultiPolygonat the given location |
void |
calculateEnvelope()
Recalculates the emvelope for the shape. |
java.lang.Object |
clone()
Creates a copy of the MultiPolygon. |
boolean |
contains(Shape inShape)
returns true if any of the contained polygons contain this shape. |
int |
getClosestIndex(double inX,
double inY)
Find index of the point within the MultiPolygon closest to this point. |
Point |
getClosestPoint(double inX,
double inY)
Find the point within the MultiPolygon closest to this point. |
double |
getDistanceToPoint(double inX,
double inY)
Get the distance from this shape to the given point |
Envelope |
getEnvelope()
Return the envelope of this multipolygon. |
int |
getNumPoints()
Return the number of points in this shape. |
Point |
getPoint(int inIndex)
Get the point at the given index. |
Point[] |
getPoints()
Returns an array of points representing this shape. |
Polygon[] |
getPolygons()
return the list of Polygons contained within this MultiPolygon. |
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 |
boolean |
intersects(Shape inShape)
Determines if the two shapes intersect |
boolean |
intersectsMultiPolygon(MultiPolygon inMultiPolygon)
A MultiPolygon intersects another MultiPolygon if any of the constituent polygons intersect. |
boolean |
intersectsRasterShape(RasterShape inRasterShape)
A MultiPolygon intersects a RasterShape if the MultiPolygon intersects the envelope of the raster |
boolean |
remove(int inIndex)
Delete the given point from the polygon. |
void |
removePolygon(int inIndex)
Remove the indicated polygon from this multi polygon. |
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 MultiPolygon()
public MultiPolygon(Polygon[] inPolygons)
public MultiPolygon(Polygon[] inPolygons, Envelope inEnvelope)
Method Detail |
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 void calculateEnvelope()
calculateEnvelope
in class Shape
public Envelope getEnvelope()
getEnvelope
in class Shape
public java.lang.Object clone()
clone
in class Shape
public boolean contains(Shape inShape)
contains
in class Shape
public Polygon[] getPolygons()
public Point[] getPoints()
getPoints
in class Shape
public java.lang.String getWKT()
getWKT
in class Shape
public void addPolygon(int inIndex, Polygon inPolygon)
public void removePolygon(int inIndex)
public Point getClosestPoint(double inX, double inY)
public int getClosestIndex(double inX, double inY)
getClosestIndex
in class Shape
public void translate(double inXDistance, double inYDistance)
translate
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 intersectsMultiPolygon(MultiPolygon inMultiPolygon)
public boolean intersectsRasterShape(RasterShape inRasterShape)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |