com.supermap.data
Class PathSmoothTool
- java.lang.Object
-
- com.supermap.data.PathSmoothTool
-
public class PathSmoothTool extends java.lang.ObjectTrace optimization tool classUsages:
PathSmoothTool pathSmoothTool = new PathSmoothTool(); pathSmoothTool.setIntensity(2); //Sets the filtering intensity. 3 is by default List outList = pathSmoothTool.pathOptimize(sourcePositionList);
-
-
Constructor Summary
Constructors Constructor and Description PathSmoothTool()construction
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static floatcalculateLineDistance(Point2D var0, Point2D var1)calculate distanceintgetIntensity()get filter strengthfloatgetThreshhold()get filter thresholdjava.util.List<Point2D>kalmanFilterPath(java.util.List<Point2D> originlist)Trace smoothingPoint2DkalmanFilterPoint(Point2D lastLoc, Point2D curLoc)Single point wave filteringjava.util.List<Point2D>pathOptimize(java.util.List<Point2D> originlist)Trace smoothing optimizationjava.util.List<Point2D>reducerVerticalThreshold(java.util.List<Point2D> inPoints)Rarefies tracesjava.util.List<Point2D>removeNoisePoint(java.util.List<Point2D> originlist)Denoises traces to delete the point that vertical distance is bigger than 20m.voidsetIntensity(int mIntensity)set filter strengthvoidsetNoiseThreshhold(float mnoiseThreshhold)set noise reduction thresholdvoidsetThreshhold(float mThreshhold)set filter threshold
-
-
-
Method Detail
-
getIntensity
public int getIntensity()
get filter strength- Returns:
-
setIntensity
public void setIntensity(int mIntensity)
set filter strength- Parameters:
mIntensity-
-
getThreshhold
public float getThreshhold()
get filter threshold- Returns:
- 滤波阈值
-
setThreshhold
public void setThreshhold(float mThreshhold)
set filter threshold- Parameters:
mThreshhold-
-
setNoiseThreshhold
public void setNoiseThreshhold(float mnoiseThreshhold)
set noise reduction threshold- Parameters:
mnoiseThreshhold-
-
pathOptimize
public java.util.List<Point2D> pathOptimize(java.util.List<Point2D> originlist)
Trace smoothing optimization- Parameters:
originlist- the original trance list, list.size is bigger than 2.- Returns:
- optimized trace list
-
kalmanFilterPath
public java.util.List<Point2D> kalmanFilterPath(java.util.List<Point2D> originlist)
Trace smoothing- Parameters:
originlist- the original trance list, list.size is bigger than 2.- Returns:
- the trace list after smoothing processing
-
removeNoisePoint
public java.util.List<Point2D> removeNoisePoint(java.util.List<Point2D> originlist)
Denoises traces to delete the point that vertical distance is bigger than 20m.- Parameters:
originlist- the original trance list, list.size is bigger than 2.- Returns:
-
kalmanFilterPoint
public Point2D kalmanFilterPoint(Point2D lastLoc, Point2D curLoc)
Single point wave filtering- Parameters:
lastLoc- the coordinates of the last positioning pointcurLoc- the coordinates of the positioning point- Returns:
- the coordinates of the positioning point after filtering
-
reducerVerticalThreshold
public java.util.List<Point2D> reducerVerticalThreshold(java.util.List<Point2D> inPoints)
Rarefies traces- Parameters:
inPoints- the trace list to be rarefied. two points at least. Deletes the point that vertical distance is less than mThreshhold.- Returns:
- the rarefied trace list
-
-