Class ElementExtractor
- java.lang.Object
-
- oracle.spatial.geometry.ElementExtractor
-
public class ElementExtractor extends java.lang.ObjectThis extractor extracts elements from J3D_Geometry in an iterative fashion Composite surface is expected to be: < , 1006, N> N tuples of the form <, 1003, x> <, 2003, x>* Composite solid should be of the form: < , 1008, N> N solids each of the form <, 1007, > specified using 1 outer surface and N inner surfaces <, 1006, M> and M tuples of the form <,1003, > m times followed by 0 or more inner solids specified as surfaces as: <, 2006, p> and p tuples of the form <,2003, >Multi-x geometry can have multiple of the composite-x and/or simple-x geometry. x is here could be solid, surface, line, point.
The constructor function's extraction_level parameter can have the following values: LOWER_LEVEL: This returns the elements in the next level of hierarchy (e.g., for a solid, the next Level will be surfaces, for a polygon the next level will be lines etc.); MULTICOMP_TOSIMPLE: This returns the elements of a composite or multi-geometry. For instance, for a composite surface, it returns each surface element as a J3D_GEOMETRY in the "next" call; INNER_OUTER: This returns the inner/outer elements if any. For polygons, it returns the outer first which is followed by inner polygons in subsequent "next" calls. The method ElementExtractor.nextElement() returns J3D_GEOMETRY or null.
If the 3-D geometry has shortcut (optimized box, rectangle) representation, this extractor expands those geometries to full extent via expandSolid and other routines in this code. Thus, the returned geometries will have explicit coordinates and elemInfo.
In MULTICOMP_TOSIMPLE extraction level, users can also arrange to extract directly simple geometries from multi or composite geometries by setting the public parameter allow_comp_sub_elements to FALSE. The default value is TRUE, which means users will extract composite geometry first (if exists) from multi geometry.
Optimized (shortcut) representations are only for axis aligned 3-D geometries.
Please note that the INNER_OUTER parameter is different than the inner_outer integer array of nextElementmethod.
-
-
Field Summary
Fields Modifier and Type Field Description static intETYPE_COMPOSITEPOLYGONstatic intETYPE_COMPOSITESOLIDstatic intETYPE_COMPOSITESURFACEstatic intETYPE_COMPOUNDCURVEstatic intETYPE_COMPOUNDRINGstatic intETYPE_CURVEstatic intETYPE_POINTstatic intETYPE_POLYGONstatic intETYPE_RINGstatic intETYPE_SOLIDstatic intETYPE_SURFACEstatic intETYPE_UNKNOWNstatic intGTYPE_COLLECTIONstatic intGTYPE_CURVEstatic intGTYPE_MULTICURVEstatic intGTYPE_MULTIPOINTstatic intGTYPE_MULTIPOLYGONstatic intGTYPE_MULTISOLIDstatic intGTYPE_MULTISURFACEstatic intGTYPE_POINTstatic intGTYPE_POLYGONstatic intGTYPE_SOLIDstatic intGTYPE_SURFACEstatic intINNER_OUTERstatic intLOWER_LEVELstatic intMULTICOMP_TOSIMPLE
-
Constructor Summary
Constructors Constructor Description ElementExtractor(J3D_Geometry geom)ElementExtractor(J3D_Geometry geom, int type)Constructs an extractor that extracts elements from J3D_Geometry in an iterative fashionElementExtractor(J3D_Geometry geom, int elemStart, int type)ElementExtractor(J3D_Geometry geom, int elemStart, int type, boolean allow_comp_sub_elements_param)ElementExtractor(J3D_Geometry geom, int elemStart, int type, int mydim)ElementExtractor(J3D_Geometry geom, int elemStart, int type, int mydim, boolean allow_comp_sub_elements_param)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected J3D_GeometryexpandSolid(J3D_Geometry geom)J3D_GeometrynextElement(int[] inner_outer)Returns the next element of J3D_Geometry.
-
-
-
Field Detail
-
MULTICOMP_TOSIMPLE
public static final int MULTICOMP_TOSIMPLE
- See Also:
- Constant Field Values
-
INNER_OUTER
public static final int INNER_OUTER
- See Also:
- Constant Field Values
-
LOWER_LEVEL
public static final int LOWER_LEVEL
- See Also:
- Constant Field Values
-
GTYPE_POINT
public static final int GTYPE_POINT
- See Also:
- Constant Field Values
-
GTYPE_CURVE
public static final int GTYPE_CURVE
- See Also:
- Constant Field Values
-
GTYPE_SURFACE
public static final int GTYPE_SURFACE
- See Also:
- Constant Field Values
-
GTYPE_POLYGON
public static final int GTYPE_POLYGON
- See Also:
- Constant Field Values
-
GTYPE_COLLECTION
public static final int GTYPE_COLLECTION
- See Also:
- Constant Field Values
-
GTYPE_SOLID
public static final int GTYPE_SOLID
- See Also:
- Constant Field Values
-
GTYPE_MULTIPOINT
public static final int GTYPE_MULTIPOINT
- See Also:
- Constant Field Values
-
GTYPE_MULTICURVE
public static final int GTYPE_MULTICURVE
- See Also:
- Constant Field Values
-
GTYPE_MULTISURFACE
public static final int GTYPE_MULTISURFACE
- See Also:
- Constant Field Values
-
GTYPE_MULTIPOLYGON
public static final int GTYPE_MULTIPOLYGON
- See Also:
- Constant Field Values
-
GTYPE_MULTISOLID
public static final int GTYPE_MULTISOLID
- See Also:
- Constant Field Values
-
ETYPE_UNKNOWN
public static final int ETYPE_UNKNOWN
- See Also:
- Constant Field Values
-
ETYPE_POINT
public static final int ETYPE_POINT
- See Also:
- Constant Field Values
-
ETYPE_CURVE
public static final int ETYPE_CURVE
- See Also:
- Constant Field Values
-
ETYPE_RING
public static final int ETYPE_RING
- 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_SOLID
public static final int ETYPE_SOLID
- See Also:
- Constant Field Values
-
ETYPE_COMPOUNDCURVE
public static final int ETYPE_COMPOUNDCURVE
- See Also:
- Constant Field Values
-
ETYPE_COMPOUNDRING
public static final int ETYPE_COMPOUNDRING
- 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_COMPOSITESOLID
public static final int ETYPE_COMPOSITESOLID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom, int elemStart, int type, boolean allow_comp_sub_elements_param) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom, int elemStart, int type) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom, int type) throws java.lang.Exception
Constructs an extractor that extracts elements from J3D_Geometry in an iterative fashion- Parameters:
geom- Geometrytype- MULTICOMP_TOSIMPLE (0), or INNER_OUTER (1) or LOWER_LEVEL (2) This is the constructor function's extraction_level parameter which can have the following values: LOWER_LEVEL (2): This returns the elements in the next level of hierarchy (e.g., for a solid, the next Level will be surfaces, for a polygon the next level will be lines etc.); MULTICOMP_TOSIMPLE (0): This returns the elements of a composite or multi-geometry. For instance, for a composite surface, it returns each surface element as a J3D_GEOMETRY in the "next" call; INNER_OUTER (1): This returns the inner/outer elements if any. For polygons, it returns the outer first which is followed by inner polygons in subsequent "next" calls.- Throws:
java.lang.Exception- General exception
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom, int elemStart, int type, int mydim, boolean allow_comp_sub_elements_param) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom, int elemStart, int type, int mydim) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ElementExtractor
public ElementExtractor(J3D_Geometry geom) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
expandSolid
protected J3D_Geometry expandSolid(J3D_Geometry geom) throws java.lang.Exception
- Throws:
java.lang.Exception
-
nextElement
public J3D_Geometry nextElement(int[] inner_outer) throws java.lang.Exception
Returns the next element of J3D_Geometry.This is the iterator to get next element using the above hierarchy. It takes an input J3D_Geometry and returns the next element in sequence.
- Parameters:
inner_outer- This is a single element integer array. It tells whether the extracted next element geometry is a hole(2) or outer geometry(1).- Returns:
- J3D_Geometry geometry which is the next element of input 3-D geometry
- Throws:
java.lang.Exception- General exception
-
-