|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.renderer.geom.Geometry
org.geotools.renderer.geom.GeometryProxy
A geometry wrapping an existing geometry object with a different
style. Every calls except get/setStyle are forwarded
to the wrapped geometry. Consequently, changes in this geometry will impact
on the wrapped geometry, and conversely.
| Field Summary |
| Fields inherited from class org.geotools.renderer.geom.Geometry |
DEFAULT_COORDINATE_SYSTEM |
| Constructor Summary | |
GeometryProxy(Geometry geometry)
Construct a geographic shape wrapping the given geometry. |
|
| Method Summary | |
Geometry |
clip(Clipper clipper)
Returns an geometry approximately equal to this geometry clipped to the specified bounds. |
java.lang.Object |
clone()
Return a clone of this geometry. |
float |
compress(CompressionLevel level)
Compress the wrapped geometry. |
boolean |
contains(double x,
double y)
Tests if the specified coordinates are inside the boundary of this geometry. |
boolean |
contains(double x,
double y,
double width,
double height)
Test if the interior of this geometry entirely contains the given rectangle. |
boolean |
contains(java.awt.geom.Point2D point)
Tests if a specified Point2D is inside the boundary of this geometry.
|
boolean |
contains(java.awt.geom.Rectangle2D rectangle)
Tests if the interior of this geometry entirely contains the given rectangle. |
boolean |
contains(java.awt.Shape shape)
Test if the interior of this geometry entirely contains the given shape. |
boolean |
equals(java.lang.Object object)
Compares the specified object with this geometry for equality. |
java.awt.Rectangle |
getBounds()
Deprecated. This method is required by the Shape interface,
but it doesn't provide enough precision for most cases.
Use getBounds2D() instead. |
java.awt.geom.Rectangle2D |
getBounds2D()
Returns the bounding box of this geometry. |
CoordinateSystem |
getCoordinateSystem()
Returns the geometry's coordinate system, or null if unknow.
|
java.lang.String |
getName(java.util.Locale locale)
Returns the localized name for this geometry, or null if none.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform transform)
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 transform,
double flatness)
Returns a flattened path iterator for this geometry. |
int |
getPointCount()
Return the number of points in this geometry. |
float |
getRenderingResolution()
Returns the rendering resolution. |
Statistics |
getResolution()
Returns the geometry's resolution. |
java.lang.Object |
getUserObject()
Returns the user object attached to this geometry, which is the same than the user object for the wrapped geometry. |
int |
hashCode()
Returns a hash value for this geometry. |
boolean |
intersects(double x,
double y,
double width,
double height)
Tests if the interior of the geometry intersects the interior of a specified rectangle. |
boolean |
intersects(java.awt.geom.Rectangle2D rectangle)
Tests if the interior of the geometry intersects the interior of a specified rectangle. |
boolean |
intersects(java.awt.Shape shape)
Tests if the interior of the geometry intersects the interior of a specified shape. |
boolean |
isEmpty()
Determines whetever this geometry is empty. |
void |
setCoordinateSystem(CoordinateSystem coordinateSystem)
Set the geometry's coordinate system. |
void |
setRenderingResolution(float resolution)
Hints this geometry that the specified resolution is sufficient for rendering. |
void |
setResolution(double resolution)
Set the geometry's resolution. |
void |
setUserObject(java.lang.Object userObject)
Set the user object for for the wrapped geometry. |
| Methods inherited from class org.geotools.renderer.geom.Geometry |
getID, getStyle, setID, setStyle, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GeometryProxy(Geometry geometry)
geometry - The geometry to wrap.| Method Detail |
public java.lang.String getName(java.util.Locale locale)
null if none.
This method forwards the call to the wrapped geometry.
getName in class Geometrylocale - The desired locale. If no name is available
for this locale, a default locale will be used.
public CoordinateSystem getCoordinateSystem()
null if unknow.
This method forwards the call to the wrapped geometry.
getCoordinateSystem in class Geometry
public void setCoordinateSystem(CoordinateSystem coordinateSystem)
throws org.opengis.referencing.operation.TransformException
setCoordinateSystem in class GeometrycoordinateSystem - The new coordinate system. A null value reset
the default coordinate system (usually the one that best fits internal data).
org.opengis.referencing.operation.TransformException - If a transformation failed. In case of failure,
the state of this object will stay unchanged, as if this method has
never been invoked.public java.lang.Object getUserObject()
getUserObject in class Geometrypublic void setUserObject(java.lang.Object userObject)
setUserObject in class Geometrypublic boolean isEmpty()
isEmpty in class Geometrypublic int getPointCount()
getPointCount in class Geometrypublic java.awt.Rectangle getBounds()
Shape interface,
but it doesn't provide enough precision for most cases.
Use getBounds2D() instead.
getBounds2D().
This method forwards the call to the wrapped geometry.
getBounds in interface java.awt.ShapegetBounds in class Geometrypublic java.awt.geom.Rectangle2D getBounds2D()
getBounds2D in interface java.awt.ShapegetBounds2D in class Geometry
public boolean contains(double x,
double y)
contains in interface java.awt.Shapecontains in class Geometryx - the specified x coordinates in this geometry coordinate system.y - the specified y coordinates in this geometry coordinate system.
true if the specified coordinates are inside
the geometry boundary; false otherwise.public boolean contains(java.awt.geom.Point2D point)
Point2D is inside the boundary of this geometry.
This method forwards the call to the wrapped geometry.
contains in interface java.awt.Shapecontains in class Geometrypoint - the specified point in this geometry coordinate system.
true if the specified point is inside
the geometry boundary; false otherwise.
public boolean contains(double x,
double y,
double width,
double height)
contains in interface java.awt.Shapecontains in class Geometrypublic boolean contains(java.awt.geom.Rectangle2D rectangle)
contains in interface java.awt.Shapecontains in class Geometrypublic boolean contains(java.awt.Shape shape)
contains in class Geometry
public boolean intersects(double x,
double y,
double width,
double height)
intersects in interface java.awt.Shapeintersects in class Geometrypublic boolean intersects(java.awt.geom.Rectangle2D rectangle)
intersects in interface java.awt.Shapeintersects in class Geometrypublic boolean intersects(java.awt.Shape shape)
intersects in class Geometrypublic Geometry clip(Clipper clipper)
GeometryProxy instance with the same style than
the current one.
clip in class Geometryclipper - The clipping area.
null if this geometry doesn't intersect the clip, this
if no clip has been performed, or a new clipped geometry otherwise.
public float compress(CompressionLevel level)
throws org.opengis.referencing.operation.TransformException
compress in class Geometrylevel - The compression level (or algorithm) to use.
org.opengis.referencing.operation.TransformException - If an error has come up during a cartographic projection.public Statistics getResolution()
getResolution in class Geometrynull
if this geometry doesn't contains any point.
public void setResolution(double resolution)
throws org.opengis.referencing.operation.TransformException
setResolution in class Geometryresolution - Desired resolution, in the same linear units than getResolution().
org.opengis.referencing.operation.TransformException - If some coordinate transformations were needed and failed.
There is no guaranteed on geometry's state in case of failure.public float getRenderingResolution()
getRenderingResolution in class Geometrypublic void setRenderingResolution(float resolution)
setRenderingResolution in class Geometryresolution - The resolution to use at rendering time, in units of this geometry's
coordinate system (linear or angular units).public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform transform)
getPathIterator in interface java.awt.ShapegetPathIterator in class Geometry
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform transform,
double flatness)
getPathIterator in interface java.awt.ShapegetPathIterator in class Geometrypublic final java.lang.Object clone()
final for implementation reason.
clone in interface org.opengis.util.Cloneableclone in class Geometrypublic boolean equals(java.lang.Object object)
equals in class Geometrypublic int hashCode()
hashCode in class Geometry
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||