{-- TerraHS - Interface between TerraLib and Haskell (c) Sergio Costa (INPE) - Setembro, 2005 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License 2.1 as published by the Free Software Foundation (http://www.opensource.org/licenses/gpl-license.php) --} {-- --} -- | Module for handling the line module Algebras.Base.Lines ( -- * The @Lines@ class Lines (..) ) where import Algebras.Base.Points import TerraHS.TerraLib.TePoint import TerraHS.TerraLib.TeLine2D class (Num a ) => Lines l a | l -> a where -- | Constructor - Create a line from a point list createLine :: [(a,a)] -> l -- | decomp a line to point decompToCoords :: l -> [(a,a)] instance Lines TeLine2D Double where createLine cs = (TeLine2D cs ) decompToCoords (TeLine2D cs) = cs