fmeobjects.FMECoordSysManager.defineUnit

FMECoordSysManager.defineUnit(unitName, unitParams)

Defines a unit based on the parameters passed in. The unit definition is only validated on first use. If the unit was already defined, the new definition replaces the old one and no error is returned. To find out if the unit already existed, the getUnitParms call below can be used.

Parameters:
  • unitName (str) – The name that the unit can be referred to by later in coordinate system definitions.

  • unitParams (list[str] or dict[str, str]) – A pairwise list of unit definition parameters, and their values. (i.e. entry 0 is a FME unit definition keyword, as defined in the coordinate systems section of the FME Reference Manual section 8.7.1, and entry 1 is its value. Entry 2 is the parameter name, entry 3 is its value, and so on.) There MUST be an even number of parameters.

Return type:

None

Raises:

FMEException – An FMEException is raised if there was an error.