Clarification on Precedence Between Attribute Copying and Filters

ajwad2 months ago

I'm currently configuring Traccar for a fleet management use case and have a question about how attribute copying and filters interact in terms of precedence.

I am using the following configurations:

<entry key='processing.copyAttributes.enable'>true</entry>
<entry key='processing.copyAttributes'>ignition</entry>
<entry key='filter.skipAttributes.enable'>true</entry>
<entry key='filter.skipAttributes'>ignition</entry>
<entry key='filter.duplicate'>true</entry>
<entry key='filter.invalid'>true</entry>

My goal is to:

  • Copy the ignition attribute from previous positions if it's missing in the current position.
  • Skip filters (such as filter.zeroSpeed and filter.invalid) if the ignition attribute is present in the current position.

What I'm trying to understand is the exact precedence and order of operations between attribute copying and filtering:

  1. When does the attribute copying happen? Is the ignition attribute copied to the current position before or after the filters are applied?

  2. If a position does not originally include the ignition attribute, but it is copied from a previous position, will filters like filter.zeroSpeed and filter.distance be skipped based on the copied ignition attribute?

  3. In cases where a position is marked invalid (e.g., due to filter.invalid), would the ignition attribute still be copied, or does the filter take precedence in discarding the position before any attributes are copied?

Any clarification on how these mechanisms work together would be greatly appreciated. I want to make sure that my configuration ensures that important positions (such as those with ignition events) are logged correctly without being affected by the other filters.

Thanks in advance for your help!

Anton Tananaev2 months ago

Filtering happens before attribute copying.

ajwad2 months ago

Thanks for the clarification.