{-- 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 polygons
module Algebras.Base.Polygons
	(
		-- * The @Polygons@ class
		Polygons (..)
	)
	 where

import Algebras.Base.Points 
import Algebras.Base.Lines

import TerraHS.TerraLib.TePoint	 
import TerraHS.TerraLib.TeLine2D
import TerraHS.TerraLib.TePolygon

class (Num a , Lines l a ) => Polygons pg l a | pg -> l a where
	-- | create a polygon from a line list 
	createPolygon 	:: [l] 	-> pg 
	
instance Polygons TePolygon TeLine2D Double where
	createPolygon ls = (TePolygon ls)