diff --git a/gdal.go b/gdal.go index 5de4a8f..c9360a5 100644 --- a/gdal.go +++ b/gdal.go @@ -359,6 +359,25 @@ func goGDALProgressFuncProxyA(complete C.double, message *C.char, data unsafe.Po ) } +// CPLSetConfigOption +func CPLSetConfigOption(key, val string) { + cKey := C.CString(key) + defer C.free(unsafe.Pointer(cKey)) + cVal := C.CString(val) + defer C.free(unsafe.Pointer(cVal)) + C.CPLSetConfigOption(cKey, cVal) +} + +// CPLGetConfigOption +func CPLGetConfigOption(key, val string) string { + cKey := C.CString(key) + defer C.free(unsafe.Pointer(cKey)) + + cVal := C.CString(val) + defer C.free(unsafe.Pointer(cVal)) + return C.GoString(C.CPLGetConfigOption(cKey, cVal)) +} + /* ==================================================================== */ /* Registration/driver related. */ /* ==================================================================== */