for (Iterator sItr = featuresCheck.iterator(); sItr.hasNext();) {
Feature f = (Feature)sItr.next();
if (f.getDefaultGeometry() == null) continue;
DistanceOp op = new DistanceOp(request.getPoint(), f.getDefaultGeometry());
Coordinate[] co = op.closestPoints();
Measure m = DefaultGeographicCRS.WGS84.distance(new double[] { co[0].x, co[0].y, }, new double[] { co[1].x, co[1].y, });
if (m.doubleValue() > nearestDistance) continue;
nearestFeature = f;
nearestDistance = m.doubleValue();
nearestBearing = calcBearing(co);
}
//GR: I don't know if the featuresults should be added here for later
//encoding if it was a lock request. may be after ensuring the lock