Пример #1
0
        static void Run(Options options)
        {
            var targetMap  = Grd.Read(options.TargetMapPath);
            var targetMask = Grd.Read(options.TargetMaskPath);
            var floodmap1  = Grd.Read(options.Floodmap1Path);
            var floodmap2  = Grd.Read(options.Floodmap2Path);

            var diff   = GetDiffBetween(floodmap1, floodmap2, targetMap, targetMask, options.TargetValue);
            var bitmap = DrawDiffMap(diff);
            var report = PrepareReport(diff);

            bitmap.Save($"{options.OutputDir}/diff.png");
            File.WriteAllText($"{options.OutputDir}/report.txt", report);
        }
Пример #2
0
        private static void Run(Options options)
        {
            var relief      = Grd.Read(options.ReliefFile);
            var targetMap   = Grd.Read(options.TargetMapFile);
            var floodSeries = FloodseriesZip.Read(options.FloodSeriesFile, options.StartDay, options.EndDay);
            var channels    = CgInteraction.ReadChannelsTreeFromCg(options.ChannelsGraphFile);

            var drawingsDir = $"{options.OutputDir}/vis";
            var mapsDir     = $"{options.OutputDir}/maps";

            Dir.RequireClearDirectory(drawingsDir);
            Dir.RequireClearDirectory(mapsDir);

            var floodMap = DrawFloodMapWithTargets(floodSeries, targetMap, options.TargetValue);

            floodMap.Save($"{options.OutputDir}/floodmap.png");

            var strategies = new[]