// Check is sessionID exists (beginStroke has been called before)
if (null != strokes.get(sessionID)) {
// Check minimum distance from last point
if (null != strokes.get(sessionID).getLastPoint()) {
GmlPoint prev = new GmlPoint();
prev.set(strokes.get(sessionID).getLastPoint());
if (prev.distanceTo(v) > minPointsDistance) {
strokes.get(sessionID).addPoint(new GmlPoint(v, time, pressure, rotation, direction, thickness));
}
else {
LOGGER.log(Level.FINE, "Skipped, too close from previous point: "+prev.distanceTo(v));
}
}
else { // First point, add it
strokes.get(sessionID).addPoint(new GmlPoint(v, time, pressure, rotation, direction, thickness));
}
}
//}
}