Geometry geom = lyr.getGeometry();
if (geom == null) continue;
ComponentLocater locater = new ComponentLocater(geom);
List locs = locater.getComponents(pt, tolerance);
if (locs.size() > 0) {
GeometryLocation loc = (GeometryLocation) locs.get(0);
return loc.getComponent();
}
}
return null;
}