fmeobjects.FMEFeature.setGeometry

FMEFeature.setGeometry(geometry)
FMEFeature.setGeometry(geometryName, geometry) None
FMEFeature.setGeometry(geometryName, geometry, coordSys) None

This gives the geometry to the feature. If the geometry name is specified, the provided geometry, its name and optional coordinate system will be added to the feature creating a multi geometry if necessary. If no geometry name is given, any geometry the feature used to have is lost. Passing in geometry=None clears the geometries on the feature. If any geometry on the feature has a name matching the one specified, that geometry is overwritten.

Parameters:
  • geometry (FMEGeometry or None) – The geometry to set the feature to.

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

  • coordSys (str) – (Optional) The coordinate system of the named geometry. This can only be used if the geometry name is given.

Return type:

None