useDynLib(rgeos)

import(methods)
import(sp)

export(createPolygonsComment, createSPComment, set_do_poly_check, get_do_poly_check)

#export(checkPolygonsGEOS)
#export(checkHolesGPC)
export(poly_findInBoxGEOS, gUnarySTRtreeQuery, gBinarySTRtreeQuery)

# sp extension classes
exportClasses(Ring,SpatialRings, SpatialRingsDataFrame)
export(Ring,SpatialRings,SpatialRingsDataFrame)

exportClasses(SpatialCollections)
export(SpatialCollections)

exportMethods(row.names)

# Utility Functions
export(getScale,setScale,translate,checkP4S) #,groupID)
export(version_GEOS, version_GEOS0)

# WKT Functions
export(readWKT, writeWKT)


# GEOS unary predicate functions
export(RGEOSisEmpty, RGEOSisValid, RGEOSisSimple, RGEOSisRing)#, RGEOSHasZ)
export(gIsEmpty, gIsValid, gIsSimple, gIsRing)#, gHasZ)


# GEOS binary predicate functions
export( RGEOSRelate, RGEOSDisjoint, RGEOSTouches, RGEOSIntersects, RGEOSCrosses,
		RGEOSWithin, RGEOSContains, RGEOSOverlaps, RGEOSEquals, RGEOSEqualsExact)
export( gRelate, gDisjoint, gTouches, gIntersects, gCrosses,
		gWithin, gContains, gOverlaps, gEquals, gEqualsExact,
		gContainsProperly, gCovers, gCoveredBy)

# GEOS misc functions
export( RGEOSArea, RGEOSLength, RGEOSDistance, RGEOSisWithinDistance, 
		RGEOSHausdorffDistance)
export( gArea, gLength, gDistance, gWithinDistance)


# GEOS topology functions
export( RGEOSEnvelope, RGEOSConvexHull, RGEOSBoundary, RGEOSGetCentroid, 
		RGEOSPointOnSurface, RGEOSLineMerge, RGEOSUnionCascaded)
export( gEnvelope, gConvexHull, gBoundary, gCentroid, 
		gPointOnSurface, gLineMerge, gUnionCascaded, gUnaryUnion)

export(	gSimplify, gPolygonize)
		
# GEOS binary topology functions
export( gDifference, gSymdifference, gIntersection, gUnion)# RSB FIXME

# GEOS buffer functions
export( RGEOSBuffer, gBuffer )

# GEOS linearref functions
#export( gProject, gInterpolate)


# gpclib shadows

#importFrom(graphics, plot)

exportClasses("gpc.poly", "gpc.poly.nohole")
exportMethods("show", "get.bbox", "plot", "intersect", "union", "symdiff",
              "setdiff", "[", "append.poly", "scale.poly", "area.poly",
              "get.pts", "coerce", "tristrip", "triangulate")

export("read.polyfile", "write.polyfile")

export(polygonsLabel)
