public IFeatureCursor Search(IQueryFilter Filter, bool Recycling) { log.enterFunc("Search"); if (log.IsDebugEnabled) { log.Debug(Helper.objectToString(Filter) + "," + Recycling.ToString()); } IFeatureCursor retVal = null; try { string where; string fields; GeomHelper.aoQryToPostGisQry(Filter, postGisLayer, out fields, out where); AutoDataReader dr = postGisLayer.doQuery(fields, where); #if !STUB_BUILD retVal = new PostGisFeatureCursor(this, dr); #endif } finally { log.leaveFunc(); } return(retVal); }
public int FeatureCount(IQueryFilter QueryFilter) { log.enterFunc("FeatureCount"); string fields; string where; GeomHelper.aoQryToPostGisQry(QueryFilter, postGisLayer, out fields, out where); return(postGisLayer.getRecordCount(where)); }
//Paolo (march 2007): we need to get the geometry field in the usual manner public IFeature GetFeature(int ID) { log.enterFunc("GetFeature"); /* old: wrong * IDataRecord rec = postGisLayer.getRecord(ID); * return new PostGisFeature(this, rec); */ //SELECT * where gid = 12 string fields; string where; IQueryFilter qf = new QueryFilterClass(); qf.WhereClause = PostGisConstants.idField.ToString() + "=" + ID.ToString(); GeomHelper.aoQryToPostGisQry(qf, postGisLayer, out fields, out where); IDataRecord rec = postGisLayer.getRecord(fields, where); return(new PostGisFeature(this, rec)); }
/// <summary> /// Get a ISelectionSet from the feature class (Paolo, march 2007) /// </summary> /// <param name="QueryFilter"></param> /// <param name="selType"></param> /// <param name="selOption"></param> /// <param name="selectionContainer"></param> /// <returns></returns> public ISelectionSet Select(IQueryFilter QueryFilter, esriSelectionType selType, esriSelectionOption selOption, IWorkspace selectionContainer) { log.enterFunc("Select"); if (log.IsDebugEnabled) { log.Debug(Helper.objectToString(QueryFilter) + "," + selType.ToString() + "," + selOption.ToString() + "," + Helper.objectToString(selectionContainer)); } ISelectionSet retVal = null; try { //retVal = new PostGisSelectionSet(this); //2 cases, with null QueryFilter and without if (QueryFilter == null) { retVal = new PostGisSelectionSet(this); } else { string sql = ""; string fields = ""; string where = ""; GeomHelper.aoQryToPostGisQry(QueryFilter, postGisLayer, out fields, out where); AutoDataReader dr = postGisLayer.doQuery(fields, where); retVal = new PostGisSelectionSet(this, dr); } } finally { log.leaveFunc(); } return(retVal as ISelectionSet); }