module Main (main) where import GIS.Graphics.PlotPNG import GIS.Graphics.PlotSVG import GIS.Hylo import GIS.Math.Projections import GIS.Math.Spherical import Test.Hspec main :: IO () main = hspec $ do describe "distance" $ it "computes distances along geodesics" $ distance (-74.0059, 40.7128) (-118.2347, 34.0522) `shouldBe` 3934.997673163554 describe "mercatorFullPng" $ it "Reads a map and writes a .png with the mercator projection" $ (mkMapPng "test/testmap.png" =<< districtToMapP bonne <$> getDistricts "test/data/worldmap/TM_WORLD_BORDERS-0.3.shp") >>= (`shouldBe` ()) describe "mercatorFullSVG" $ it "Reads a map and writes a .svg with the mercator projection" $ (mkMapSVG "test/testmap.svg" =<< districtToMapP bonne <$> getDistricts "test/data/worldmap/TM_WORLD_BORDERS-0.3.shp") >>= (`shouldBe` ())