|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.moximedia.ows.geom.Polygon
| Field Summary |
| Fields inherited from interface com.moximedia.ows.types.GeometryType |
GEOMETRY_TYPE_COLLECTION, GEOMETRY_TYPE_ENVELOPE, GEOMETRY_TYPE_LINE, GEOMETRY_TYPE_MULTILINE, GEOMETRY_TYPE_MULTIPOINT, GEOMETRY_TYPE_MULTIPOLYGON, GEOMETRY_TYPE_POINT, GEOMETRY_TYPE_POLYGON, GEOMETRY_TYPE_UNKNOWN |
| Constructor Summary | |
Polygon()
Creates new Polygon |
|
Polygon(Points exterior)
|
|
Polygon(Points exterior,
Points[] holes)
|
|
| Method Summary | |
void |
addHole(Points pts)
|
boolean |
addVertexToClosestLineSegment(Point pt)
Adds a vertex to the closest line segment. |
Geometry |
buffer(double distance)
Returns a new geometry that is a buffer of this one. |
java.lang.Object |
clone()
|
boolean |
contains(Geometry geometry)
|
Point |
getClosestPointTo(Point pt)
Gets the closest vertex in the Polygon to the specified point. |
Polygon |
getCopy()
|
double |
getDistanceToClosestLineSegment(Point pt)
Gets the distance from the specified point to the closest line segment in the exterior or interior of the polygon. |
Envelope |
getExtent()
|
Points |
getExterior()
|
int |
getGeometryType()
Returns the geometry type of this geometry. |
java.lang.String |
getGid()
|
Points |
getHole(int index)
|
int |
getHoleCount()
|
java.util.ArrayList |
getHoles()
|
Points |
getHoleWithPoint(Point pt)
|
Points |
getPoints()
Returns all the points of the polygon (interior and holes) as a Points object. |
boolean |
hasHoles()
|
Geometry |
intersection(Polygon polygon)
Returns a new geometry representing the intersection of this polygon and another one. |
boolean |
intersects(Geometry geometry)
|
boolean |
isExteriorPoint(Point pt)
|
boolean |
isGeometryType(int geometryType)
Compares a geometry type with another value. |
boolean |
isInteriorPoint(Point pt)
|
boolean |
isValid()
Returns an indicator of whether this shape is valid. |
Geometry |
project(Projection projection)
|
Geometry |
project(Projection fromProjection,
Projection toProjection)
|
boolean |
remove(Point pt)
|
boolean |
removeHoleWithPoint(Point pt)
|
void |
setExterior(Points pts)
|
void |
setSrs(java.lang.String srs)
|
void |
setXmlAttribute(java.lang.String element,
java.lang.String name,
java.lang.String value)
|
java.awt.geom.GeneralPath |
toGeneralPath()
|
java.lang.String |
toGmlString()
|
com.vividsolutions.jts.geom.Geometry |
toJtsGeometry()
Returns this object as a JTS Geometry object. |
com.vividsolutions.jts.geom.Geometry |
toJtsPolygon()
Returns this object as a JTS Polygon object. |
boolean |
touches(Geometry geometry)
|
java.lang.String |
toWktString()
Returns the well known string representation of this object. |
Geometry |
unproject(Projection projection)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Polygon()
public Polygon(Points exterior)
public Polygon(Points exterior,
Points[] holes)
| Method Detail |
public void addHole(Points pts)
public double getDistanceToClosestLineSegment(Point pt)
pt - The point to search from.
public boolean addVertexToClosestLineSegment(Point pt)
pt - The point to add to the line segment. A vertex will be added
to the portion of the line segment closest to the point position.public java.lang.Object clone()
clone in interface Geometrypublic Polygon getCopy()
public Envelope getExtent()
getExtent in interface Geometrypublic Points getExterior()
public int getGeometryType()
getGeometryType in interface Geometrypublic boolean isGeometryType(int geometryType)
isGeometryType in interface GeometrygeometryType - An enumerated value.
public java.lang.String getGid()
public int getHoleCount()
public Points getHole(int index)
public java.util.ArrayList getHoles()
public boolean hasHoles()
public void setExterior(Points pts)
public void setXmlAttribute(java.lang.String element,
java.lang.String name,
java.lang.String value)
setXmlAttribute in interface Geometrypublic java.awt.geom.GeneralPath toGeneralPath()
public java.lang.String toGmlString()
toGmlString in interface Geometry
public Geometry project(Projection fromProjection,
Projection toProjection)
project in interface Geometrypublic Geometry project(Projection projection)
project in interface Geometrypublic boolean isValid()
isValid in interface Geometrypublic com.vividsolutions.jts.geom.Geometry toJtsGeometry()
toJtsGeometry in interface Geometrypublic com.vividsolutions.jts.geom.Geometry toJtsPolygon()
public Geometry unproject(Projection projection)
unproject in interface Geometrypublic Geometry buffer(double distance)
distance - The buffer distance.
public Geometry intersection(Polygon polygon)
polygon - Another polygon to intersect with this one.
public boolean intersects(Geometry geometry)
intersects in interface Geometrypublic boolean touches(Geometry geometry)
public Point getClosestPointTo(Point pt)
getClosestPointTo in interface Geometrypt - The point to compare the vertexes to.
public void setSrs(java.lang.String srs)
setSrs in interface Geometrypublic boolean remove(Point pt)
public Points getPoints()
public boolean contains(Geometry geometry)
public boolean isExteriorPoint(Point pt)
public boolean isInteriorPoint(Point pt)
public Points getHoleWithPoint(Point pt)
public boolean removeHoleWithPoint(Point pt)
public java.lang.String toWktString()
toWktString in interface Geometry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||