Module fmeobjects :: Class FMECurve
[hide private]
[frames] | no frames]

Class FMECurve

 object --+    
          |    
FMEGeometry --+
              |
             FMECurve
Known Subclasses:

init()

FMECurve is an abstract class. It cannot be created directly.

Instance Methods [hide private]
 
__init__()
x.__init__(...) initializes x; see help(type(x)) for signature
FMELine
getAsLine()
Returns the curve as a line.
FMELine
getAsLineFixedArcSamples(numSamples)
Returns a copy of this curve as a line.
FMEPoint or None
getEndPoint()
Returns the end point of this curve.
float
getLength(threeD)
Returns the length of the curve.
FMEPoint or None
getStartPoint()
Returns the start point of this curve.
bool
isClosed(threeD)
Returns True if the start and end points have identical coordinate values.
bool
isLinear()
Returns True if and only if this curve contains only lines.
None
offset(offsetPoint)
Offsets the geometry by the coords specified by 'offsetPoint'.
None
removeDuplicates(checkZ)
Removes any adjacent duplicate points.
None
removeMeasure(measureName)
Remove the specified measure if it exists.
None
reverse()
This reverses the order of the curve's points.
None
rotate2D(center, angle)
Rotate the curve counterclockwise around the 'center' point by the specified 'angle' (in degrees).
None
scale(xScale, yScale, zScale)
Scale the feature by the given amounts.
None
setEndPoint(point)
Changes the existing end point of this curve.
None
setStartPoint(point)
Changes the existing start point of this curve.
None
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 resulting only the portion between the specified positions.
None
snipByPoints(startPoint, endPoint)
Snip off the portion between two points.

Inherited from FMEGeometry: __getObject__, __new__, boundingBox, boundingCube, bounds, clearMeasures, copyAttributesFromFeature, copyNameFromGeometry, copyTraitsFromGeometry, copyTraitsToFeature, deleteName, force2D, force3D, getArea, getMeasureNames, getName, getTrait, getTraitNames, getTraitNullMissingAndType, getTraitType, hasMeasures, hasName, is3D, isCollection, measureExists, removeTraits, renameMeasure, setName, setTrait, setTraitNullWithType

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__()
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

getAsLine()

 

Returns the curve as a line.

Returns: FMELine
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 FME_STROKE_MAX_DEVIATION 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 directive FME_ARC_DEGREES_PER_EDGE, which defaults to 5.

Parameters:
  • numSamples (int) - The number of points to approximate the arc with.
Returns: FMELine
The curve as a FMELine object.

getEndPoint()

 

Returns the end point of this curve. An error is returned and None is returned if this curve has no point to return.

Returns: FMEPoint or None
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.
Returns: float
The length of the curve.

getStartPoint()

 

Returns the start point of this curve. An error is returned and None is returned if this curve has no point to return.

Returns: FMEPoint or None
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.

isClosed(threeD)

 

Returns True if the start and end points have identical coordinate values. If 'threeD' is True, 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.
Returns: bool
True if the start and end point have identical coordinate values, False otherwise.

isLinear()

 

Returns True if and only if this curve contains only lines.

Returns: bool
True if the curve contains only lines, False otherwise.

offset(offsetPoint)

 

Offsets the geometry by the coords specified by 'offsetPoint'.

Parameters:
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

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.
Returns: 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 (string) - (Optional) The name of the measure to remove.
Returns: None
Overrides: FMEGeometry.removeMeasure

rotate2D(center, angle)

 

Rotate the curve counterclockwise around the 'center' point by the specified 'angle' (in degrees).

Parameters:
  • center (FMEPoint) - The center point of the curve.
  • angle (float) - The angle by which the curve is rotated.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

scale(xScale, yScale, zScale)

 

Scale the feature by the given amounts.

Parameters:
  • xScale (float) - The value to scale x by.
  • yScale (float) - The value to scale y by.
  • zScale (float) - (Optional) The value to scale z by: Default value = 1.0
Returns: 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.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

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.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

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 resulting only the portion between the specified positions. If the start and end positions are the same, keep two same points.

Parameters:
  • measureType (int) - The measure type to use.
  • measure3D (bool) - Whether to measure the 2D or 3D distance.
  • startLocation (float) - The start location.
  • endLocation (float) - The end location.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

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:
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.