for (Iterator <MappedPosition> i = vertices.iterator(); i.hasNext();) {
MappedPosition candidate = (MappedPosition) i.next();
if (((DirectPosition2D) candidate.getSource()).distance(
x.toPoint2D()) < ((DirectPosition2D) nearestOne
.getSource()).distance(x.toPoint2D())) {
nearestOne = candidate;
}
}