Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)

B28401-02


oracle.spatial.geometry
Class J3D_Geometry

java.lang.Object
  extended by oracle.spatial.geometry.JGeometry
      extended by oracle.spatial.geometry.J3D_Geometry

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class J3D_Geometry
extends JGeometry
See Also:
Serialized Form

Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.spatial.geometry.JGeometry
JGeometry.Point

 

Field Summary
static int ETYPE_COMPOSITEPOLYGON
           
static int ETYPE_COMPOSITESOLID
           
static int ETYPE_COMPOSITESURFACE
           
static int ETYPE_POLYGON
           
static int ETYPE_SOLID
           
static int ETYPE_SURFACE
           
static int GTYPE_MULTISOLID
           
static int GTYPE_MULTISURFACE
           
static int GTYPE_SOLID
           
static int GTYPE_SURFACE
           

 

Fields inherited from class oracle.spatial.geometry.JGeometry
GTYPE_COLLECTION, GTYPE_CURVE, GTYPE_MULTICURVE, GTYPE_MULTIPOINT, GTYPE_MULTIPOLYGON, GTYPE_POINT, GTYPE_POLYGON

 

Constructor Summary
J3D_Geometry(int gtype, int srid, double x, double y, double z)
           
J3D_Geometry(int gtype, int srid, int[] elemInfo, double[] ordinates)
           

 

Method Summary
 boolean anyInteract(J3D_Geometry A, double tolerance)
          Returns whether two 3-D geometries anyInteract or not.
 boolean anyInteract2(J3D_Geometry A, boolean[] is_solid, boolean[] polygons, boolean[] holes, double tolerance)
           
static JGeometry appendToCollection(JGeometry collGeom, JGeometry scGeom)
          Returns a collection or multi-x geometry by appending simple (x) geometries in 3-D.
 double area(double tolerance)
          Returns the total planar surface area of a 3-D geometry.
 J3D_Geometry centroid3d(double tolerance)
          Returns the centroid aka center of mass, center of gravity of solid 3-D geometry of uniform material density.
 java.util.ArrayList closestPoints(J3D_Geometry A, double tolerance)
          Returns the closest points of approach between two 3-D geometries.
 double distance(J3D_Geometry A, double tolerance)
          Returns the minimum distance between two 3-D geometries.
 double[] distCpa(J3D_Geometry A, double tolerance)
          Returns the closest points of approach (and hence the minimum distance) between two J3D_Geometry geometries.
 double[] distCpa2(J3D_Geometry A, boolean[] is_solid, boolean[] polygons, boolean[] holes, double tolerance)
           
static JGeometry extrusion(JGeometry polygon, double[] grdHeight, double[] height, java.sql.Connection conn, boolean cond, double tolerance)
          Returns the extruded 3-D geometry from a 2-D polygon.
static JGeometry extrusion(JGeometry polygon, double[] grdHeight, double[] height, java.sql.Connection conn, boolean cond, double tolerance, int optional3dSrid)
          Returns the extruded 3-D geometry from a 2-D polygon.
static JGeometry extrusion(JGeometry polygon, double grdHeight, double height, java.sql.Connection conn, boolean cond, double tolerance)
          Returns the extruded 3-D geometry from a 2-D polygon.
static JGeometry extrusion(JGeometry polygon, double grdHeight, double height, java.sql.Connection conn, boolean cond, double tolerance, int optional3dSrid)
          Returns the extruded 3-D geometry from a 2-D polygon.
 J3D_Geometry getElementByLabel(java.lang.String label)
          Returns the sub-geometry indicated by the label string.
 void getFlags(J3D_Geometry simplegeom, boolean[] is_solid, boolean[] polygons, boolean[] holes)
           
 boolean inside3d(J3D_Geometry solid2, double tolerance)
          Returns whether the first solid is inside the second solid or not.
 double length(double tolerance)
          Returns the perimeter of a 3-D geometry.
 double length(int count_shared_edges, double tolerance)
          Returns the perimeter of a 3-D geometry.
 java.lang.String validate(boolean CONDITIONAL, double tolerance)
          Returns whether a 3-D geometry is valid or not.
 double volume(double tolerance)
          Returns the volume of a 3-D geometry.

 

Methods inherited from class oracle.spatial.geometry.JGeometry
affineTransforms, buffer, buffer, byteArrayToHexString, clone, computeArc, createCircle, createCircle, createDoubleShape, createDoubleShape, createLinearLineString, createLinearMultiLineString, createLinearPolygon, createLinearPolygon, createLRSLinearLineString, createLRSLinearMultiLineString, createLRSLinearPolygon, createLRSLinearPolygon, createLRSPoint, createMultiPoint, createPoint, createShape, createShape, createShape, densifyArcs, densifyArcs, equals, expandCircle, getDimensions, getElementAt, getElements, getElemInfo, getFirstPoint, getGeomDescriptor, getJavaPoint, getJavaPoints, getLabelPoint, getLabelPointXYZ, getLastPoint, getLRMDimension, getMBR, getNumPoints, getOracleDescriptors, getOrdinatesArray, getOrdinatesOfElements, getOrientMultiPointOffset, getPoint, getSize, getSRID, getType, hasCircularArcs, isCircle, isGeodeticMBR, isLRSGeometry, isMultiPoint, isOrientedMultiPoint, isOrientedPoint, isPoint, isRectangle, linearizeArc, linearizeArc, load, monoMeasure, projectFromLTP, projectToLTP, reFormulateArc, setLRMDimension, setSRID, setType, simplify, simplify, store, store, store, store, store, toString, toStringFull

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

GTYPE_SURFACE

public static final int GTYPE_SURFACE
See Also:
Constant Field Values

GTYPE_SOLID

public static final int GTYPE_SOLID
See Also:
Constant Field Values

GTYPE_MULTISOLID

public static final int GTYPE_MULTISOLID
See Also:
Constant Field Values

GTYPE_MULTISURFACE

public static final int GTYPE_MULTISURFACE
See Also:
Constant Field Values

ETYPE_POLYGON

public static final int ETYPE_POLYGON
See Also:
Constant Field Values

ETYPE_SURFACE

public static final int ETYPE_SURFACE
See Also:
Constant Field Values

ETYPE_COMPOSITEPOLYGON

public static final int ETYPE_COMPOSITEPOLYGON
See Also:
Constant Field Values

ETYPE_COMPOSITESURFACE

public static final int ETYPE_COMPOSITESURFACE
See Also:
Constant Field Values

ETYPE_SOLID

public static final int ETYPE_SOLID
See Also:
Constant Field Values

ETYPE_COMPOSITESOLID

public static final int ETYPE_COMPOSITESOLID
See Also:
Constant Field Values

Constructor Detail

J3D_Geometry

public J3D_Geometry(int gtype,
                    int srid,
                    int[] elemInfo,
                    double[] ordinates)

J3D_Geometry

public J3D_Geometry(int gtype,
                    int srid,
                    double x,
                    double y,
                    double z)

Method Detail

anyInteract

public boolean anyInteract(J3D_Geometry A,
                           double tolerance)
                    throws java.lang.Exception
Returns whether two 3-D geometries anyInteract or not.

The elementExtractor's used here operate with allow_comp_sub_elements set to FALSE.

Parameters:
A - Another J3D_Geometry geometry
tolerance -
Returns:
TRUE or FALSE
Throws:
java.lang.Exception

getFlags

public void getFlags(J3D_Geometry simplegeom,
                     boolean[] is_solid,
                     boolean[] polygons,
                     boolean[] holes)
              throws java.lang.Exception
Throws:
java.lang.Exception

anyInteract2

public boolean anyInteract2(J3D_Geometry A,
                            boolean[] is_solid,
                            boolean[] polygons,
                            boolean[] holes,
                            double tolerance)
                     throws java.lang.Exception
Throws:
java.lang.Exception

distance

public double distance(J3D_Geometry A,
                       double tolerance)
                throws java.lang.Exception
Returns the minimum distance between two 3-D geometries.

Calls distCpa to compute the closest points of approach and then minimum distance. The elementExtractor's used here operate with allow_comp_sub_elements set to FALSE.

Parameters:
A - Another 3-D geometry
tolerance -
Returns:
the minimum distance between two 3-D geometries
Throws:
java.lang.Exception

distCpa

public double[] distCpa(J3D_Geometry A,
                        double tolerance)
                 throws java.lang.Exception
Returns the closest points of approach (and hence the minimum distance) between two J3D_Geometry geometries.

Algorithm: Input: geom1 and geom2 If geometries anyInteract, then: Return cpa = 0; Else: Compute the closest points of approach P1 and P2 between the two geometries geom1 and geom2 WITH considering polygon holes in polygons and solid holes in solids. The elementExtractor's used here operate with allow_comp_sub_elements set to FALSE.

Parameters:
A - Another 3-D geometry
tolerance -
Returns:
the closest points of approach between two 3-D geometries
Throws:
java.lang.Exception

distCpa2

public double[] distCpa2(J3D_Geometry A,
                         boolean[] is_solid,
                         boolean[] polygons,
                         boolean[] holes,
                         double tolerance)
                  throws java.lang.Exception
Throws:
java.lang.Exception

validate

public java.lang.String validate(boolean CONDITIONAL,
                                 double tolerance)
                          throws java.lang.Exception
Returns whether a 3-D geometry is valid or not. If not valid, returns the error message with the erronous part of the geometry.

The children of a geometry are done first here (aka self-validation). Then, the cross-validation is done. The label is stored backwards such that arrayList has pointID, edgeID, ringID, polygonID, csurfID, solidID, multiID. The elementExtractor's used here operate with allow_comp_sub_elements set to TRUE (default) because we would like to return comp-x in multi-x. ElementExtractor errors are caught ONLY here but not in crossElementValidation because each geometry has to go through elementExtractor before calling crossElementValidation function.

Composite surface is expected to be: