fmeobjects.FMEGeometryTools.refineGeometry
- FMEGeometryTools.refineGeometry(geometry, refineType)
This routine offers a number of options to refine geometries. The options are defined as a bitmask whose components are defined in Refine Geometry Type. Options applying to curves will affect area boundaries.
FME_RG_AGG_CONVERT_HOMOGENEOUS_TO_MULTI
: Any aggregates that could be represented as multis will have their parts removed and a new multi will be the result.FME_RG_AGG_OR_MULTI_RECURSE
: Elements of aggregates and multis will also be refined according to the same parameters.FME_RG_AGG_OR_MULTI_EXTRACT_SINGLETONS
: Aggregates or multis with only one element will have it removed and returned.FME_RG_AREA_STANDARDIZE
: Donuts with no holes will become polygons or ellipses, and polygons with arc boundaries will become ellipses.FME_RG_ARC_STROKE
: Arcs will be converted to lines.FME_RG_ARC_STANDARDIZE
: Center-point arcs will have their parameters adjusted so that start angle is in [0, 360) and rotation is in [0, 90].FME_RG_PATH_EXTRACT_SINGLE_ARCS
: Paths containing one arc (or other non-line segment) and no lines will be replaced by that segment.FME_RG_PATH_EXTRACT_SINGLE_LINES
: Paths containing one line and no arcs will be replaced by that line.FME_RG_PATH_CONCAT_LINES
: Consecutive line parts in a path will be combined into single lines, as long as they contain identical geometry attributes.FME_RG_LINE_REMOVE_DUPLICATE_COORDS
: Consecutive duplicate coordinates are removed. Arcs are unmodified. Only x and y values in the coordinates are used to detect duplicates.FME_RG_LINE_REMOVE_DUPLICATE_COORDS_Z
: Consecutive duplicate coordinates are removed. Arcs are unmodified. x, y, and z values in the coordinates are used to detect duplicates.FME_RG_3D_CONVERT_TO_WIREFRAME
: 3D surfaces and solids will be converted into wire-frames.FME_RG_RASTER_CONVERT_TO_POLYGON
: Rasters will be replaced with their polygon boundaries.FME_RG_3D_CONVERT_TO_POLYGON
: 3D surfaces and solids will be converted into areas.FME_RG_3D_CONVERT_TO_FACE
: 3D surfaces and solids will be converted into faces.FME_RG_3D_REMOVE_VERTICAL_SEGMENTS
: Any vertical segments that exist in three dimensional curves.FME_RG_3D_CONVERT_VERTICAL_FACES_TO_WIREFRAME
: Convert any vertical faces that exist in 3D surfaces and solids to wire-frames.FME_RG_REMOVE_NULLS
: recursively deletes anyFMENull
geometries. Container geometries such as aggregates will become empty if all they contained wasFMENull
. If the user passes in aFMENull
, aFMENull
will be returned.FME_RG_3D_AUTO_FRONT_SIDED_SURFACE
: will modify a surface so that it is front-sided, where the side selected favors the side with a non-default appearance or in the case of two non-default appearances, the side with a texture reference.
- Parameters:
geometry (FMEGeometry) – The geometry to refine.
refineType (int) – One of the Refine Geometry Types.
- Return type:
- Returns:
The geometry to refine. Note: This method returns a terminal geometry type of the
FMEGeometry
; i.e. one of the leaf classes in theFMEGeometry
inheritance graph. For example, aFMEPolygon
is returned if the geometry truly is a polygon.- Raises:
FMEException – An exception is raised if an error occurred.