To get more information about Geometry methods
see Geometry
javadoc
Commons geometries methods
Interface Geometry
area(): Return geometry area
buffer(distance): Computes a buffer area around this
geometry having the given width
centroid(): Return geometry centroid
distance(geometry): Returns the minimum distance between
this Geometry and the specified geometry.
getEnvelope(): Returns the minimum bounding box for this
Geometry.
getGeometryType(): Instance of the GeometryType associated
to this geometry
getDimension(): Returns the largest number n such that
each direct position in a geometric set can be associated
with a subset that has the direct position in its interior
and is similar (isomorphic) to Rn, Euclidean n-space
Geometry types
Point
getX(): Returns the X coordinate
getY(): Returns the Y coordinate
getCoordinateAt(dimension): Gets the coordinate in a
concrete dimension
param dimension: Dimension coordinate to get
type dimension: integer
allowed values: 0=X, 1=Y, 2=Z
setX(value): Sets the X coordinate
param value: Value of the dimension X
type value: double
setY(value): Sets the Y coordinate
param value: Value of the dimension Y
type value: double
setCoordinateAt(dimension, value): Sets a ordinate in a
concrete dimension
param dimension: Dimension coordinate to set
type dimension: integer
param value: Value of the dimension
type value: double
Line
addVertex(point): Adds a vertex to the curve
param point: Point to addLayer
type: Point
getNumVertices(): Gets the number of vertex of the curve
getVertex(index): Gets a vertex
param index: Geometry vertex index
type index: integer
Polygon
addVertex(point): Adds a vertex to the curve
param point: Point to addLayer
type: Point
getNumVertices(): Gets the number of vertex of the curve
createPoint([x][, y][, subtype]): Create a new point
with a subtype dimensions and sets the value for 'X' and
'Y' coordinates. If is used without parameters will return
new Point2D with (0,0) coordinates