-------------------------------------------------------------------------------- -- -- Module : Main -- Description : GeoJSON to VTK. -- Copyright : (c) 2014 Brian W Bush -- License : MIT -- Maintainer : code@bwbush.io -- Stability : experimental -- Portability : portable -- -- | Rudimentary support for converting GeoJSON 1.0 to VTK 4.2. -- -------------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Data.Geography.GeoJSON (FeatureCollection, readGeoJSON) import Data.Geometry.LegacyVTK (makeVTK) import Data.Geometry.LegacyVTK.Util (vtkFromGeojson) main :: IO () main = do x <- readGeoJSON "/dev/stdin" let y :: FeatureCollection Just y = x z = vtkFromGeojson y putStrLn $ unlines $ makeVTK "Converted from GeoJSON" z Nothing Nothing return ()