module GIS.Graphics.PlotSVG where
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Diagrams
import Control.Monad
import GIS.Hylo
import GIS.Types
import Data.Monoid
import GIS.Math.Projections
import GIS.Graphics.Plot
import GIS.Graphics.Types
fileOptions = def { _fo_size = (1920, 1080) , _fo_format = SVG }
mkMapSVG :: FilePath -> Map -> IO ()
mkMapSVG path map = do
renderableToFile fileOptions path $ mkMapR map
putStrLn ("...output written to " <> path)
makeLensMapSVG :: (Show a) => String -> FilePath -> Lens' District a -> [District] -> IO ()
makeLensMapSVG title filepath lens districts = do
renderableToFile fileOptions filepath $ mkRenderableLens lens districts title
putStrLn ("...output written to " <> filepath)