{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,
  ForeignFunctionInterface, IncoherentInstances,
  MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,
  TypeFamilies, TypeSynonymInstances #-}
module GDAL.OGRPolygon.Implementation where
import Data.Monoid
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import System.IO.Unsafe
import FFICXX.Runtime.Cast
import FFICXX.Runtime.CodeGen.Cxx
import FFICXX.Runtime.TH
import GDAL.OGRPolygon.RawType
import GDAL.OGRPolygon.FFI
import GDAL.OGRPolygon.Interface
import GDAL.OGRPolygon.Cast
import GDAL.OGRPolygon.RawType
import GDAL.OGRPolygon.Cast
import GDAL.OGRPolygon.Interface
import GDAL.OGRMultiPolygon.RawType
import GDAL.OGRMultiPolygon.Cast
import GDAL.OGRMultiPolygon.Interface
import GDAL.OGREnvelope.RawType
import GDAL.OGREnvelope.Cast
import GDAL.OGREnvelope.Interface
import GDAL.OGRPoint.RawType
import GDAL.OGRPoint.Cast
import GDAL.OGRPoint.Interface
import GDAL.OGRLinearRing.RawType
import GDAL.OGRLinearRing.Cast
import GDAL.OGRLinearRing.Interface
import GDAL.OGRCurvePolygon.RawType
import GDAL.OGRCurvePolygon.Cast
import GDAL.OGRCurvePolygon.Interface
import GDAL.OGRSurface.RawType
import GDAL.OGRSurface.Cast
import GDAL.OGRSurface.Interface
import GDAL.OGRGeometry.RawType
import GDAL.OGRGeometry.Cast
import GDAL.OGRGeometry.Interface
import STD.Deletable.RawType
import STD.Deletable.Cast
import STD.Deletable.Interface

instance () => IOGRPolygon (OGRPolygon) where

instance () => IOGRCurvePolygon (OGRPolygon) where

instance () => IOGRSurface (OGRPolygon) where

instance () => IOGRGeometry (OGRPolygon) where
        getGeometryType :: OGRPolygon -> IO CUInt
getGeometryType = (Ptr RawOGRPolygon -> IO CUInt) -> OGRPolygon -> IO CUInt
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO CUInt
c_ogrpolygon_getgeometrytype
        getEnvelope :: forall c0. (IOGREnvelope c0, FPtr c0) => OGRPolygon -> c0 -> IO ()
getEnvelope = (Ptr RawOGRPolygon -> Ptr RawOGREnvelope -> IO ())
-> OGRPolygon -> c0 -> IO ()
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGREnvelope -> IO ()
c_ogrpolygon_getenvelope
        intersects :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
intersects = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_intersects
        equals :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
equals = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_equals
        disjoint :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
disjoint = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_disjoint
        touches :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
touches = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_touches
        crosses :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
crosses = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_crosses
        within :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
within = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_within
        contains :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
contains = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_contains
        overlaps :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CBool
overlaps = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool)
-> OGRPolygon -> c0 -> IO CBool
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CBool
c_ogrpolygon_overlaps
        boundary :: OGRPolygon -> IO OGRGeometry
boundary = (Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> IO OGRGeometry
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_boundary
        distance :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CDouble
distance = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CDouble)
-> OGRPolygon -> c0 -> IO CDouble
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CDouble
c_ogrpolygon_distance
        convexHull :: OGRPolygon -> IO OGRGeometry
convexHull = (Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> IO OGRGeometry
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_convexhull
        buffer :: OGRPolygon -> CDouble -> CInt -> IO OGRGeometry
buffer = (Ptr RawOGRPolygon -> CDouble -> CInt -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> CDouble -> CInt -> IO OGRGeometry
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
xform2 Ptr RawOGRPolygon -> CDouble -> CInt -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_buffer
        intersection :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO OGRGeometry
intersection = (Ptr RawOGRPolygon
 -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> c0 -> IO OGRGeometry
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_intersection
        union :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO OGRGeometry
union = (Ptr RawOGRPolygon
 -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> c0 -> IO OGRGeometry
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_union
        unionCascaded :: OGRPolygon -> IO OGRGeometry
unionCascaded = (Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> IO OGRGeometry
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_unioncascaded
        difference :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO OGRGeometry
difference = (Ptr RawOGRPolygon
 -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> c0 -> IO OGRGeometry
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_difference
        symDifference :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO OGRGeometry
symDifference = (Ptr RawOGRPolygon
 -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> c0 -> IO OGRGeometry
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_symdifference
        centroid :: forall c0. (IOGRPoint c0, FPtr c0) => OGRPolygon -> c0 -> IO CInt
centroid = (Ptr RawOGRPolygon -> Ptr RawOGRPoint -> IO CInt)
-> OGRPolygon -> c0 -> IO CInt
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRPoint -> IO CInt
c_ogrpolygon_centroid
        simplify :: OGRPolygon -> CDouble -> IO OGRGeometry
simplify = (Ptr RawOGRPolygon -> CDouble -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> CDouble -> IO OGRGeometry
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> CDouble -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_simplify
        delaunayTriangulation :: OGRPolygon -> CDouble -> CInt -> IO OGRGeometry
delaunayTriangulation = (Ptr RawOGRPolygon -> CDouble -> CInt -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> CDouble -> CInt -> IO OGRGeometry
forall a ca x1 cx1 x2 cx2 y cy.
(Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) =>
(ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y
xform2 Ptr RawOGRPolygon -> CDouble -> CInt -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_delaunaytriangulation
        polygonize :: OGRPolygon -> IO OGRGeometry
polygonize = (Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry))
-> OGRPolygon -> IO OGRGeometry
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO (Ptr RawOGRGeometry)
c_ogrpolygon_polygonize
        distance3D :: forall c0.
(IOGRGeometry c0, FPtr c0) =>
OGRPolygon -> c0 -> IO CDouble
distance3D = (Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CDouble)
-> OGRPolygon -> c0 -> IO CDouble
forall a ca x1 cx1 y cy.
(Castable a ca, Castable x1 cx1, Castable y cy) =>
(ca -> cx1 -> IO cy) -> a -> x1 -> IO y
xform1 Ptr RawOGRPolygon -> Ptr RawOGRGeometry -> IO CDouble
c_ogrpolygon_distance3d

instance () => IDeletable (OGRPolygon) where
        delete :: OGRPolygon -> IO ()
delete = (Ptr RawOGRPolygon -> IO ()) -> OGRPolygon -> IO ()
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO ()
c_ogrpolygon_delete

oGRPolygon_getExteriorRing :: () => OGRPolygon -> IO OGRLinearRing
oGRPolygon_getExteriorRing :: OGRPolygon -> IO OGRLinearRing
oGRPolygon_getExteriorRing
  = (Ptr RawOGRPolygon -> IO (Ptr RawOGRLinearRing))
-> OGRPolygon -> IO OGRLinearRing
forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
xform0 Ptr RawOGRPolygon -> IO (Ptr RawOGRLinearRing)
c_ogrpolygon_ogrpolygon_getexteriorring