示例#1
0
        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)));
        }
示例#2
0
        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)));
        }
示例#3
0
        /// <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)));
        }
示例#4
0
        /// <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)));
        }