private IFeature GetFeaturePrivate(uint rowId, IFeatures dt) { if (_dbaseFile != null) { var dr = _dbaseFile.GetFeature(rowId, dt ?? new Features()); dr.Geometry = ReadGeometry(rowId); if (FilterDelegate == null || FilterDelegate(dr)) { return(dr); } return(null); } throw (new ApplicationException("An attempt was made to read DBase data from a shapefile without a valid .DBF file")); }
/// <summary> /// Gets a datarow from the datasource at the specified index belonging to the specified datatable /// </summary> /// <param name="RowID"></param> /// <param name="dt">Datatable to feature should belong to.</param> /// <returns></returns> public IFeature GetFeature(uint RowID, IFeatures dt) { if (dbaseFile != null) { IFeature dr = (IFeature)dbaseFile.GetFeature(RowID, (dt == null) ? new Features() : dt); dr.Geometry = ReadGeometry(RowID); if (FilterDelegate == null || FilterDelegate(dr)) { return(dr); } else { return(null); } } else { throw (new ApplicationException("An attempt was made to read DBase data from a shapefile without a valid .DBF file")); } }