spatialdb
Class GeometryConversion

java.lang.Object
  |
  +--spatialdb.GeometryConversion

public class GeometryConversion
extends java.lang.Object

A class offering conversion methods for sdoapi.geom geometries.


Constructor Summary
GeometryConversion()
           
 
Method Summary
static java.awt.geom.Area toAwtArea(oracle.sdoapi.geom.Geometry polygon)
          Constructs a java.awt.geom.Area from a sdoapi.geom.Polygon
static java.awt.geom.Area toAwtArea(oracle.sdoapi.geom.Geometry polygon, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.geom.Area from a sdoapi.geom.Polygon
static java.awt.geom.Ellipse2D.Double toAwtEllipse2D(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix, int pixels)
          Constructs a java.awt.geom.Ellipse2D from a sdoapi.geom.Geometry
static java.awt.geom.Ellipse2D.Double toAwtEllipse2D(oracle.sdoapi.geom.Geometry geometry, int pixels)
          Constructs a java.awt.geom.Ellipse2D from a sdoapi.geom.Geometry
static java.awt.geom.GeneralPath toAwtGeneralPath(oracle.sdoapi.geom.Geometry line)
          Constructs a java.awt.geom.GeneralPath from a sdoapi.geom.LineStrimg
static java.awt.geom.GeneralPath toAwtGeneralPath(oracle.sdoapi.geom.Geometry line, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.geom.GeneralPath from a sdoapi.geom.LineStrimg
static java.awt.Point toAwtPoint(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.Point from a sdoapi.geom.Geometry
static java.awt.Point toAwtPoint(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.Point from a sdoapi.geom.Geometry
static java.awt.geom.Point2D.Double toAwtPoint2D(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.geom.Point2D from a sdoapi.geom.Geometry
static java.awt.geom.Point2D.Double toAwtPoint2D(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.geom.Point2D from a sdoapi.geom.Geometry
static java.awt.Polygon toAwtPolygon(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.Polygon from a sdoapi.geom.Geometry
static java.awt.Polygon toAwtPolygon(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.Polygon from a sdoapi.geom.Geometry
static java.awt.Polygon toAwtPolyline(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.Polygon (because of a missing Polyline class) from a sdoapi.geom.Geometry
static java.awt.Polygon toAwtPolyline(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.Polygon (because of a missing Polyline class) from a sdoapi.geom.Geometry
static java.awt.Rectangle toAwtRectangle(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.Rectangle from a sdoapi.geom.Geometry
static java.awt.Rectangle toAwtRectangle(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.Rectangle from a sdoapi.geom.Geometry
static java.awt.geom.Rectangle2D.Double toAwtRectangle2D(oracle.sdoapi.geom.Geometry geometry)
          Constructs a java.awt.geom.Rectangle2D from a sdoapi.geom.Geometry
static java.awt.geom.Rectangle2D.Double toAwtRectangle2D(oracle.sdoapi.geom.Geometry geometry, java.awt.geom.AffineTransform matrix)
          Constructs a java.awt.geom.Rectangle2D from a sdoapi.geom.Geometry
static java.util.Vector toAwtShape(oracle.sdoapi.geom.Geometry geom)
          Constructs one or several objects of java.awt.Shape from a sdoapi.geom.Geometry
static java.util.Vector toAwtShape(oracle.sdoapi.geom.Geometry geom, java.awt.geom.AffineTransform matrix)
          Constructs one or several objects of java.awt.Shape from a sdoapi.geom.Geometry
static java.lang.Object toDoubleAwt(oracle.sdoapi.geom.Geometry geom)
          Generates a double-based AWT geometry for the given Geometry.
static java.lang.Object toDoubleAwt(oracle.sdoapi.geom.Geometry geom, java.awt.geom.AffineTransform matrix)
          Generates a double-based AWT geometry for the given Geometry.
static java.lang.Object toIntegerAwt(oracle.sdoapi.geom.Geometry geom)
          Generates an integer-based AWT geometry for the given Geometry.
static java.lang.Object toIntegerAwt(oracle.sdoapi.geom.Geometry geom, java.awt.geom.AffineTransform matrix)
          Generates an integer-based AWT geometry for the given Geometry.
static java.lang.String toXML(double x, double y)
          Generates a string representing a DOM node out of the given coordinates.
static java.lang.String toXML(double xmin, double ymin, double xmax, double ymax)
          Generates a string representing a DOM node out of the given Box.
static java.lang.String toXML(oracle.sdoapi.geom.Geometry geom)
          Generates a string representing a DOM node for the given Geometry.
static java.lang.String toXML(oracle.sdoapi.geom.Geometry geom, java.lang.String indentation)
          Generates a string representing a DOM node for the given Geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryConversion

public GeometryConversion()
Method Detail

toAwtArea

public static java.awt.geom.Area toAwtArea(oracle.sdoapi.geom.Geometry polygon)
Constructs a java.awt.geom.Area from a sdoapi.geom.Polygon

Parameters:
polygon - the geometry representing a polygon
Returns:
the polygon as area

toAwtArea

public static java.awt.geom.Area toAwtArea(oracle.sdoapi.geom.Geometry polygon,
                                           java.awt.geom.AffineTransform matrix)
Constructs a java.awt.geom.Area from a sdoapi.geom.Polygon

Parameters:
polygon - the geometry representing a polygon
matrix - the affine transformation (or null)
Returns:
the transformed polygon as area

toAwtEllipse2D

public static java.awt.geom.Ellipse2D.Double toAwtEllipse2D(oracle.sdoapi.geom.Geometry geometry,
                                                            int pixels)
Constructs a java.awt.geom.Ellipse2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
pixels - the radius of the circle in pixels
Returns:
the transformed point as a circle

toAwtEllipse2D

public static java.awt.geom.Ellipse2D.Double toAwtEllipse2D(oracle.sdoapi.geom.Geometry geometry,
                                                            java.awt.geom.AffineTransform matrix,
                                                            int pixels)
Constructs a java.awt.geom.Ellipse2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
matrix - the affine transformation (or null)
pixels - the radius of the circle in pixels
Returns:
the transformed point as a circle

toAwtGeneralPath

public static java.awt.geom.GeneralPath toAwtGeneralPath(oracle.sdoapi.geom.Geometry line)
Constructs a java.awt.geom.GeneralPath from a sdoapi.geom.LineStrimg

Parameters:
line - the geometry representing a line
Returns:
the line as general path

toAwtGeneralPath

public static java.awt.geom.GeneralPath toAwtGeneralPath(oracle.sdoapi.geom.Geometry line,
                                                         java.awt.geom.AffineTransform matrix)
Constructs a java.awt.geom.GeneralPath from a sdoapi.geom.LineStrimg

Parameters:
line - the geometry representing a line
matrix - the affine transformation (or null)
Returns:
the transformed line as general path

toAwtPoint

public static java.awt.Point toAwtPoint(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.Point from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
Returns:
the rounded point

toAwtPoint

public static java.awt.Point toAwtPoint(oracle.sdoapi.geom.Geometry geometry,
                                        java.awt.geom.AffineTransform matrix)
Constructs a java.awt.Point from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
matrix - the affine transformation (or null)
Returns:
the transformed and rounded point

toAwtPoint2D

public static java.awt.geom.Point2D.Double toAwtPoint2D(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.geom.Point2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
Returns:
the point

toAwtPoint2D

public static java.awt.geom.Point2D.Double toAwtPoint2D(oracle.sdoapi.geom.Geometry geometry,
                                                        java.awt.geom.AffineTransform matrix)
Constructs a java.awt.geom.Point2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a point
matrix - the affine transformation (or null)
Returns:
the transformed point

toAwtPolygon

public static java.awt.Polygon toAwtPolygon(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.Polygon from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a sdoapi.geom.Polygon
Returns:
the outer polygon

toAwtPolygon

public static java.awt.Polygon toAwtPolygon(oracle.sdoapi.geom.Geometry geometry,
                                            java.awt.geom.AffineTransform matrix)
Constructs a java.awt.Polygon from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a sdoapi.geom.Polygon
matrix - the affine transformation (or null)
Returns:
the transformed outer polygon

toAwtPolyline

public static java.awt.Polygon toAwtPolyline(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.Polygon (because of a missing Polyline class) from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a sdoapi.geom.LineString
Returns:
the polyline as polygon

toAwtPolyline

public static java.awt.Polygon toAwtPolyline(oracle.sdoapi.geom.Geometry geometry,
                                             java.awt.geom.AffineTransform matrix)
Constructs a java.awt.Polygon (because of a missing Polyline class) from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a sdoapi.geom.LineString
matrix - the affine transformation (or null)
Returns:
the transformed polyline as polygon

toAwtRectangle

public static java.awt.Rectangle toAwtRectangle(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.Rectangle from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a rectangle
Returns:
the rounded rectangle

toAwtRectangle

public static java.awt.Rectangle toAwtRectangle(oracle.sdoapi.geom.Geometry geometry,
                                                java.awt.geom.AffineTransform matrix)
Constructs a java.awt.Rectangle from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a rectangle
matrix - the affine transformation (or null)
Returns:
the transformed and rounded rectangle

toAwtRectangle2D

public static java.awt.geom.Rectangle2D.Double toAwtRectangle2D(oracle.sdoapi.geom.Geometry geometry)
Constructs a java.awt.geom.Rectangle2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a rectangle
Returns:
the rectangle

toAwtRectangle2D

public static java.awt.geom.Rectangle2D.Double toAwtRectangle2D(oracle.sdoapi.geom.Geometry geometry,
                                                                java.awt.geom.AffineTransform matrix)
Constructs a java.awt.geom.Rectangle2D from a sdoapi.geom.Geometry

Parameters:
geometry - the geometry representing a rectangle
matrix - the affine transformation (or null)
Returns:
the transformed rectangle

toAwtShape

public static java.util.Vector toAwtShape(oracle.sdoapi.geom.Geometry geom)
Constructs one or several objects of java.awt.Shape from a sdoapi.geom.Geometry

Parameters:
geom - the geometry
Returns:
vector of the shape(s)

toAwtShape

public static java.util.Vector toAwtShape(oracle.sdoapi.geom.Geometry geom,
                                          java.awt.geom.AffineTransform matrix)
Constructs one or several objects of java.awt.Shape from a sdoapi.geom.Geometry

Parameters:
geom - the geometry
matrix - the affine transformation (or null)
Returns:
vector of the shape(s)

toDoubleAwt

public static java.lang.Object toDoubleAwt(oracle.sdoapi.geom.Geometry geom)
Generates a double-based AWT geometry for the given Geometry.

Parameters:
geom - the geometry
Returns:
the object

toDoubleAwt

public static java.lang.Object toDoubleAwt(oracle.sdoapi.geom.Geometry geom,
                                           java.awt.geom.AffineTransform matrix)
Generates a double-based AWT geometry for the given Geometry.

Parameters:
geom - the geometry
matrix - the affine transformation (or null)
Returns:
the object

toIntegerAwt

public static java.lang.Object toIntegerAwt(oracle.sdoapi.geom.Geometry geom)
Generates an integer-based AWT geometry for the given Geometry.

Parameters:
geom - the geometry
Returns:
the object

toIntegerAwt

public static java.lang.Object toIntegerAwt(oracle.sdoapi.geom.Geometry geom,
                                            java.awt.geom.AffineTransform matrix)
Generates an integer-based AWT geometry for the given Geometry.

Parameters:
geom - the geometry
matrix - the affine transformation (or null)
Returns:
the object

toXML

public static java.lang.String toXML(double x,
                                     double y)
Generates a string representing a DOM node out of the given coordinates.

Parameters:
x - the x-coordinate
y - the y-coordinate
Returns:
the string

toXML

public static java.lang.String toXML(double xmin,
                                     double ymin,
                                     double xmax,
                                     double ymax)
Generates a string representing a DOM node out of the given Box.

Parameters:
xmin - the minimum x-coordinate
ymin - the minimum y-coordinate
xmax - the maximum x-coordinate
ymax - the maximum y-coordinate
Returns:
the string

toXML

public static java.lang.String toXML(oracle.sdoapi.geom.Geometry geom)
Generates a string representing a DOM node for the given Geometry.

Parameters:
geom - the geometry
Returns:
the string

toXML

public static java.lang.String toXML(oracle.sdoapi.geom.Geometry geom,
                                     java.lang.String indentation)
Generates a string representing a DOM node for the given Geometry.

Parameters:
geom - the geometry
indentation - indentation of the output
Returns:
the string