fmeobjects.FMEArc¶

FMEArc.bisectArc () |
Returns an equivalent path consisting of two smaller arcs. |
FMEArc.boundingBox () |
This method returns the bounding box of the geometry. |
FMEArc.boundingCube () |
This method returns the bounding cube of the geometry. |
FMEArc.bounds () |
Returns the bounds of the geometry. |
FMEArc.clearMeasures () |
Remove all measures from the geometry. |
FMEArc.convertToArcBy3Points () |
Converts to an arc by 3 points. |
FMEArc.convertToArcByBulge () |
Converts to an arc by bulge. |
FMEArc.convertToArcByCenterPoint () |
Converts to an arc by center point. |
FMEArc.copyAttributesFromFeature (…) |
Copies all the attributes from the given feature to traits on this geometry, if they match the (optional) regular expression. |
FMEArc.copyNameFromGeometry (sourceGeometry) |
Copies the name of the ‘sourceGeometry’ onto this geometry. |
FMEArc.copyTraitsFromGeometry (…) |
Copies all the traits from the given geometry that match the (optional) regular expression. |
FMEArc.copyTraitsToFeature (destFeature, …) |
Copies all the traits from this geometry to attributes on the given feature, if they match the (optional) regular expression. |
FMEArc.deleteName () |
Deletes the geometry’s name. |
FMEArc.force2D () |
Reduces the geometry to 2D. |
FMEArc.force3D (newZ) |
This sets the geometry’s dimension to 3D. |
FMEArc.getArea () |
Area calculation. |
FMEArc.getAsLine () |
Returns the curve as a line. |
FMEArc.getAsLineFixedArcSamples (numSamples) |
Returns a copy of this curve as a line. |
FMEArc.getBulge () |
Returns the bulge value. |
FMEArc.getCenterPoint () |
Returns the center point of the arc. |
FMEArc.getEndPoint () |
Returns the end point of this curve. |
FMEArc.getLength (threeD) |
Returns the length of the curve. |
FMEArc.getMeasureNames () |
Retrieve the names of the measures on this geometry. |
FMEArc.getMeasureValues (as3Points, measureName) |
Return the values of the measure named by ‘measureName’, otherwise returns the values of the defaut measure. |
FMEArc.getMidPoint () |
Returns mid point, which will be interpolated halfway along the arc if the underlying storage is not by 3 points. |
FMEArc.getName () |
This routine retrieves the ‘name’ of this geometry as a six.text_type . |
FMEArc.getPrimaryRadius () |
Returns the primary radius of the arc. |
FMEArc.getPropertiesAs3Points () |
Returns the arc geometry as a tuple of three points. |
FMEArc.getPropertiesAsBulge () |
Returns the arc geometry as a tuple of two points and a bulge value. |
FMEArc.getPropertiesAsCentered |
getPropertiesAsCentered(withEnds), |
FMEArc.getRotation () |
Returns the rotation of the arc. |
FMEArc.getSecondaryRadius () |
Returns the secondary radius of the arc. |
FMEArc.getStartAngle () |
All angles are CCW up from the horizontal. |
FMEArc.getStartPoint () |
Returns the start point of this curve. |
FMEArc.getSweepAngle () |
All angles are CCW up from the horizontal. |
FMEArc.getTrait (traitName) |
Retrieves the geometry trait value of the specified trait name. |
FMEArc.getTraitNames () |
Retrieve the names of the traits on this geometry. |
FMEArc.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. |
FMEArc.getTraitType (traitName) |
Returns the type of given trait. |
FMEArc.hasExplicitEndpoints () |
This returns True if the arc’s end points have been explicitly set, and False otherwise. |
FMEArc.hasMeasures () |
Check if this geometry or any sub part of this geometry has measures. |
FMEArc.hasName () |
Returns whether or not the geometry has a name. |
FMEArc.is3D () |
Returns whether or not the geometry is 3D. |
FMEArc.isCW () |
This returns True if the arc is clockwise, or False otherwise. |
FMEArc.isCircular () |
This returns True if the arc’s primary and secondary radii are the same length, and False otherwise. |
FMEArc.isClosed (threeD) |
Returns True if the start and end points have identical coordinate values. |
FMEArc.isCollection () |
Check if the geometry is an aggregate or multi-part collection. |
FMEArc.isLinear () |
Returns True if and only if this curve contains only lines. |
FMEArc.measureExists (measureName) |
Returns True if the specified measure exists and False otherwise. |
FMEArc.offset (offsetPoint) |
Offsets the geometry by the coords specified by ‘offsetPoint’. |
FMEArc.optimalArcTypeRetrieval () |
Returns the arc type (FME_ARC_BY_CENTER_POINT , FME_ARC_BY_CENTER_POINT_START_END , FME_ARC_BY_BULGE , or FME_ARC_BY_3_POINTS ) whose parameters that define the arc can be retrieved most efficiently and accurately. |
FMEArc.removeDuplicates (checkZ) |
Removes any adjacent duplicate points. |
FMEArc.removeMeasure (measureName) |
Remove the specified measure if it exists. |
FMEArc.removeTraits (regexp) |
This method has 4 modes: |
FMEArc.renameMeasure (oldMeasureName, …) |
Renames the measure specified by ‘oldMeasureName’ to the new name, specified by ‘newMeasureName’. |
FMEArc.reverse () |
This reverses the order of the curve’s points. |
FMEArc.rotate2D (center, angle) |
Rotate the curve counterclockwise around the ‘center’ point by the specified ‘angle’ (in degrees). |
FMEArc.scale (xScale, yScale, zScale) |
Scale the feature by the given amounts. |
FMEArc.setCenterPoint |
setCenterPoint(centerPoint), |
FMEArc.setEndPoint (point) |
Changes the existing end point of this curve. |
FMEArc.setMeasureValues (as3Points, measureTuple) |
This assigns the values given in the tuple ‘measureTuple’ to the default measure, or the measure named by ‘measureName’ if given. |
FMEArc.setMidPoint |
setMidPoint(midPoint), |
FMEArc.setName (name) |
Sets the geometry’s name with a six.text_type . |
FMEArc.setPrimaryRadius |
setPrimaryRadius(primaryRadius), |
FMEArc.setRotation |
setRotation(rotation), |
FMEArc.setSecondaryRadius |
setSecondaryRadius(secondaryRadius), |
FMEArc.setStartAngle |
setStartAngle(startAngle), |
FMEArc.setStartPoint (point) |
Changes the existing start point of this curve. |
FMEArc.setSweepAngle |
setSweepAngle(sweepAngle), |
FMEArc.setTrait (traitName, traitValue) |
Sets a geometry trait with the specified value. |
FMEArc.setTraitNullWithType (traitName, traitType) |
This method supplies a null trait value with a type to the geometry. |
FMEArc.snip (measureType, measure3D, …) |
Take a description of start and end positions (either as a measured 2D/3D distance, percentage, or normalized distance from the beginning, or a vertex index), and chop off only the portion between these positions. |
FMEArc.snipByPoints (startPoint, endPoint) |
Snip off the portion between two points. |
-
class
FMEArc
¶ Bases:
fmeobjects.FMESegment
FME Arc Class
Create an instance of an Arc geometry object.
init(threePoints)
Creates an arc using the 3 points contained in the tuple. If ‘startPoint’ and ‘endPoint’ (threePoints[0] and threePoints[2]) and are equal, then the arc will be coincident with the circle whose center point is midway between startPoint and midpoint (threePoints[0] and threePoints[1]).
Parameters: threePoints (tuple[FMEPoint]) – The tuple containing 3 points to create the arc in the form (startPoint, midPoint, endPoint). Return type: FMEArc Returns: An instance of an Arc Geometry object. init(twoPoints, bulge)
Creates an arc using the 2 points contained in the tuple, and the supplied ‘bulge’ value. All angles are CCW up from the horizontal, and are measured in degrees.
Parameters: Return type: Returns: An instance of an Arc Geometry object.
init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle)
Creates an arc using the center point supplied, along with the supplied radii and angles. Measures on the center point will be ignored. All angles are CCW up from the horizontal, and are measured in degrees.
Parameters: - centerPoint (FMEPoint) – The centerPoint of the arc.
- rotation (float) – The rotation of the arc.
- primaryRadius (float) – The primary radius of the arc.
- secondaryRadius (float) – The secondary radius of the arc.
- startAngle (float) – The start angle of the arc.
- sweepAngle (float) – The sweep angle of the arc.
Return type: Returns: An instance of an Arc Geometry object.
init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)
Creates an arc using the center point supplied, along with the supplied radii, angles, and points. All angles are CCW up from the horizontal, and are measured in degrees.
Parameters: - centerPoint (FMEPoint) – The centerPoint of the arc.
- rotation (float) – The rotation of the arc.
- primaryRadius (float) – The primary radius of the arc.
- secondaryRadius (float) – The secondary radius of the arc.
- startAngle (float) – The start angle of the arc.
- sweepAngle (float) – The sweep angle of the arc.
- startPoint (FMEPoint) – (Optional) The start point of the arc.
- endPoint (FMEPoint) – (Optional) The end point of the arc.
Return type: Returns: An instance of an Arc Geometry object.
init(twoPoints, radius, counterClockwise)
Creates an arc using the 2 points contained in the tuple, and the supplied ‘radius’ and points. startPoint and endPoint (twoPoints[0] and twoPoints[1]) must not be
None
.Parameters: Return type: Returns: An instance of an Arc Geometry object.
init(arc)
Create a copy of the passed in Arc geometry object.
Parameters: arc (FMEArc) – The Arc geometry object to create a copy of. Return type: FMEArc Returns: An instance of an Arc Geometry object. -
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
bisectArc
()¶ Returns an equivalent path consisting of two smaller arcs. These two arcs do not necessarily have equal length.
Return type: FMEPath Returns: An equivalent path consisting of two smaller arcs.
-
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.
-
convertToArcBy3Points
()¶ Converts to an arc by 3 points. If the arc is not circular (
isCircular()
returnsFalse
), then the arc cannot be converted to arc by 3 points, and an error is returned.Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
convertToArcByBulge
()¶ Converts to an arc by bulge. If the arc is not circular (
isCircular()
returnsFalse
), then the arc cannot be converted to arc by bulge, and an error is returned.Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
convertToArcByCenterPoint
()¶ Converts to an arc by center point. If the arc cannot be converted, then an error is returned.
Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
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:
-
copyNameFromGeometry
(sourceGeometry)¶ Copies the name of the ‘sourceGeometry’ onto this geometry. If ‘sourceGeometry’s name is blank or
None
, this geometry’s name will becomeNone
.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, 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:
-
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, 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:
-
deleteName
()¶ Deletes the geometry’s name. If a name existed prior to this call then
True
is returned; otherwiseFalse
is returned.Return type: bool Returns: Returns a boolean indicating whether or not the name existed before deletion.
-
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
-
getAsLine
()¶ Returns the curve as a line.
Return type: FMELine Returns: The curve as a FMELine
object.
-
getAsLineFixedArcSamples
(numSamples)¶ Returns a copy of this curve as a line. All arcs are approximated with the number of points given by ‘numSamples’. If ‘numSamples’ is 0, the number points will first be determined by the value of
kFMEStrokeMaxDeviationValue
directive in mapping file, which denotes the maximum deviation of the arc from the line. In the absence of this directive or the value of this directive is smaller than or equal to 0, the number points will be determined by the arc’s sweep angle and the value of the mapping file directivekFMEDegreesPerEdge
, which defaults to 5.Parameters: numSamples (int) – The number of points to approximate the arc with. Return type: FMELine Returns: The curve as a FMELine
object.
-
getBulge
()¶ Returns the bulge value. An error is returned if an error occurs.
Return type: float Returns: The bulge value of the arc. Raises: FMEException – An exception is raised if an error occurred.
-
getCenterPoint
()¶ Returns the center point of the arc. An error is returned if an error occurs.
Return type: FMEPoint Returns: The center point of the arc. Raises: FMEException – An exception is raised if an error occurred.
-
getEndPoint
()¶ Returns the end point of this curve. An error is returned and
None
is returned if this curve has no point to return.Return type: FMEPoint or None Returns: The end point of the curve, or None
if there is no point to return.Raises: FMEException – An exception is raised if an error occurred.
-
getLength
(threeD)¶ Returns the length of the curve. If ‘threeD’ is
True
, this returns the 3D length of the curve, otherwise this returns the 2D length.Parameters: threeD (bool) – Whether to calculate the 2D or 3D length. Return type: float Returns: The length of the curve.
-
getMeasureNames
()¶ Retrieve the names of the measures on this geometry.
Return type: tuple[string] 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
, andFMECompositeSurface
, this will return the union of all measure names of all of its parts.
-
getMeasureValues
(as3Points, measureName)¶ Return the values of the measure named by ‘measureName’, otherwise returns the values of the defaut measure. Returns an error if the measure does not exist. If ‘as3Points’ is
True
, then the values of the measure are returned as 3 points.Parameters: Return type: Returns: The measure values of the arc.
Raises: FMEException – An exception is raised if an error occurred.
-
getMidPoint
()¶ Returns mid point, which will be interpolated halfway along the arc if the underlying storage is not by 3 points. If an arc is elliptical, an error is returned.
Return type: FMEPoint Returns: The mid point of the arc. Raises: FMEException – An exception is raised if an error occurred.
-
getName
()¶ This routine retrieves the ‘name’ of this geometry as a
six.text_type
. This will returnNone
if it did not have a name associated with it.Return type: six.text_type or None Returns: The geometry’s name.
-
getPrimaryRadius
()¶ Returns the primary radius of the arc.
Return type: float Returns: The primary radius of the arc.
-
getPropertiesAs3Points
()¶ Returns the arc geometry as a tuple of three points. If the arc is elliptical, an error is returned.
The structure of the tuple returned is as follows: (startPoint, midPoint, endPoint).
Return type: tuple[FMEPoint] Returns: The arc geometry as three points. Raises: FMEException – An exception is raised if an error occurred.
-
getPropertiesAsBulge
()¶ Returns the arc geometry as a tuple of two points and a bulge value. If the arc is elliptical, an error is returned.
The structure of the tuple returned is as follows: (startPoint, midPoint, bulge).
Return type: tuple[FMEPoint, FMEPoint, float] Returns: The arc geometry as two points and a bulge value. Raises: FMEException – An exception is raised if an error occurred.
-
getPropertiesAsCentered
()¶ getPropertiesAsCentered(withEnds),
Returns the arc properties. If ‘withEnds’ is
True
, the end points will be computed and returned. Note that measures are only stored on the end points. All angles are CCW up from the horizontal, and rotation is measured in degrees. Also, ‘startAngle’ and ‘sweepAngle’ aren’t angles. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of ‘startAngle’.The structure of the tuple returned if ‘withEnds’ is
True
is as follows: (centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint).The structure of the tuple returned if ‘withEnds’ is
False
is as follows: (centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle).Return type: tuple[FMEPoint, float, float, float, float, float, FMEPoint, FMEPoint] or tuple[FMEPoint, float, float, float, float, float] Returns: The arc geometry as a centered point definition.
-
getRotation
()¶ Returns the rotation of the arc. All angles are CCW up from the horizontal, and are measured in degrees.
Return type: float Returns: The rotation of the arc.
-
getSecondaryRadius
()¶ Returns the secondary radius of the arc.
Return type: float Returns: The secondary radius of the arc.
-
getStartAngle
()¶ All angles are CCW up from the horizontal. Note: ‘startAngle’ is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of startAngle.
Return type: float Returns: The start angle of the arc.
-
getStartPoint
()¶ Returns the start point of this curve. An error is returned and
None
is returned if this curve has no point to return.Return type: FMEPoint or None Returns: The start point of the curve, or None
if there is no point to return.Raises: FMEException – An exception is raised if an error occurred.
-
getSweepAngle
()¶ All angles are CCW up from the horizontal. Note: ‘sweepAngle’ is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of sweepAngle.
Return type: float Returns: The sweep angle of the arc.
-
getTrait
(traitName)¶ Retrieves the geometry trait value of the specified trait name. For Python 2.7, strings are returned as one of two possible types - system encoded strings or unicode strings, if the source trait was encoded. 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, long, float, six.string_types, 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 isFalse
. The second boolean isTrue
if ‘traitName’ maps to a no value on the geometry. Otherwise it isFalse
. 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.
-
hasExplicitEndpoints
()¶ This returns
True
if the arc’s end points have been explicitly set, andFalse
otherwise.getPropertiesAsCentered()
method can calculate the end points if none have been specified by setting the ‘withEnds’ parameter toTrue
. If this is not desired,hasExplicitEndpoints
can be called first to determine whether the ‘withEnds’ parameter should be set toTrue
orFalse
.Return type: bool Returns: True
if the arc has explicit end points,False
otherwise.
-
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 andFalse
otherwise.
-
is3D
()¶ Returns whether or not the geometry is 3D.
Return type: bool Returns: Returns True
if the geometry is 3D andFalse
otherwise. ForFMENull
, this method will always returnTrue
. ForFMEAggregate
,FMEMultiPoint
,FMEMultiArea
,FMEMultiText
andFMEMultiCurve
, this method will returnTrue
if any one of the sub-parts is 3D. If the collection is empty or all of its members are 2D, this method will returnFalse
.
-
isCW
()¶ This returns
True
if the arc is clockwise, orFalse
otherwise.Return type: bool Returns: True
if the arc is clockwise,False
otherwise.
-
isCircular
()¶ This returns
True
if the arc’s primary and secondary radii are the same length, andFalse
otherwise.Return type: bool Returns: True
if the arc is circular,False
otherwise.
-
isClosed
(threeD)¶ Returns
True
if the start and end points have identical coordinate values. If ‘threeD’ isTrue
, the z coordinate of the start and end points will be compared. This does not take measures into consideration.Parameters: threeD (bool) – Whether to compare the z coordinate value. Return type: bool Returns: True
if the start and end point have identical coordinate values,False
otherwise.
-
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.
-
isLinear
()¶ Returns
True
if and only if this curve contains only lines.Return type: bool Returns: True
if the curve contains only lines,False
otherwise.
-
measureExists
(measureName)¶ Returns
True
if the specified measure exists andFalse
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.
-
offset
(offsetPoint)¶ Offsets the geometry by the coords specified by ‘offsetPoint’.
Parameters: offsetPoint (FMEPoint) – The FMEPoint
to offset the curve by.Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
optimalArcTypeRetrieval
()¶ Returns the arc type (
FME_ARC_BY_CENTER_POINT
,FME_ARC_BY_CENTER_POINT_START_END
,FME_ARC_BY_BULGE
, orFME_ARC_BY_3_POINTS
) whose parameters that define the arc can be retrieved most efficiently and accurately.Return type: int Returns: The arc type.
-
removeDuplicates
(checkZ)¶ Removes any adjacent duplicate points. If ‘checkZ’ is
True
, x, y, and z coordinates are checked, otherwise only x and y are.Parameters: checkZ (bool) – Whether to check the z coordinate. Return type: None
-
removeMeasure
(measureName)¶ Remove the specified measure if it exists. If the measure name, is not provided remove 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:
- Remove all traits at the top level: regex == NULL
- Remove some traits at the top level: regex == <string>
- Remove all traits at all levels: regex ==
kFME_RecurseAll
- 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
-
renameMeasure
(oldMeasureName, newMeasureName)¶ Renames the measure specified by ‘oldMeasureName’ to the new name, specified by ‘newMeasureName’.
Parameters: Return type:
-
rotate2D
(center, angle)¶ Rotate the curve counterclockwise around the ‘center’ point by the specified ‘angle’ (in degrees).
Parameters: Return type: Raises: FMEException – An exception is raised if an error occurred.
-
scale
(xScale, yScale, zScale)¶ Scale the feature by the given amounts.
Parameters: Return type: Raises: FMEException – An exception is raised if an error occurred.
-
setCenterPoint
()¶ setCenterPoint(centerPoint),
Sets the center point of the arc. The arc is converted to an arc by center point as a result of this method.
Parameters: centerPoint (FMEPoint) – The center point to set on the arc. Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
setEndPoint
(point)¶ Changes the existing end point of this curve. If there are no points on the curve, this method does nothing.
Parameters: point (FMEPoint) – The point to set at the end of the curve. Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
setMeasureValues
(as3Points, measureTuple)¶ This assigns the values given in the tuple ‘measureTuple’ to the default measure, or the measure named by ‘measureName’ if given. This creates the measure if it doesn’t already exist.
If ‘as3Points’ is
True
, the measure will be set as three points, hence if ‘measureTuple’ does not contain threeFMEPoint
objects, an error is returned. If the underlying arc is not stored by 3 points, the “midPoint” value of the tuple (i.e. measureTuple[1]), will be ignored.Parameters: Return type:
-
setMidPoint
()¶ setMidPoint(midPoint),
Sets the midpoint of the arc. It only sets the midpoint if the arc can be successfully converted to an arc by mid point.
Parameters: midPoint (FMEPoint) – The midpoint to set on the arc. Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
setName
(name)¶ Sets the geometry’s name with a
six.text_type
. By supplying a blank name as input, this method will act asdeleteName()
.Parameters: name (six.text_type) – The geometry’s new name. Return type: None
-
setPrimaryRadius
()¶ setPrimaryRadius(primaryRadius),
Sets the primary radius of the arc. The arc is converted to an arc by center point before setting the primary radius.
Parameters: primaryRadius (float) – The primary radius to set on the arc. Return type: None
-
setRotation
()¶ setRotation(rotation),
Sets the rotation of the arc. The arc is converted to an arc by center point before setting the rotation.
Parameters: rotation (float) – The rotation to set on the arc. Return type: None
-
setSecondaryRadius
()¶ setSecondaryRadius(secondaryRadius),
Sets the secondary radius of the arc. The arc is converted to an arc by center point before setting the secondary radius.
Parameters: secondaryRadius (float) – The primary radius to set on the arc. Return type: None
-
setStartAngle
()¶ setStartAngle(startAngle),
Sets the start angle of the arc, measured counter-clockwise up from the horizontal. Note: ‘startAngle’ is a t angle. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of ‘startAngle’.
Parameters: startAngle (float) – The start angle to set on the arc. Return type: None
-
setStartPoint
(point)¶ Changes the existing start point of this curve. If there are no points on the curve, this method does nothing.
Parameters: point (FMEPoint) – The point to set at the start of the curve. Return type: None Raises: FMEException – An exception is raised if an error occurred.
-
setSweepAngle
()¶ setSweepAngle(sweepAngle),
Sets the sweep angle of the arc, measured counter-clockwise up from the horizontal. Note: ‘sweepAngle’ is a t angle. The arc is first converted to an arc by center point before the ‘sweepAngle’ is set. Refer to the @Arc (function) in the FME Functions and Factories manual for a detailed definition of ‘sweepAngle’.
Parameters: sweepAngle (float) – The sweep angle to set on the arc. 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
For Python 2.7, strings can be input as one of two possible types: system encoded strings or unicode strings. Binary values are to be specified as bytearray values or bytes values for Python 3 and as bytearray values for Python 2.7.
Parameters: Return type:
-
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: Return type:
-
snip
(measureType, measure3D, startLocation, endLocation)¶ Take a description of start and end positions (either as a measured 2D/3D distance, percentage, or normalized distance from the beginning, or a vertex index), and chop off only the portion between these positions. If the start and end positions are the same, keep two same points.
Parameters: - measureType (int) – The measure type to use. Must be on of:
SNIP_DISTANCE
,SNIP_PERCENTAGE
,SNIP_VERTEX
orSNIP_POINT
. - measure3D (bool) – Whether to measure the 2D or 3D distance.
- startLocation (float) – The start location.
- endLocation (float) – The end location.
Return type: Raises: FMEException – An exception is raised if an error occurred.
- measureType (int) – The measure type to use. Must be on of:
-
snipByPoints
(startPoint, endPoint)¶ Snip off the portion between two points. If these points are not on this line, replaced with nearest points which are exactly on the line. If the start and end point are the same, keep two same points.
Parameters: Return type: Raises: FMEException – An exception is raised if an error occurred.