# useDynLib(rgdal, .registration = TRUE, .fixes = "GDAL_")
useDynLib(rgdal)

import(methods)
import(sp)
importFrom(grDevices, gray, rgb, hsv, col2rgb)
importFrom(graphics, par, image.default, text)
importFrom(stats, sd, offset, na.omit)
importFrom(utils, packageVersion)

#exportMethods(spTransform)
exportMethods(closeDataset)
exportMethods(initialize)
exportMethods(summary)
exportMethods(coerce, "[", "[[")

exportClass(GDALDataset)
exportClass(GDALDriver)
exportClass(GDALMajorObject)
exportClass(GDALRasterBand)
exportClass(GDALReadOnlyDataset)
exportClass(GDALTransientDataset)
exportClass(SpatialGDAL, SpatialGDALWrite)

export(project, make_EPSG, projInfo, getPROJ4VersionInfo, getPROJ4libPath,
  projNAD)
export(CRSargs, checkCRSArgs)
export(putRasterData, saveDataset, copyDataset, deleteDataset, saveDatasetAs)
export(getGDALDriverNames, getDriverName, getDriverLongName, gdalDrivers)
export(getDescription)
export(getRasterData, getRasterTable, getProjectionRef)
export(getRasterBand, getRasterBlockSize)
export(toSigned, toUnSigned)
export(getDriver, GDAL.close, GDAL.open, getColorTable,
  getGeoTransFunc, sub.GDROD, SGDF2PCT, vec2RGB, asSGDF_GROD, RGB2PCT)
export(make_EPSG, project, readGDAL, writeGDAL, showWKT, showEPSG, showP4, create2GDAL)
export(readOGR, ogrInfo, ogrFIDs, ogrDrivers, writeOGR, ogrListLayers)
export(GDALinfo, print.GDALobj, getGDALVersionInfo, getGDALCheckVersion, getGDAL_DATA_Path)
export(displayDataset)
export(open.SpatialGDAL, copy.SpatialGDAL)
export(llgridlines)
export(GDALcall)
export(rawTransform)

#export(spTransform, spTransform.SpatialPoints, 
#  spTransform.SpatialPointsDataFrame, spTransform.SpatialLines, 
#  spTransform.SpatialLinesDataFrame, spTransform.SpatialPolygons, 
#  spTransform.SpatialPolygonsDataFrame)

export(OGRSpatialRef, GDALSpatialRef)

export(get_OVERRIDE_PROJ_DATUM_WITH_TOWGS84,
 set_OVERRIDE_PROJ_DATUM_WITH_TOWGS84)

export(getCPLConfigOption, setCPLConfigOption)

#S3method(spTransform, SpatialPoints)
#S3method(spTransform, SpatialPointsDataFrame)
#S3method(spTransform, SpatialLines)
#S3method(spTransform, SpatialLinesDataFrame)
#S3method(spTransform, SpatialPolygons)
#S3method(spTransform, SpatialPolygonsDataFrame)
S3method(print, GDALobj)
S3method(print, ogrinfo)
S3method(open, SpatialGDAL)
S3method(close, SpatialGDAL)
S3method(close, SpatialGDALWrite)
S3method(print, summary.SpatialGDAL)
