fmeobjects.FMEFeature.removeGeometry

FMEFeature.removeGeometry(geometryName)

Remove and return an existing geometry on a feature, or a named geometry if a match is found. When no geometry name is given, all existing geometries are returned as an aggregate. In all cases, the feature loses the returned geometry or geometries, which can no longer be accessed.

Parameters:

geometryName (str) – (Optional) The name of the geometry to remove.

Return type:

FMEGeometry or None

Returns:

A geometry, or None if the geometry name is not found.

Note: This method returns a terminal geometry type of the FMEGeometry; i.e. one of the leaf classes in the FMEGeometry inheritance graph. For example, a FMEPoint is returned if the geometry truly is a point.