diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-23 13:13:02 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-23 13:13:02 -0800 |
commit | 7aa3760f02361a04e2c3b73ba5b9cc41bcb8ec3d (patch) | |
tree | 8c41a9cfe79e9ce5819d6a9829af48103da59b10 /src/org/traccar/processing | |
parent | f013bfab93b4a91c49bdfb4262ce187821d80a06 (diff) | |
download | trackermap-server-7aa3760f02361a04e2c3b73ba5b9cc41bcb8ec3d.tar.gz trackermap-server-7aa3760f02361a04e2c3b73ba5b9cc41bcb8ec3d.tar.bz2 trackermap-server-7aa3760f02361a04e2c3b73ba5b9cc41bcb8ec3d.zip |
Change filtering logic (fix #4135)
Diffstat (limited to 'src/org/traccar/processing')
-rw-r--r-- | src/org/traccar/processing/FilterHandler.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/org/traccar/processing/FilterHandler.java b/src/org/traccar/processing/FilterHandler.java index df62b1e6d..eced5d253 100644 --- a/src/org/traccar/processing/FilterHandler.java +++ b/src/org/traccar/processing/FilterHandler.java @@ -149,17 +149,13 @@ public class FilterHandler extends BaseDataHandler { last = Context.getIdentityManager().getLastPosition(position.getDeviceId()); } - if (skipLimit(position, last) || skipAttributes(position)) { - return false; - } - if (filterInvalid(position)) { filterType.append("Invalid "); } if (filterZero(position)) { filterType.append("Zero "); } - if (filterDuplicate(position, last)) { + if (filterDuplicate(position, last) && !skipLimit(position, last) && !skipAttributes(position)) { filterType.append("Duplicate "); } if (filterFuture(position)) { @@ -171,10 +167,10 @@ public class FilterHandler extends BaseDataHandler { if (filterApproximate(position)) { filterType.append("Approximate "); } - if (filterStatic(position)) { + if (filterStatic(position) && !skipLimit(position, last) && !skipAttributes(position)) { filterType.append("Static "); } - if (filterDistance(position, last)) { + if (filterDistance(position, last) && !skipLimit(position, last) && !skipAttributes(position)) { filterType.append("Distance "); } if (filterMaxSpeed(position, last)) { |