public MapController(MapDataService mapDataService, ElevationMapService elevationMapService, BitmapHelperService bitmapHelperService, TopoMapService topoMapService) { MapDataService = mapDataService; ElevationTransformService = elevationMapService; BitmapHelperService = bitmapHelperService; TopoMapService = topoMapService; }
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); }