public class GeoPolyline extends java.lang.Object implements GeoShape
Modifier | Constructor and Description |
---|---|
protected |
GeoPolyline()
Create an empty geographic polyline.
|
|
GeoPolyline(GeoCoord[] coordinates)
Create a geographic polygonal line segment with the given coordinates
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y)
Tests if the specified coordinates are inside the boundary of the Shape.
|
boolean |
contains(double x,
double y,
double w,
double h)
Tests if the interior of the Shape entirely contains the specified
rectangular area.
|
boolean |
contains(java.awt.geom.Point2D point)
Tests if the specified point is inside the boundary of the Shape
|
boolean |
contains(java.awt.geom.Rectangle2D rect)
Tests if the interior of the Shape entirely contains the specified
rectangular area.
|
java.awt.Rectangle |
getBounds()
Returns an integer Rectangle that completely encloses the Shape.
|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns a high-precision Rectangle that completely encloses the Shape.
|
GeoCoord |
getCenter()
Get the center of the GeoPolyline
|
java.util.List<GeoCoord> |
getCoordinates()
Return the list of coordinates for this GeoPolyline
|
DataRecord |
getData()
Gets the data record associated with this GeoPolyline
|
GeoBounds |
getGeoBounds()
Get the geographic bounds for this shape.
|
GeoCoord[] |
getGeoPoints()
Returns the list of Geographic coordinates for this GeoPolyline
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
Returns an iterator object that iterates along the Shape boundary and
provides access to the geometry of the Shape outline.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
Returns an iterator object that iterates along the Shape boundary and
provides access to a flattened view of the Shape outline geometry.
|
double |
getRadius()
Get the radius for this GeoPolyline
|
RenderStyle |
getRenderStyle()
Get the rendering style for this GeoPolyline.
|
boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of the GeoPolyline intersects the interior of a
specified rectangular area.
|
boolean |
intersects(java.awt.geom.Rectangle2D rect)
Tests if the interior of the GeoPolyline intersects the interior of a
specified Rectangle
|
void |
project(Projection proj)
Projects the geographic coordinates into the given projection
|
void |
setData(DataRecord rec)
Sets the data record of this GeoPolyline.
|
protected void |
setGeoPoints(GeoCoord[] coordinates)
Set the geographic coordinates for this polyline.
|
void |
setRenderStyle(RenderStyle style)
Set the rendering style for this GeoPolyline.
|
java.lang.String |
toString()
Return a string representation of this GeoPolyline.
|
protected GeoPolyline()
setGeoPoints
public GeoPolyline(GeoCoord[] coordinates)
coordinates
- coordinates for the polylinepublic boolean contains(double x, double y)
contains
in interface java.awt.Shape
x
- the specified x coordinatey
- the specified x coordinatepublic boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
x
- the x coordinate of the specified rectangular areay
- the y coordinate of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areapublic boolean contains(java.awt.geom.Point2D point)
contains
in interface java.awt.Shape
point
- the specified pointpublic boolean contains(java.awt.geom.Rectangle2D rect)
contains
in interface java.awt.Shape
rect
- the specified rectanglepublic java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public GeoCoord getCenter()
public java.util.List<GeoCoord> getCoordinates()
public DataRecord getData()
public GeoBounds getGeoBounds()
getGeoBounds
in interface GeoShape
public GeoCoord[] getGeoPoints()
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
at
- an optional AffineTransform to be applied to the coordinates
as they are returned in the iteration, or null if
untransformed coordinates are desiredpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
at
- an optional AffineTransform to be applied to the coordinates
as they are returned in the iteration, or null if
untransformed coordinates are desiredflatness
- the maximum distance that the line segments used to
approximate the curved segments are allowed to deviate from
any point on the original curvepublic double getRadius()
public RenderStyle getRenderStyle()
getRenderStyle
in interface GeoShape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
x
- the x coordinate of the specified rectangular areay
- the y coordinate of the specified rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areapublic boolean intersects(java.awt.geom.Rectangle2D rect)
intersects
in interface java.awt.Shape
rect
- the specified RectanglePath2D.intersects(java.awt.geom.Rectangle2D)
public void project(Projection proj)
public void setData(DataRecord rec)
protected void setGeoPoints(GeoCoord[] coordinates)
coordinates
- the coordinates for the geographic polylinepublic void setRenderStyle(RenderStyle style)
setRenderStyle
in interface GeoShape
style
- The rendering stylepublic java.lang.String toString()
toString
in class java.lang.Object