*/
public GridCacheFeatureReader(Collection<NodeIdentifier> nodeids, GridSpatialIndex g){
this.grid = g;
collectedFeatureIds = new HashSet<String>();
GridRootNode gn = g.getRootNode();
tovisit.add(gn.getIdentifier());
if (nodeids != null) {
for( Iterator<NodeIdentifier> iterator = nodeids.iterator(); iterator.hasNext(); ) {
NodeIdentifier id = (NodeIdentifier) iterator.next();
if (id.isValid()) {
tovisit.add(id);