Exemplo n.º 1
0
        public static IEnumerable <IGeoCell> Stratch(IFetchRequest request, Array mask = null)
        {
            IEnumerable <IGeoCell> streched = null;

            switch (request.Domain.SpatialRegionType)
            {
            case SpatialRegionSpecification.Points:
                streched = BatchProcessingUtils.StretchCells(request.Domain.Lats, request.Domain.Lats, request.Domain.Lons, request.Domain.Lons, request.Domain.TimeRegion, mask);
                break;

            case SpatialRegionSpecification.Cells:
                streched = BatchProcessingUtils.StretchCells(request.Domain.Lats, request.Domain.Lats2, request.Domain.Lons, request.Domain.Lons2, request.Domain.TimeRegion, mask);
                break;

            case SpatialRegionSpecification.PointGrid:
                streched = BatchProcessingUtils.StretchGrid(request.Domain.Lats, request.Domain.Lons, request.Domain.TimeRegion, mask);
                break;

            case SpatialRegionSpecification.CellGrid:
                streched = BatchProcessingUtils.StretchCellGrid(request.Domain.Lats, request.Domain.Lons, request.Domain.TimeRegion, mask);
                break;

            default:
                throw new NotImplementedException();
            }

            return(streched);
        }
Exemplo n.º 2
0
 public static Array Fold(double[] strached, IFetchRequest request, Array mask = null)
 {
     return(BatchProcessingUtils.Fold(strached, request.Domain.GetDataArrayShape(), mask));
 }