/** * Constructs a feature cursor * * @param oids * Object IDs of features over which to iterate * @param store * Feature store from which to read the Feature data * @param search_extent * Search extent that was used to generate the list of OIDs in this * cursor - this is used to refine the list of Features actually * returned from the cursor * @param match_exactly * True to only return Feature instances that "exactly" match the * original search criteria. When querying a FeatureStore by spatial * extent (GeoExtent), the store will actually return a FeatureCursor * corresponding to all features whose bounding extents intersect the * search extent; i.e. it does not test down to the shape level. Passing * true to this parameter will perform shape-level intersection testing * when using this cursor. */ public FeatureCursor( FeatureOIDList _oids, FeatureStore _store, GeoExtent _search_extent, bool _match_exactly) { oids = _oids; store = _store; search_extent = _search_extent; match_exactly = _match_exactly; prefetch_size = DEFAULT_PREFETCH_SIZE; at_bof = false; reset(); }
public FeatureCursor getCursor(GeoExtent query_extent, bool match_exactly) { FeatureOIDList oids = new FeatureOIDList(); for (FeatureCursor cursor = store.getCursor(); cursor.hasNext(); ) { Feature feature = cursor.next(); GeoExtent f_extent = feature.getExtent(); if (f_extent.intersects(query_extent)) { oids.Add(feature.getOID()); } } return new FeatureCursor(oids, store , query_extent, match_exactly); }
public FeatureCursor getCursor(GeoExtent query_extent, bool match_exactly) { FeatureOIDList oids = new FeatureOIDList(); for (FeatureCursor cursor = store.getCursor(); cursor.hasNext();) { Feature feature = cursor.next(); GeoExtent f_extent = feature.getExtent(); if (f_extent.intersects(query_extent)) { oids.Add(feature.getOID()); } } return(new FeatureCursor(oids, store, query_extent, match_exactly)); }