private StatResultItem[] ApplyStatByRasterTemplate(IRasterDataProvider raster, string templateName, Func <T, int, int> weight) { IAOITemplateStat <T> stat = new AOITemplateStat <T>(); templateName = "China_XjRaster"; return(ResultsWithoutZero(stat.CountByRaster(raster, templateName, weight))); }
private StatResultItem[] ApplyStatByVectorTemplate(IRasterDataProvider raster, string shpTemplateName, string primaryFieldName, Func <T, int, int> weight) { string shpFullname = VectorAOITemplate.FindVectorFullname(shpTemplateName); IAOITemplateStat <T> stat = new AOITemplateStat <T>(); return(ResultsWithoutZero(stat.CountByVector(raster, shpFullname, primaryFieldName, weight))); }
/// <summary> /// 通过AOI自定义统计面积 /// </summary> /// <param name="rasterFileName"></param> /// <param name="aoi"></param> /// <param name="weight"></param> /// <returns></returns> private StatResultItem[] ApplyStatByVectorProvider(IRasterDataProvider raster, Dictionary <string, int[]> aoi, Func <T, int, int> weight) { IAOITemplateStat <T> stat = new AOITemplateStat <T>(); return(ResultsWithoutZero(stat.CountByVector(raster, aoi, weight))); }
/// <summary> /// 通过传入自定义矢量文件进行统计 /// </summary> /// <param name="raster">要进行统计的栅格数据提供者</param> /// <param name="shpFullname">自定义矢量文件的完整路径</param> /// <param name="filter">统计条件</param> /// <returns></returns> private StatResultItem[] ApplyStatByVectorProvider(IRasterDataProvider raster, string shpFullname, string primaryFieldName, Func <T, bool> filter) { IAOITemplateStat <T> stat = new AOITemplateStat <T>(); return(ResultsWithoutZero(stat.CountByVector(raster, shpFullname, primaryFieldName, filter))); }