fmeobjects.FMECurve

fmeobjects.FMECurve的继承图
FMECurve.boundingBox() 此方法返回的几何体的边界框。
FMECurve。boundingCube() 此方法返回的几何体的边界立方体。
FMECurve。界限() 返回几何的边界。
FMECurve.clearMeasures() 删除从几何的所有措施。
FMECurve.copyAttributesFromFeature(......) 将所有自定功能的属性特质在这个几何体,如果他们匹配(可选)的正则表达式。
FMECurve.copyNameFromGeometry(sourceGeometry) 复制“sourceGeometry”到这个几何体的名称。
FMECurve.copyTraitsFromGeometry(......) Copies all the traits from the given geometry that match the (optional) regular expression.
FMECurve.copyTraitsToFeature(destFeature,...) 将所有从这个几何体的特点,以给定的功能属性,如果匹配(可选的)正则表达式。
FMECurve.deleteName() 删除几何体的名称。
FMECurve。force2D() 降低几何体的2D。
FMECurve。force3D(newZ) This sets the geometry’s dimension to 3D.
FMECurve。getArea() 面积计算。
FMECurve.getAsLine() Returns the curve as a line.
FMECurve.getAsLineFixedArcSamples(NUMSAMPLES) 返回此曲线为一条线的副本。
FMECurve.getEndPoint() Returns the end point of this curve.
FMECurve。的getLength(threeD) 返回曲线的长度。
FMECurve.getMeasureNames() 检索这种几何形状的措施的名称。
FMECurve.getName() This routine retrieves the ‘name’ of this geometry as asix.text_type
FMECurve.getStartPoint() 返回此曲线的起点。
FMECurve.getTrait(traitName) 检索指定特征名称的几何特征值。
FMECurve.getTraitNames() 检索此几何性状的名字。
FMECurve.getTraitNullMissingAndType(traitName) 此方法返回一个布尔值的元组,指示该特征为空,一个布尔值,表示如果该性状缺失,和一个整数,表示该性状的类型。
FMECurve.getTraitType(traitName) 返回给定特质的类型。
FMECurve.hasMeasures() Check if this geometry or any sub part of this geometry has measures.
FMECurve。hasName() 返回几何是否有一个名字。
FMECurve。is3D() 几何返回是否是3D。
FMECurve.isClosed(threeD) ReturnsTrue如果起点和终点具有相同的坐标值。
FMECurve.isCollection() 检查几何聚合或多个部分组成的集合。
FMECurve.isLinear() ReturnsTrue当且仅当这条曲线仅包含线。
FMECurve。measureExists(measureName) ReturnsTrue如果指定的测量存在和除此以外。
FMECurve。抵消(offsetPoint) Offsets the geometry by the coords specified by ‘offsetPoint’.
FMECurve.removeDuplicates(checkZ) 删除任何相邻重复点。
FMECurve.removeMeasure(measureName) Remove the specified measure if it exists.
FMECurve.removeTraits(正则表达式) This method has 4 modes:
FMECurve.renameMeasure(oldMeasureName,...) Renames the measure specified by ‘oldMeasureName’ to the new name, specified by ‘newMeasureName’.
FMECurve。逆转() This reverses the order of the curve’s points.
FMECurve.rotate2D(中心,角) Rotate the curve counterclockwise around the ‘center’ point by the specified ‘angle’ (in degrees).
FMECurve.scale(xScale等,yScale,zScale) 由给定的水垢的功能。
FMECurve.setEndPoint(点) 更改此曲线的现有的终点。
FMECurve。的setName(名称) Sets the geometry’s name with asix.text_type
FMECurve.setStartPoint(点) 更改此曲线的现有起点。
FMECurve.setTrait(traitName,traitValue) Sets a geometry trait with the specified value.
FMECurve.setTraitNullWithType(traitName,...) 这种方法与一种类型的几何形状提供了一个空的性状值。
FMECurve.snip(measureType,measure3D,...) 取的开始和结束位置(无论是作为测量的2D / 3D距离,百分比或归一化距离从一开始,或顶点索引)的说明,并砍掉仅在这些位置之间的部分。
FMECurve.snipByPoints(起点,端点) 剪掉两个点之间的部分。
FMECurve

基地:fmeobjects.FMEGeometry

FME Curve Class

在里面()

FMECurveis an abstract class. It cannot be created directly.

__在里面__

Initialize self. See help(type(self)) for accurate signature.

boundingBox的

此方法返回的几何体的边界框。

Return type: 元组[元组[浮动]]
返回: 几何的边界框,在形式((风骚女子,MINY),(MAXX,MAXY))。
boundingCube

此方法返回的几何体的边界立方体。

Return type: 元组[元组[浮动]]
返回: 几何的边界框,在形式((风骚女子,MINY,minz),(MAXX,MAXY,maxz))。
界限

返回几何的边界。

Return type: 元组[FMEPoint]
返回: 该分点和边界的最大点。没有如果几何包含任何点返回。
clearMeasures

删除从几何的所有措施。

Return type: 没有
copyAttributesFromFeature sourceFeatureoverwriteExisting正则表达式字首

将所有自定功能的属性特质在这个几何体,如果他们匹配(可选)的正则表达式。

参数:
  • sourceFeatureFMEFeature) - 的feature to copy attributes from.
  • overwriteExisting布尔) - 现有的特质将被覆盖只有overwriteExisting是True
  • 正则表达式str) - (可选)的正则表达式匹配对的属性。如果没有指定正则表达式,则所有的属性都将被复制。
  • 字首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

复制“sourceGeometry”到这个几何体的名称。如果“sourceGeometry的名称为空或没有,this geometry’s name will become没有

参数: sourceGeometryFMEGeometry) - 从副本的名称几何。
Return type: 没有
copyTraitsFromGeometry sourceGeometryoverwriteExisting正则表达式字首

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

参数:
  • sourceGeometryFMEGeometry) - 几何从复制的特征。
  • overwriteExisting布尔) - 现有的特质将被覆盖只有overwriteExisting是True
  • 正则表达式str)– (Optional) The regular expression to match the traits against. If regexp is not specified, then all traits will be copied.
  • 字首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 destFeatureoverwriteExisting正则表达式字首

将所有从这个几何体的特点,以给定的功能属性,如果匹配(可选的)正则表达式。

参数:
  • destFeatureFMEFeature) - 以性状复制到该功能。
  • overwriteExisting布尔)– Existing attributes will be overwritten only if overwriteExisting isTrue
  • 正则表达式str)– (Optional) The regular expression to match the traits against. If regexp is not specified, then all traits will be copied.
  • 字首str) - (因为它们被复制可选)前缀放在所有属性名称。如果没有指定,则前缀不会被添加到属性名称。
Return type:

没有

deleteName

删除几何体的名称。如果名称在此之前调用存在再True返回;除此以外返回。

Return type: 布尔
返回: 返回布尔值,指示名称是否不删除之前存在。
force2D

降低几何体的2D。

Return type: 没有
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.

参数: newZ浮动) - 新的Z值。
Return type: 没有
getArea

面积计算。

Return type: 浮动
返回: 计算面积。
getAsLine

Returns the curve as a line.

Return type: FMELine
返回: The curve as aFMELineobject.
getAsLineFixedArcSamples numSamples

返回此曲线为一条线的副本。所有弧近似用“NUMSAMPLES”给出的点数。如果“NUMSAMPLES”为0时,点数将首先通过的值确定kFMEStrokeMaxDeviationValuedirective 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.

参数: numSamplesINT) - 点的数量近似与圆弧。
Return type: FMELine
返回: The curve as aFMELineobject.
getEndPoint

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

Return type: FMEPointor没有
返回: 曲线的终点,或没有如果没有点返回。
举: FMEException- 如果发生错误,将引发异常。
的getLength threeD

返回曲线的长度。如果“threeD”是True,这将返回该曲线的三维长度,否则这将返回2D长度。

参数: threeD布尔) - 是否计算2D或3D的长度。
Return type: 浮动
返回: 该曲线的长度。
getMeasureNames

检索这种几何形状的措施的名称。

Return type: 元组[]
返回: 返回一个元组存储在这个几何措施的名称。如果没有这样的措施会返回一个空的元组。对于FMEAggregateFMEMultiSurface,andFMECompositeSurface,这将返回所有部分的所有措施名字的结合。
的getName

This routine retrieves the ‘name’ of this geometry as asix.text_type。这将返回没有如果它没有与它相关联的名称。

Return type: six.text_type or没有
返回: 几何的名字。
getStartPoint

返回此曲线的起点。返回一个错误,并且没有is returned if this curve has no point to return.

Return type: FMEPointor没有
返回: 曲线的起点,或没有如果没有点返回。
举: FMEException- 如果发生错误,将引发异常。
getTrait traitName

检索指定特征名称的几何特征值。对于Python 2.7,字符串返回为两个可能的类型中的一种 - 系统编码的字符串或Unicode字符串,如果源性状编码。空性状值将返回一个空字符串。二进制BLOB性状返回的ByteArray。

没有当几何找不到性状返回。

参数: traitNamestr) - 几何特征的名称。
Return type: 布尔INT, 长,浮动,six.string_types,字节组bytesor没有
返回: 性状值。
举: FMEException- 如果在检索特征值问题的异常。
getTraitNames

检索此几何性状的名字。

Return type: 元组[str]
返回: 返回一个元组存储在这个几何性状的名字。如果没有特点,这将返回一个空的元组。对于所有的收藏品和容器,这样只会返回只有最外层的对象特征的名称。
getTraitNullMissingAndType traitName

此方法返回一个布尔值的元组,指示该特征为空,一个布尔值,表示如果该性状缺失,和一个整数,表示该性状的类型。第一个布尔值True如果“traitName”映射到几何空特征值。否则,它是。第二个是布尔True如果“traitName”映射到的几何没有价值。否则,它是。如果性状不存在,FME_ATTR_UNDEFINED返回的类型。

可能的特质类型FME_ATTR_UNDEFINEDFME_ATTR_BOOLEANFME_ATTR_INT8FME_ATTR_UINT8FME_ATTR_INT16FME_ATTR_UINT16FME_ATTR_INT32FME_ATTR_UINT32FME_ATTR_REAL32FME_ATTR_REAL64FME_ATTR_REAL80FME_ATTR_STRINGFME_ATTR_ENCODED_STRINGFME_ATTR_INT64FME_ATTR_UINT64

参数: traitNamestr) - 这种特点的名字。
Return type: 元组[布尔布尔INT]
返回: 2个布尔值的元组的第一指示性状值是否为空,表示该性状是否缺少第二,和一个整数,表示该性状类型。
getTraitType traitName

返回给定特质的类型。If the trait cannot be found,FME_ATTR_UNDEFINEDwill be returned.

返回一个FME_ATTR_UNDEFINEDFME_ATTR_BOOLEANFME_ATTR_INT8FME_ATTR_UINT8FME_ATTR_INT16FME_ATTR_UINT16FME_ATTR_INT32FME_ATTR_UINT32FME_ATTR_REAL32FME_ATTR_REAL64FME_ATTR_REAL80FME_ATTR_STRINGFME_ATTR_ENCODED_STRINGFME_ATTR_INT64FME_ATTR_UINT64

参数: traitNamestr) - 这种特点的名字。
Return type: INT
返回: 性状类型。
hasMeasures

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

Return type: 布尔
返回: True如果这种几何形状的这种几何形状或副部有措施,除此以外。
hasName

返回几何是否有一个名字。

Return type: 布尔
返回: ReturnsTrueif the geometry has a name and除此以外。
is3D

几何返回是否是3D。

Return type: 布尔
返回: ReturnsTrue如果几何体3D和除此以外。对于FMENull,this method will always returnTrue。对于FMEAggregateFMEMultiPointFMEMultiAreaFMEMultiTextandFMEMultiCurve,此方法将返回True如果子部件中的任一个是3D。如果集合为空,或者它的所有成员都是2D,此方法将返回
已关闭 threeD

ReturnsTrue如果起点和终点具有相同的坐标值。如果“threeD”是True,the z coordinate of the start and end points will be compared. This does not take measures into consideration.

参数: threeD布尔) - 是否比较的Z坐标值。
Return type: 布尔
返回: True如果起点和终点具有相同的坐标值,除此以外。
isCollection

检查几何聚合或多个部分组成的集合。

Return type: 布尔
返回: True如果几何体聚合或多个部分组成的集合。
isLinear

ReturnsTrue当且仅当这条曲线仅包含线。

Return type: 布尔
返回: Trueif the curve contains only lines,除此以外。
measureExists measureName

ReturnsTrue如果指定的测量存在和除此以外。If the ‘measureName’ parameter is not specified then the default measure is checked.

参数: measureNamestr) - (可选)衡量的名字。
Return type: 布尔
返回: 布尔值,表示该措施是否存在。
抵消 offsetPoint

Offsets the geometry by the coords specified by ‘offsetPoint’.

参数: offsetPointFMEPoint) - 的FMEPointto offset the curve by.
Return type: 没有
举: FMEException- 如果发生错误,将引发异常。
removeDuplicates checkZ

删除任何相邻重复点。如果“checkZ”是True,X,Y和Z坐标检查,否则只x和y。

参数: checkZ布尔) - 是否检查z坐标。
Return type: 没有
removeMeasure measureName

Remove the specified measure if it exists. If the measure name, is not provided remove the default measure, if there is one.

参数: measureNamestr) - (可选)删除措施的名称。
Return type: 没有
removeTraits 正则表达式

This method has 4 modes:

  1. 在顶层删除所有特质:正则表达式== NULL
  2. 在顶层除去一些性状:正则表达式== <字符串>
  3. 各级删除所有特质:正则表达式==kFME_RecurseAll
  4. 各级删除一些特质:正则表达式==kFME_RecurseSome

例如,指定正则表达式== NULL用于多面将在多表面​​的根级别除去所有特征,而指定正则表达式==kFME_RecurseSome<字符串>将删除所有从所有级别的特征the multi surface that match . If is an illegal regular expression, no traits will be removed.

Return type: 没有
renameMeasure oldMeasureNamenewMeasureName

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

参数:
  • oldMeasureNamestr) - 的original name of the measure.
  • newMeasureNamestr) - 的new name of the measure.
Return type:

没有

逆转

This reverses the order of the curve’s points.

Return type: 没有
rotate2D 中央angle

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

参数:
  • 中央FMEPoint) - 的中央点of the curve.
  • angle浮动) - ,通过该曲线被旋转的角度。
Return type:

没有

举:

FMEException- 如果发生错误,将引发异常。

规模 xScaleyScalezScale

由给定的水垢的功能。

参数:
  • xScale浮动) - 的value to scale x by.
  • yScale浮动) - 通过该值来缩放Y。
  • zScale浮动) - (可选)的值由规模ž。(默认值是1.0)
Return type:

没有

举:

FMEException- 如果发生错误,将引发异常。

对setEndpoint

更改此曲线的现有的终点。如果在曲线上没有点,这个方法不起作用。

参数: FMEPoint) - 在曲线的末端的点集。
Return type: 没有
举: FMEException- 如果发生错误,将引发异常。
的setName 名称

Sets the geometry’s name with asix.text_type。通过提供一个空白的名称作为输入,这种方法会起作用deleteName()

参数: 名称six.text_type) - 几何的新名称。
Return type: 没有
setStartPoint

更改此曲线的现有起点。如果在曲线上没有点,这个方法不起作用。

参数: FMEPoint) - 在曲线开始时的点集。
Return type: 没有
举: FMEException- 如果发生错误,将引发异常。
setTrait traitNametraitValue

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

对于Python 2.7,字符串可以被输入为两种可能类型之一:系统编码的字符串或Unicode字符串。二进制值将被指定为字节组的值或为Python 3和作为用于Python 2.7字节组值字节的值。

参数:
Return type:

没有

setTraitNullWithType traitNametraitType

这种方法与一种类型的几何形状提供了一个空的性状值。If a trait with the same name already exists, it is overwritten.

特质类型必须是一个FME_ATTR_UNDEFINEDFME_ATTR_BOOLEANFME_ATTR_INT8FME_ATTR_UINT8FME_ATTR_INT16FME_ATTR_UINT16FME_ATTR_INT32FME_ATTR_UINT32FME_ATTR_REAL32FME_ATTR_REAL64FME_ATTR_REAL80FME_ATTR_STRINGFME_ATTR_ENCODED_STRINGFME_ATTR_INT64FME_ATTR_UINT64

参数:
  • traitNamestr) - 这种特点的名字。
  • traitTypeINT) - 一个整数,表示该性状类型。
Return type:

没有

SNIP measureTypemeasure3DstartLocationEndLocation所

取的开始和结束位置(无论是作为测量的2D / 3D距离,百分比或归一化距离从一开始,或顶点索引)的说明,并砍掉仅在这些位置之间的部分。If the start and end positions are the same, keep two same points.

参数:
Return type:

没有

举:

FMEException- 如果发生错误,将引发异常。

snipByPoints 起点端点

剪掉两个点之间的部分。如果这些点并不在这条线上,取代,后者正是上线最近点。如果起点和终点是一样的,保持两个相同点。

参数:
Return type:

没有

举:

FMEException- 如果发生错误,将引发异常。