fmeobjects.FMEAggregate

Inheritance diagram of fmeobjects.FMEAggregate

FMEAggregate.appendPart

appendPart(geometry),

FMEAggregate.appendPartInLocalCoordinates

appendPartInLocalCoordinates(geometry),

FMEAggregate.appendParts

appendParts(aggregate),

FMEAggregate.boundingBox()

This method returns the bounding box of the geometry.

FMEAggregate.boundingCube()

This method returns the bounding cube of the geometry.

FMEAggregate.bounds()

Returns the bounds of the geometry.

FMEAggregate.clearMeasures()

Remove all measures from the geometry.

FMEAggregate.copyAttributesFromFeature(...)

Copies all the attributes from the given feature to traits on this geometry, if they match the (optional) regular expression.

FMEAggregate.copyNameFromGeometry(sourceGeometry)

Copies the name of the 'sourceGeometry' onto this geometry.

FMEAggregate.copyTraitsFromGeometry(...)

Copies all the traits from the given geometry that match the (optional) regular expression.

FMEAggregate.copyTraitsToFeature(...)

Copies all the traits from this geometry to attributes on the given feature, if they match the (optional) regular expression.

FMEAggregate.deleteName()

Deletes the geometry's name.

FMEAggregate.force2D()

Reduces the geometry to 2D.

FMEAggregate.force3D(newZ)

This sets the geometry's dimension to 3D.

FMEAggregate.getAppearanceReference

getAppearanceReference(front),

FMEAggregate.getArea()

Area calculation.

FMEAggregate.getGeometryDefinitionReference()

This method will get the geometry definition reference associated with this aggregate, if this aggregate is a geometry instance.

FMEAggregate.getGeometryInstanceLocalOrigin()

This method retrieves the local origin associated with the geometry instance, if this aggregate is a geometry instance.

FMEAggregate.getGeometryInstanceMatrix()

This method retrieves the geometry instance transformation matrix associated with the geometry instance, if this aggregate is a geometry instance.

FMEAggregate.getMeasureNames()

Retrieve the names of the measures on this geometry.

FMEAggregate.getMultipleGeometryFlag()

This method determines if the aggregate contains a MultipleGeometry, that is, whether the aggregate is structured in a way such that each part is its own geometry separate from the other parts in the aggregate.

FMEAggregate.getName()

This routine retrieves the 'name' of this geometry as a str.

FMEAggregate.getPartAt

getPartAt(index),

FMEAggregate.getPartAtInLocalCoordinates

getPartAtInLocalCoordinates(index),

FMEAggregate.getTrait(traitName)

Retrieves the geometry trait value of the specified trait name.

FMEAggregate.getTraitNames()

Retrieve the names of the traits on this geometry.

FMEAggregate.getTraitNullMissingAndType(...)

This method returns a tuple of a boolean, indicating if the trait is null, a boolean, indicating if the trait is missing, and an integer representing the type of the trait.

FMEAggregate.getTraitType(traitName)

Returns the type of given trait.

FMEAggregate.getTransformationMatrix()

Gets this aggregate's transformation matrix.

FMEAggregate.hasGeometryInstance

hasGeometryInstance(recursive),

FMEAggregate.hasMeasures()

Check if this geometry or any sub part of this geometry has measures.

FMEAggregate.hasName()

Returns whether or not the geometry has a name.

FMEAggregate.hasTransformationMatrix()

This method determines if the aggregate has a transformation matrix or not.

FMEAggregate.is3D()

Returns whether or not the geometry is 3D.

FMEAggregate.isAMulti()

This method determines if the aggregate's parts conform to a FMEMultiCurve, FMEMultiArea, or FMEMultiText, representation.

FMEAggregate.isCollection()

Check if the geometry is an aggregate or multi-part collection.

FMEAggregate.isSimpleAggregate()

This method determines if the aggregate is a simple aggregate.

FMEAggregate.measureExists(measureName)

Returns True if the specified measure exists and False otherwise.

FMEAggregate.numParts()

This returns the number of geometries that make up this aggregate.

FMEAggregate.offset

offset(point),

FMEAggregate.removeLastPart()

This removes and returns the last geometry of the aggregate.

FMEAggregate.removeMeasure(measureName)

Removes the measure with name 'measureName' if supplied, or the default measure, if there is one.

FMEAggregate.removeTraits(regexp)

This method has 4 modes:

FMEAggregate.removeTransformationMatrix()

Removes this aggregate's transformation matrix.

FMEAggregate.renameMeasure(oldMeasureName, ...)

Renames the measure specified by 'oldMeasureName' to the new name, specified by 'newMeasureName'.

FMEAggregate.resolvePartDefaults()

Recursively resolves surface parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent surface, if such a value exists.

FMEAggregate.rotate2D(center, angle)

The angle is CCW up from the horizontal and is measured in degrees.

FMEAggregate.scale(xscale, yscale, zscale)

Applies a scale factor to the aggregate.

FMEAggregate.setAppearanceReference(...)

This method associates an appearance within the Library with this aggregate.

FMEAggregate.setGeometryDefinitionReference

setGeometryDefinitionReference(gdReference),

FMEAggregate.setGeometryInstanceLocalOrigin(x, y, z)

This method sets the geometry instance local origin of this aggregate.

FMEAggregate.setGeometryInstanceMatrix

setGeometryInstanceMatrix(matrix),

FMEAggregate.setMultipleGeometryFlag

setMultipleGeometryFlag(isMultiple),

FMEAggregate.setName(name)

Sets the geometry's name with a str.

FMEAggregate.setTrait(traitName, traitValue)

Sets a geometry trait with the specified value.

FMEAggregate.setTraitNullWithType(traitName, ...)

This method supplies a null trait value with a type to the geometry.

FMEAggregate.setTransformationMatrix

setTransformationMatrix(matrix),

class FMEAggregate

FME Aggregate Class

Create an instance of an Aggregate geometry object.

init()

Default FMEAggregate constructor.

Return type:

FMEAggregate

Returns:

An instance of an Aggregate geometry object.

init(aggregate)

Create a copy of the passed in Aggregate geometry object.

Parameters:

aggregate (FMEAggregate) – The Aggregate geometry object to create a copy of.

Return type:

FMEAggregate

Returns:

An instance of an Aggregate Geometry object.

__init__(*args, **kwargs)
appendPart()

appendPart(geometry),

This appends the geometry to the aggregate. If None is passed in, nothing will be appended. Note that the geometries stored in an aggregate may have different dimensions. Calling this method will implicitly apply and clear any matrix associated with this aggregate.

Parameters:

geometry (FMEGeometry) – The geometry to be appended.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

appendPartInLocalCoordinates()

appendPartInLocalCoordinates(geometry),

This appends the geometry to the aggregate. If None is passed in, nothing will be appended. Note that the geometries stored in an aggregate may have different dimensions. Calling this method will leave any matrix associated with the aggregate intact, meaning the new part will have any matrix applied.

Parameters:

geometry (FMEGeometry) – The geometry to be appended.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

appendParts()

appendParts(aggregate),

This appends the aggregate of geometries passed in to the aggregate. If None is passed in, nothing will be appended. Calling this method will implicitly apply and clear any matrix associated with this aggregate.

Parameters:

aggregate (FMEAggregate) – The aggregate of geometries to be appended.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

boundingBox()

This method returns the bounding box of the geometry.

Return type:

tuple[tuple[float]]

Returns:

The bounding box of the Geometry, in the form ((minx, miny), (maxx, maxy)).

boundingCube()

This method returns the bounding cube of the geometry.

Return type:

tuple[tuple[float]]

Returns:

The bounding box of the Geometry, in the form ((minx, miny, minz), (maxx, maxy, maxz)).

bounds()

Returns the bounds of the geometry.

Return type:

tuple[FMEPoint]

Returns:

The min point and max point of the bounds. None is returned if the geometry contains no points.

clearMeasures()

Remove all measures from the geometry.

Return type:

None

copyAttributesFromFeature(sourceFeature, overwriteExisting, regexp, prefix)

Copies all the attributes from the given feature to traits on this geometry, if they match the (optional) regular expression.

Parameters:
  • sourceFeature (FMEFeature) – The feature to copy attributes from.

  • overwriteExisting (bool) – Existing traits will be overwritten only if overwriteExisting is True.

  • regexp (str) – (Optional) The regular expression to match the attributes against. If regexp is not specified, then all attributes will be copied.

  • prefix (str) – (Optional) The prefix is put on all the trait names as they are copied. If it is not specified, a prefix will not be added to the trait names.

Return type:

None

copyNameFromGeometry(sourceGeometry)

Copies the name of the ‘sourceGeometry’ onto this geometry. If ‘sourceGeometry’s name is blank or None, this geometry’s name will become None.

Parameters:

sourceGeometry (FMEGeometry) – The geometry to copy the name from.

Return type:

None

copyTraitsFromGeometry(sourceGeometry, overwriteExisting, regexp, prefix)

Copies all the traits from the given geometry that match the (optional) regular expression.

Parameters:
  • sourceGeometry (FMEGeometry) – The geometry to copy traits from.

  • overwriteExisting (bool) – Existing traits will be overwritten only if overwriteExisting is True.

  • regexp (str) – (Optional) The regular expression to match the traits against. If regexp is not specified, or is an empty string, then all traits will be copied.

  • prefix (str) – (Optional) The prefix is put on all the trait names as they are copied. If it is not specified, a prefix will not be added to the trait names.

Return type:

None

copyTraitsToFeature(destFeature, overwriteExisting, regexp, prefix)

Copies all the traits from this geometry to attributes on the given feature, if they match the (optional) regular expression.

Parameters:
  • destFeature (FMEFeature) – The feature to copy traits to.

  • overwriteExisting (bool) – Existing attributes will be overwritten only if overwriteExisting is True.

  • regexp (str) – (Optional) The regular expression to match the traits against. If regexp is not specified, or is an empty string, then all traits will be copied.

  • prefix (str) – (Optional) The prefix is put on all the attribute names as they are copied. If it is not specified, a prefix will not be added to the attribute names.

Return type:

None

deleteName()

Deletes the geometry’s name. If a name existed prior to this call then True is returned; otherwise False is returned.

Return type:

bool

Returns:

Returns a boolean indicating whether or not the name existed before deletion.

force2D()

Reduces the geometry to 2D.

Return type:

None

force3D(newZ)

This sets the geometry’s dimension to 3D. All Z values are set to the value passed in, even if the geometry is already 3D.

Parameters:

newZ (float) – The new Z value.

Return type:

None

getAppearanceReference()

getAppearanceReference(front),

This method returns the appearance reference within the Library associated with this aggregate. The ‘front’ parameter controls whether this query should return the front or the back appearance reference. Both can be fetched independently. If this aggregate is a regular aggregate with no geometry instance, a FMEException will be thrown.

Parameters:

front (bool) – Boolean indicting whether the appearance reference should be retrieved for the front or back of the aggregate.

Return type:

int

Returns:

The unique appearance reference for this appearance.

getArea()

Area calculation.

Return type:

float

Returns:

The calculated area.

getGeometryDefinitionReference()

This method will get the geometry definition reference associated with this aggregate, if this aggregate is a geometry instance. If this aggregate is a regular aggregate with no geometry instance, None will be returned.

Return type:

int or None

Returns:

The geometry definition reference, or None.

getGeometryInstanceLocalOrigin()

This method retrieves the local origin associated with the geometry instance, if this aggregate is a geometry instance. This method will return None if the aggregate is a regular aggregate.

Return type:

tuple[float] or None

Returns:

The local origin, formatted (ddd), or None.

getGeometryInstanceMatrix()

This method retrieves the geometry instance transformation matrix associated with the geometry instance, if this aggregate is a geometry instance. This method will return None if the aggregate either contains no such matrix or is a regular aggregate.

Return type:

list[list[float]] or None

Returns:

The geometry instance transformation matrix, formatted [[dddd][dddd][dddd]], or None.

getMeasureNames()

Retrieve the names of the measures on this geometry.

Return type:

tuple[str]

Returns:

Return a tuple storing the names of the measures on this geometry. This will return an empty tuple if there are no measures. For FMEAggregate, FMEMultiSurface, and FMECompositeSurface, this will return the union of all measure names of all of its parts.

getMultipleGeometryFlag()

This method determines if the aggregate contains a MultipleGeometry, that is, whether the aggregate is structured in a way such that each part is its own geometry separate from the other parts in the aggregate. As a result, it is possible for an aggregate of 1 part to return true since it is about the structure of the aggregate, and not the content.

Return type:

bool

Returns:

Returns True if the aggregate contains a multiple geometry and False otherwise.

getName()

This routine retrieves the ‘name’ of this geometry as a str. This will return None if it did not have a name associated with it.

Return type:

str or None

Returns:

The geometry’s name.

getPartAt()

getPartAt(index),

This method returns the geometry at the given index. None is returned if the index is out of range. For an aggregate with a transformation matrix, the transformed geometry is returned.

Parameters:

index (int) – The index of the geometry part to return.

Return type:

FMEGeometry or None

Returns:

The geometry at the given index. 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.

Raises:

FMEException – An exception is raised if an error occurred.

getPartAtInLocalCoordinates()

getPartAtInLocalCoordinates(index),

This method returns the geometry at the given index. None is returned if the index is out of range. For an aggregate with a transformation matrix, it will NOT be applied to the part.

Parameters:

index (int) – The index of the geometry part to return.

Return type:

FMEGeometry or None

Returns:

The geometry at the given index. 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.

Raises:

FMEException – An exception is raised if an error occurred.

getTrait(traitName)

Retrieves the geometry trait value of the specified trait name. Null trait values will be returned as an empty string. Binary blob traits are returned as a bytearray.

None is returned when the trait is not found on the geometry.

Parameters:

traitName (str) – The name of the geometry trait.

Return type:

bool, int, float, str, bytearray, bytes or None

Returns:

The trait value.

Raises:

FMEException – An exception is raised if there was a problem in retrieving the trait value.

getTraitNames()

Retrieve the names of the traits on this geometry.

Return type:

tuple[str]

Returns:

Return a tuple storing the names of the traits on this geometry. This will return an empty tuple if there are no traits. For all collections and containers, this will only return the names of traits on the outermost object only.

getTraitNullMissingAndType(traitName)

This method returns a tuple of a boolean, indicating if the trait is null, a boolean, indicating if the trait is missing, and an integer representing the type of the trait. The first boolean is True if ‘traitName’ maps to a null trait value on the geometry. Otherwise it is False. The second boolean is True if ‘traitName’ maps to a no value on the geometry. Otherwise it is False. If the trait is absent, FME_ATTR_UNDEFINED is returned for the type.

The possible trait types are FME_ATTR_UNDEFINED, FME_ATTR_BOOLEAN, FME_ATTR_INT8, FME_ATTR_UINT8, FME_ATTR_INT16, FME_ATTR_UINT16, FME_ATTR_INT32, FME_ATTR_UINT32, FME_ATTR_REAL32, FME_ATTR_REAL64, FME_ATTR_REAL80, FME_ATTR_STRING, FME_ATTR_ENCODED_STRING, FME_ATTR_INT64, FME_ATTR_UINT64.

Parameters:

traitName (str) – The trait’s name.

Return type:

tuple[bool, bool, int]

Returns:

A tuple of 2 boolean values the first indicating whether or not the value of the trait is null, the second indicating whether or not the trait is missing, and an integer representing the trait type.

getTraitType(traitName)

Returns the type of given trait. If the trait cannot be found, FME_ATTR_UNDEFINED will be returned.

Returns one of FME_ATTR_UNDEFINED, FME_ATTR_BOOLEAN, FME_ATTR_INT8, FME_ATTR_UINT8, FME_ATTR_INT16, FME_ATTR_UINT16, FME_ATTR_INT32, FME_ATTR_UINT32, FME_ATTR_REAL32, FME_ATTR_REAL64, FME_ATTR_REAL80, FME_ATTR_STRING, FME_ATTR_ENCODED_STRING, FME_ATTR_INT64, FME_ATTR_UINT64.

Parameters:

traitName (str) – The trait’s name.

Return type:

int

Returns:

The trait type.

getTransformationMatrix()

Gets this aggregate’s transformation matrix. If the aggregate does not have such a matrix, an identity matrix is returned. Only the top three rows of the matrix will be returned, as the bottom row is always [ 0 0 0 1 ].

Return type:

list[list[float]]

Returns:

The aggregate’s tranformation matrix, formatted [[dddd][dddd][dddd]].

hasGeometryInstance()

hasGeometryInstance(recursive),

This method returns True if this aggregate contains an instance of a geometry definition. If the parameter recursive is set to False, it will only test this aggregate itself. If ‘recursive’ is equal to True, then this method will return True if any part contained in this aggregate at any level is a geometry instance.

Parameters:

recursive (bool) – To recurse or not.

Return type:

bool

Returns:

Whether there is geometry instance.

hasMeasures()

Check if this geometry or any sub part of this geometry has measures.

Return type:

bool

Returns:

True if this geometry or any sub part of this geometry has measures, False otherwise.

hasName()

Returns whether or not the geometry has a name.

Return type:

bool

Returns:

Returns True if the geometry has a name and False otherwise.

hasTransformationMatrix()

This method determines if the aggregate has a transformation matrix or not.

Return type:

bool

Returns:

Returns True if this aggregate has a transformation matrix, and False otherwise.

is3D()

Returns whether or not the geometry is 3D.

Return type:

bool

Returns:

Returns True if the geometry is 3D and False otherwise. For FMENull, this method will always return True. For FMEAggregate, FMEMultiPoint, FMEMultiArea, FMEMultiText and FMEMultiCurve, this method will return True if any one of the sub-parts is 3D. If the collection is empty or all of its members are 2D, this method will return False.

isAMulti()

This method determines if the aggregate’s parts conform to a FMEMultiCurve, FMEMultiArea, or FMEMultiText, representation.

Return type:

bool

Returns:

This means that it will only return True if the aggregate contains:

  • Arcs, Lines, Paths, and nothing else.

  • Polygons, Ellipses, Donuts, and nothing else.

  • Text objects and nothing else.

  • Points and nothing else. This returns false for empty aggregates.

isCollection()

Check if the geometry is an aggregate or multi-part collection.

Return type:

bool

Returns:

True if the geometry is an aggregate or multi-part collection.

isSimpleAggregate()

This method determines if the aggregate is a simple aggregate. i.e. that none of its geometries are an Aggregate or Multi.

Return type:

bool

Returns:

Returns True if this aggregate is simple, and False otherwise.

measureExists(measureName)

Returns True if the specified measure exists and False otherwise. If the ‘measureName’ parameter is not specified then the default measure is checked.

Parameters:

measureName (str) – (Optional) The measure’s name.

Return type:

bool

Returns:

Boolean indicating whether or not the measure exists.

numParts()

This returns the number of geometries that make up this aggregate.

Return type:

int

Returns:

The number of geometries in aggregate.

offset()

offset(point),

Offsets the geometry by the coords specified by ‘point’. The offset will be applied to the transformation matrix associated with this aggregate. If the aggregate has no matrix, a new matrix will be created.

Parameters:

point (FMEPoint) – The point to offset the coordinates of the geometry by.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

removeLastPart()

This removes and returns the last geometry of the aggregate. If there are no geometries in the aggregate, it will return None. Calling this method will implicitly apply and clear any matrix associated with this aggregate.

Return type:

FMEGeometry or None

Returns:

The last geometry of the aggregate. 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.

Raises:

FMEException – An exception is raised if an error occurred.

removeMeasure(measureName)

Removes the measure with name ‘measureName’ if supplied, or the default measure, if there is one.

Parameters:

measureName (str) – (Optional) The name of the measure to remove.

Return type:

None

removeTraits(regexp)

This method has 4 modes:

  1. Remove all traits at the top level: regex == NULL

  2. Remove some traits at the top level: regex == <string>

  3. Remove all traits at all levels: regex == kFME_RecurseAll

  4. Remove some traits at all levels: regex == kFME_RecurseSome <string>

For example, specifying regex == NULL for a multi-surface will remove all traits at the root level of the multi-surface, whereas specifying regex == kFME_RecurseSome <string> will remove all traits from all levels of the multi surface that match <string>. If <string> is an illegal regular expression, no traits will be removed.

Return type:

None

removeTransformationMatrix()

Removes this aggregate’s transformation matrix.

Return type:

None

renameMeasure(oldMeasureName, newMeasureName)

Renames the measure specified by ‘oldMeasureName’ to the new name, specified by ‘newMeasureName’.

Parameters:
  • oldMeasureName (str) – The original name of the measure.

  • newMeasureName (str) – The new name of the measure.

Return type:

None

resolvePartDefaults()

Recursively resolves surface parts with default appearances by replacing these defaults with the inherited appearance references stored by the parent surface, if such a value exists.

The nearest non-default ancestor value will be used to set the default appearances on the part.

Instances contained within the aggregate will only be instantiated if a surface part within that instance has a default appearance and could inherit an appearance from a parent surface.

Return type:

None

rotate2D(center, angle)

The angle is CCW up from the horizontal and is measured in degrees. The rotation will be applied to the transformation matrix associated with this aggregate. If the aggregate has no matrix, a new matrix will be created.

Parameters:
  • center (FMEPoint) – The center of the aggregate’s matrix.

  • angle (float) – The angle in degrees.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

scale(xscale, yscale, zscale)

Applies a scale factor to the aggregate. The scale factor will be applied to the transformation matrix associated with this aggregate. The ‘zscale’ is ignored if geometry is 2D. If the aggregate has no matrix, a new matrix will be created.

Parameters:
  • xscale (float) – The x scale factor.

  • yscale (float) – The y scale factor.

  • zscale (float) – The z scale factor.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred.

setAppearanceReference(appearanceRef, front)

This method associates an appearance within the Library with this aggregate. This is done by passing in the unique appearance reference for this appearance. Subsequent calls to this method on the same side, will override the previous appearance used with the new appearance passed in.

An appearance reference of ‘0’ represents the default appearance. Interpretation of the default appearance is left to the consumer of this geometry. When set at this FMEAggregate level, the appearance represents the default appearance to apply when the contained surfaces use the default appearance instead of a specific appearance. Contained surfaces may be found within nested aggregates, geometry instances that reference geometries containing surfaces, or as surfaces or multi-surfaces.

The second parameter controls whether this action should take place on the front of the contained surfaces or the back. Both can be set independently. The ‘appearanceRef’ should be a valid reference to a definition stored in the FMELibrary. If the reference was not found in the library, it will still attach the reference to the instance, but will throw a FMEException. This is an unhealthy situation as it represents a ‘dangling reference’.

Parameters:
  • appearanceRef (int) – The unique appearance reference for this appearance.

  • front (bool) – Boolean indicting whether the appearance reference should be set for the front or back of the aggregate.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred or the reference was not found in the library and a dangling reference was attached.

setGeometryDefinitionReference()

setGeometryDefinitionReference(gdReference),

This method sets the geometry definition reference of this aggregate, if this aggregate is not currently a geometry instance, this call will cause the aggregate to destroy all owned parts and turn the aggregate into a geometry instance.

If ‘gdReference’ reference was not found in the library, it will still attach the reference to the instance, but will this is an unhealthy situation as it represents a ‘dangling reference’ and the user should decide to remedy this by either adding a Geometry Definition with that exact reference to the library, or else remove the reference from this geometry instance.

Parameters:

gdReference (int) – A valid geometry definition reference to a geometry definition stored in the FMELibrary.

Return type:

None

Raises:

FMEException – An exception is raised if an error occurred or the reference was not found in the library and a dangling reference was attached.

setGeometryInstanceLocalOrigin(x, y, z)

This method sets the geometry instance local origin of this aggregate. If this aggregate is not currently a geometry instance, this call will cause the aggregate to destroy all owned parts and turn the aggregate into a geometry instance. The local origin is the origin from which the geometry instance transformation matrix is applied. The default local origin is (0,0,0).

Parameters:
  • x (float) – The x point of the local origin.

  • y (float) – The y point of the local origin.

  • z (float) – The z point of the local origin.

Return type:

None

setGeometryInstanceMatrix()

setGeometryInstanceMatrix(matrix),

This method sets the geometry instance transformation matrix of this aggregate. If this aggregate is not currently a geometry instance, this call will cause the aggregate to destroy all owned parts and turn the aggregate into a geometry instance. The transformation matrix is applied to the geometry definition from the local origin to obtain the instantiated geometry.

Return type:

None

Parameters:

matrix (list[list[float]]) – The geometry instance transformation matrix, formatted [[dddd][dddd][dddd]].

setMultipleGeometryFlag()

setMultipleGeometryFlag(isMultiple),

This method sets whether the aggregate contains a MultipleGeometry, that is, whether the aggregate is structured in a way such that each part is its own geometry separate from the other parts in the aggregate.

Parameters:

isMultiple (bool) – True if the aggregate contains a MutlipleGeometry, False otherwise

Return type:

None

setName(name)

Sets the geometry’s name with a str. By supplying a blank name as input, this method will act as deleteName().

Parameters:

name (str) – The geometry’s new name.

Return type:

None

setTrait(traitName, traitValue)

Sets a geometry trait with the specified value. If the geometry trait already exists, its value and type will be changed. The following type numeric mappings are used:

PyInt ==> FME_Int32

PyFloat ==> FME_Real64

PyLong ==> FME_Int64

Binary values are to be specified as bytearray values or bytes values.

Parameters:
Return type:

None

setTraitNullWithType(traitName, traitType)

This method supplies a null trait value with a type to the geometry. If a trait with the same name already exists, it is overwritten.

Trait type must be one of FME_ATTR_UNDEFINED, FME_ATTR_BOOLEAN, FME_ATTR_INT8, FME_ATTR_UINT8, FME_ATTR_INT16, FME_ATTR_UINT16, FME_ATTR_INT32, FME_ATTR_UINT32, FME_ATTR_REAL32, FME_ATTR_REAL64, FME_ATTR_REAL80, FME_ATTR_STRING, FME_ATTR_ENCODED_STRING, FME_ATTR_INT64, FME_ATTR_UINT64.

Parameters:
  • traitName (str) – The trait’s name.

  • traitType (int) – An integer representing the trait type.

Return type:

None

setTransformationMatrix()

setTransformationMatrix(matrix),

Sets this aggregate’s transformation matrix, replacing the existing matrix if it exists. Only three rows are expected in the input array, as a bottom row of [ 0 0 0 1 ] is assumed.

Parameters:

matrix (list[list[float]]) – The transformation matrix, formatted [[dddd][dddd][dddd]].

Return type:

None