Beispiel #1
0
 public MapController(MapDataService mapDataService,
                      ElevationMapService elevationMapService,
                      BitmapHelperService bitmapHelperService,
                      TopoMapService topoMapService)
 {
     MapDataService            = mapDataService;
     ElevationTransformService = elevationMapService;
     BitmapHelperService       = bitmapHelperService;
     TopoMapService            = topoMapService;
 }
Beispiel #2
0
        public VectorizeProgram(string inputBitmapFilepath, string outputSvgFilePath)
        {
            Console.WriteLine($"Loading bitmap {inputBitmapFilepath} ");

            var bitmapBytes = File.ReadAllBytes(inputBitmapFilepath);

            Console.WriteLine($"Input Byte Count {bitmapBytes.Length}");

            var bitmap = bitmapHelper.Bytes2Bitmap(bitmapBytes);

            Console.WriteLine($"Input bitmap size {bitmap.Width} x {bitmap.Height}");


            var srvc = new TopoMapService(bitmapHelper);

            var svgText = srvc.TransformTopoToSVG(bitmap);

            File.WriteAllText(outputSvgFilePath, svgText);
        }