/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.25
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


using System;
using System.Runtime.InteropServices;

public class Dataset : MajorObject {
  private HandleRef swigCPtr;

  internal Dataset(IntPtr cPtr, bool cMemoryOwn) : base(gdalPINVOKE.DatasetUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(Dataset obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~Dataset() {
    Dispose();
  }

  public override void Dispose() {
    if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
      swigCMemOwn = false;
      gdalPINVOKE.delete_Dataset(swigCPtr);
    }
    swigCPtr = new HandleRef(null, IntPtr.Zero);
    GC.SuppressFinalize(this);
    base.Dispose();
  }

  public int RasterXSize {
    get {
      int ret = gdalPINVOKE.get_Dataset_RasterXSize(swigCPtr);
      return ret;
    } 
  }

  public int RasterYSize {
    get {
      int ret = gdalPINVOKE.get_Dataset_RasterYSize(swigCPtr);
      return ret;
    } 
  }

  public int RasterCount {
    get {
      int ret = gdalPINVOKE.get_Dataset_RasterCount(swigCPtr);
      return ret;
    } 
  }

  public Driver GetDriver() {
    IntPtr cPtr = gdalPINVOKE.Dataset_GetDriver(swigCPtr);
    Driver ret = (cPtr == IntPtr.Zero) ? null : new Driver(cPtr, false);
    return ret;
  }

  public Band GetRasterBand(int nBand) {
    IntPtr cPtr = gdalPINVOKE.Dataset_GetRasterBand(swigCPtr, nBand);
    Band ret = (cPtr == IntPtr.Zero) ? null : new Band(cPtr, false);
    return ret;
  }

  public string GetProjection() {
    string ret = gdalPINVOKE.Dataset_GetProjection(swigCPtr);
    return ret;
  }

  public string GetProjectionRef() {
    string ret = gdalPINVOKE.Dataset_GetProjectionRef(swigCPtr);
    return ret;
  }

  public int SetProjection(string prj) {
    int ret = gdalPINVOKE.Dataset_SetProjection(swigCPtr, prj);
    return ret;
  }

  public void GetGeoTransform() {
    gdalPINVOKE.Dataset_GetGeoTransform(swigCPtr);
  }

  public int SetGeoTransform(SWIGTYPE_p_double argin) {
    int ret = gdalPINVOKE.Dataset_SetGeoTransform(swigCPtr, SWIGTYPE_p_double.getCPtr(argin));
    return ret;
  }

  public int BuildOverviews(string resampling, int overviewlist) {
    int ret = gdalPINVOKE.Dataset_BuildOverviews(swigCPtr, resampling, overviewlist);
    return ret;
  }

  public int GetGCPCount() {
    int ret = gdalPINVOKE.Dataset_GetGCPCount(swigCPtr);
    return ret;
  }

  public string GetGCPProjection() {
    string ret = gdalPINVOKE.Dataset_GetGCPProjection(swigCPtr);
    return ret;
  }

  public void GetGCPs(SWIGTYPE_p_int nGCPs, SWIGTYPE_p_p_GDAL_GCP pGCPs) {
    gdalPINVOKE.Dataset_GetGCPs(swigCPtr, SWIGTYPE_p_int.getCPtr(nGCPs), SWIGTYPE_p_p_GDAL_GCP.getCPtr(pGCPs));
  }

  public int SetGCPs(int nGCPs, GCP pGCPs, string pszGCPProjection) {
    int ret = gdalPINVOKE.Dataset_SetGCPs(swigCPtr, nGCPs, GCP.getCPtr(pGCPs), pszGCPProjection);
    return ret;
  }

  public void FlushCache() {
    gdalPINVOKE.Dataset_FlushCache(swigCPtr);
  }

  public int AddBand(int datatype, SWIGTYPE_p_p_char options) {
    int ret = gdalPINVOKE.Dataset_AddBand(swigCPtr, datatype, SWIGTYPE_p_p_char.getCPtr(options));
    return ret;
  }

  public int WriteRaster(int xoff, int yoff, int xsize, int ysize, int buf_len, SWIGTYPE_p_int buf_xsize, SWIGTYPE_p_int buf_ysize, SWIGTYPE_p_int buf_type, int band_list) {
    int ret = gdalPINVOKE.Dataset_WriteRaster(swigCPtr, xoff, yoff, xsize, ysize, buf_len, SWIGTYPE_p_int.getCPtr(buf_xsize), SWIGTYPE_p_int.getCPtr(buf_ysize), SWIGTYPE_p_int.getCPtr(buf_type), band_list);
    return ret;
  }

}
