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

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)
importFrom("utils", "read.csv")

#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(rgdal_extSoftVersion, PROJis6ormore, GDALis3ormore, GDAL_OSR_PROJ, 
 new_proj_and_gdal)

export(project, make_EPSG, projInfo, getPROJ4VersionInfo, getPROJ4libPath,
  projNAD, EPSG_version)
export(CRSargs, checkCRSArgs, checkCRSArgs_ng, compare_CRS)
export(get_P6_datum_hard_fail, set_P6_datum_hard_fail, get_transform_wkt_comment, set_transform_wkt_comment, get_last_coordOp, get_thin_PROJ6_warnings, set_thin_PROJ6_warnings, get_enforce_xy, set_enforce_xy, get_prefer_proj, set_prefer_proj, get_rgdal_show_exportToProj4_warnings, set_rgdal_show_exportToProj4_warnings, get_PROJ6_warnings_count)
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(readGDAL, writeGDAL, create2GDAL)
export(showWKT, showEPSG, showP4, showSRID, list_coordOps, best_instantiable_coordOp)
export(readOGR, ogrInfo, ogrFIDs, ogrDrivers, writeOGR, ogrListLayers)
export(GDALinfo, print.GDALobj, getGDALVersionInfo, getGDALCheckVersion, getGDAL_DATA_Path, getGDALwithGEOS)
export(displayDataset)
export(open.SpatialGDAL, copy.SpatialGDAL)
export(llgridlines)
export(GDALcall)
export(rawTransform)
export(is_proj_CDN_enabled, enable_proj_CDN, disable_proj_CDN)
export(get_proj_search_paths, set_proj_search_paths, proj_CDN_user_writable_dir)

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

export(OGRSpatialRef, GDALSpatialRef, OSRIsProjected)

export(get_OVERRIDE_PROJ_DATUM_WITH_TOWGS84,
 set_OVERRIDE_PROJ_DATUM_WITH_TOWGS84)

export(getCPLConfigOption, setCPLConfigOption)

export(get_cached_orig_PROJ_LIB, get_cached_orig_GDAL_DATA,
 get_cached_set_PROJ_LIB, get_cached_set_GDAL_DATA)

#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)
S3method(print, coordOps)




