oracle.sdoapi.geom
Interface GeometryFactory


public interface GeometryFactory

An interface including all functions needed for creating geometry objects.


Method Summary
 CurvePolygon createCircle(double xCenter, double yCenter, double radius)
          Creates a 2-D circle (special case of CurvePolygon geometry).
 CurvePolygon createCurvePolygon(CurveString[] rings)
          Creates a CurvePolygon geometry.
 CurvePolygon createCurvePolygon(CurveString exteriorRing, CurveString[] interiorRings)
          Creates a CurvePolygon geometry.
 CurveString createCurveString(Segment[] segments)
          Creates a CurveString geometry.
 GeometryCollection createGeometryCollection(Geometry[] geometries)
          Creates a GeometryCollection.
 LineString createLineString(CoordPoint[] pointArray)
          Creates a LineString geometry.
 LineString createLineString(double[] xyArray)
          Creates a LineString geometry in a 2-dimensional domain.
 LineString createLineString(int nDim, double[] coordArray)
          Creates a LineString geometry in an n-dimensional domain.
 Point createPoint(CoordPoint point)
          Creates a Point geometry.
 Point createPoint(double[] ordArray)
          Creates a Point geometry.
 Point createPoint(double x, double y)
          Creates a Point geometry in a 2-dimensional domain.
 Point createPoint(double x, double y, double z)
          Creates a Point geometry in a 3-dimensional domain.
 Polygon createPolygon(LineString[] rings)
          Creates a Polygon geometry.
 Polygon createPolygon(LineString exteriorRing, LineString[] interiorRings)
          Creates a Polygon geometry.
 Polygon createRectangle(double xMin, double yMin, double xMax, double yMax)
          Creates a 2-D rectangle (special case of Polygon geometry).
 Segment createSegment(java.lang.Class segmentType, CoordPoint[] pointArray)
          Creates a Segment object for the use of CurveString construction.
 Segment createSegment(java.lang.Class segmentType, int nDim, double[] coordArray)
          Creates a Segment object for the use of CurveString construction.
 SpatialReference getSpatialReference()
          Gets the SpatialReference of this GeometryFactory.
 void setSpatialReference(SpatialReference spatialRef)
          Sets the SpatialReference for this GeometryFactory.
 

Method Detail

getSpatialReference

public SpatialReference getSpatialReference()
Gets the SpatialReference of this GeometryFactory.
Returns:
a SpatialReference object

setSpatialReference

public void setSpatialReference(SpatialReference spatialRef)
Sets the SpatialReference for this GeometryFactory.
Parameters:
spatialRef - a SpatialReference object

createPoint

public Point createPoint(CoordPoint point)
                  throws InvalidGeometryException
Creates a Point geometry.
Parameters:
point - a CoordPoint Object defining the coordinates of the Point.
Returns:
a Point geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Point geometry object

createPoint

public Point createPoint(double x,
                         double y)
                  throws InvalidGeometryException
Creates a Point geometry in a 2-dimensional domain.
Parameters:
x - a double value defining the x-coordinate of the Point.
y - a double value defining the y-coordinate of the Point.
Returns:
a Point geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Point geometry object

createPoint

public Point createPoint(double x,
                         double y,
                         double z)
                  throws InvalidGeometryException
Creates a Point geometry in a 3-dimensional domain.
Parameters:
x - a double value defining the x-coordinate of the Point.
y - a double value defining the y-coordinate of the Point.
z - a double value defining the z-coordinate of the Point.
Returns:
a Point geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Point geometry object

createPoint

public Point createPoint(double[] ordArray)
                  throws InvalidGeometryException
Creates a Point geometry.
Parameters:
ordArray - an array of double values defining the coordinates of the Point.
Returns:
a Point geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Point geometry object

createCurveString

public CurveString createCurveString(Segment[] segments)
                              throws InvalidGeometryException
Creates a CurveString geometry.
Parameters:
segments - an array of Segment objects defining the CurveString.
Returns:
a CurveString geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid CurveString geometry object

createLineString

public LineString createLineString(CoordPoint[] pointArray)
                            throws InvalidGeometryException
Creates a LineString geometry.
Parameters:
pointArray - an array of points defining the LineString. Each point is a CoordPoint object.
Returns:
a LineString geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid LineString geometry object

createLineString

public LineString createLineString(double[] xyArray)
                            throws InvalidGeometryException
Creates a LineString geometry in a 2-dimensional domain.
Parameters:
xyArray - an array of coordinates defining a 2-D LineString.
Returns:
a LineString geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid LineString geometry object

createLineString

public LineString createLineString(int nDim,
                                   double[] coordArray)
                            throws InvalidGeometryException
Creates a LineString geometry in an n-dimensional domain.
Parameters:
nDim - the number of dimensions
coordArray - an array of coordinates defining a 2-D or higher dimensional LineString
Returns:
a LineString geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid LineString geometry object

createCurvePolygon

public CurvePolygon createCurvePolygon(CurveString exteriorRing,
                                       CurveString[] interiorRings)
                                throws InvalidGeometryException
Creates a CurvePolygon geometry.
Parameters:
exteriorRing - a CurveString object defining the exterior ring of the CurvePolygon. There is exactly one exterior ring for a Polygon.
interiorRings - an array of CurveString objects defining the interior rings of the CurvePolygon. There can be none or several interior rings for a Polygon.
Returns:
a CurvePolygon geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid CurvePolygon geometry object

createCurvePolygon

public CurvePolygon createCurvePolygon(CurveString[] rings)
                                throws InvalidGeometryException
Creates a CurvePolygon geometry.
Parameters:
rings - an array of CurveString objects defining the exterior and interior rings of the CurvePolygon. There can be none or several interior rings and exactly one exterior ring for a Polygon.
Returns:
a CurvePolygon geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid CurvePolygon geometry object

createPolygon

public Polygon createPolygon(LineString exteriorRing,
                             LineString[] interiorRings)
                      throws InvalidGeometryException
Creates a Polygon geometry.
Parameters:
exteriorRing - a LineString object defining the exterior ring of the Polygon. There is exactly one exterior ring for a Polygon.
interiorRings - an array of LineString objects defining the interior rings of the Polygon. There can be none or several interior rings for a Polygon.
Returns:
a Polygon geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Polygon geometry object

createPolygon

public Polygon createPolygon(LineString[] rings)
                      throws InvalidGeometryException
Creates a Polygon geometry.
Parameters:
rings - an array of LineString objects defining the exterior and interior rings of the Polygon. There can be none or several interior rings and exactly one exterior ring for a Polygon.
Returns:
a Polygon geometry object
Throws:
InvalidGeometryException - if the specified parameter does not define a valid Polygon geometry object

createCircle

public CurvePolygon createCircle(double xCenter,
                                 double yCenter,
                                 double radius)
                          throws InvalidGeometryException
Creates a 2-D circle (special case of CurvePolygon geometry).
Parameters:
xCenter - x coordinate of the center
yCenter - y coordinate of the center
radius - radius of the circle
Returns:
a CurvePolygon geometry representing the desired circle
Throws:
InvalidGeometryException - if the specified parameter does not define a valid circle

createRectangle

public Polygon createRectangle(double xMin,
                               double yMin,
                               double xMax,
                               double yMax)
                        throws InvalidGeometryException
Creates a 2-D rectangle (special case of Polygon geometry).
Parameters:
xMin - x coordinate of the lower-left corner
yMin - y coordinate of the lower-left corner
xMax - x coordinate of the upper-right corner
yMax - y coordinate of the upper-right corner
Returns:
a Polygon geometry representing the desired rectangle
Throws:
InvalidGeometryException - if the specified parameter does not define a valid rectangle

createGeometryCollection

public GeometryCollection createGeometryCollection(Geometry[] geometries)
                                            throws InvalidGeometryException
Creates a GeometryCollection. This method may return a subtype of GeometryCollection, such as MultiPoint.
Parameters:
geometries - an array of Geometry objects to create a collection from.
Returns:
a GeometryCollection object
Throws:
InvalidGeometryException - if the specified parameter does not represent a valid array of Geometry objects

createSegment

public Segment createSegment(java.lang.Class segmentType,
                             CoordPoint[] pointArray)
                      throws InvalidGeometryException
Creates a Segment object for the use of CurveString construction.
Parameters:
segmentType - the type of Segment object to create.
pointArray - an array of coordinate points.
Returns:
a Segment object
Throws:
InvalidGeometryException - if the specified segment type is not supported or the specified coordinate points do not define a valid Segment object

createSegment

public Segment createSegment(java.lang.Class segmentType,
                             int nDim,
                             double[] coordArray)
                      throws InvalidGeometryException
Creates a Segment object for the use of CurveString construction.
Parameters:
nDim - the number of dimensions
segmentType - the type of Segment object to create.
coordArray - an array of coordinates (x, y, z, etc).
Returns:
a Segment object
Throws:
InvalidGeometryException - if the specified segment type is not supported or the specified coordinates do not define a valid Segment object