public static string[] ReadDirRecursive(string utf8_path) { /* %typemap(csout) char** CSL */ IntPtr cPtr = GdalPINVOKE.ReadDirRecursive(Gdal.StringToUtf8Bytes(utf8_path)); IntPtr objPtr; int count = 0; if (cPtr != IntPtr.Zero) { while (Marshal.ReadIntPtr(cPtr, count * IntPtr.Size) != IntPtr.Zero) { ++count; } } string[] ret = new string[count]; if (count > 0) { for (int cx = 0; cx < count; cx++) { objPtr = System.Runtime.InteropServices.Marshal.ReadIntPtr(cPtr, cx * System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr))); ret[cx] = (objPtr == IntPtr.Zero) ? null : System.Runtime.InteropServices.Marshal.PtrToStringAnsi(objPtr); } } if (cPtr != IntPtr.Zero) { GdalPINVOKE.StringListDestroy(cPtr); } if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static void FileFromMemBuffer(string utf8_path, int nBytes, IntPtr pabyData) { GdalPINVOKE.FileFromMemBuffer(Gdal.StringToUtf8Bytes(utf8_path), nBytes, pabyData); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } }
public static void PushFinderLocation(string utf8_path) { GdalPINVOKE.PushFinderLocation(Gdal.StringToUtf8Bytes(utf8_path)); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } }
public CPLErr Delete(string utf8_path) { CPLErr ret = (CPLErr)GdalPINVOKE.Driver_Delete(swigCPtr, Gdal.StringToUtf8Bytes(utf8_path)); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static IntPtr VSIFOpenL(string utf8_path, string pszMode) { IntPtr ret = GdalPINVOKE.VSIFOpenL(Gdal.StringToUtf8Bytes(utf8_path), pszMode); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static int Rmdir(string utf8_path) { int ret = GdalPINVOKE.Rmdir(Gdal.StringToUtf8Bytes(utf8_path)); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static string FindFile(string pszClass, string utf8_path) { string ret = GdalPINVOKE.FindFile(pszClass, Gdal.StringToUtf8Bytes(utf8_path)); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Dataset CreateCopy(string utf8_path, Dataset src, int strict, string[] options, Gdal.GDALProgressFuncDelegate callback, string callback_data) { IntPtr cPtr = GdalPINVOKE.Driver_CreateCopy(swigCPtr, Gdal.StringToUtf8Bytes(utf8_path), Dataset.getCPtr(src), strict, (options != null)? new GdalPINVOKE.StringListMarshal(options)._ar : null, callback, callback_data); Dataset ret = (cPtr == IntPtr.Zero) ? null : new Dataset(cPtr, true, ThisOwn_true()); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Dataset Create(string utf8_path, int xsize, int ysize, int bands, DataType eType, string[] options) { IntPtr cPtr = GdalPINVOKE.Driver_Create(swigCPtr, Gdal.StringToUtf8Bytes(utf8_path), xsize, ysize, bands, (int)eType, (options != null)? new GdalPINVOKE.StringListMarshal(options)._ar : null); Dataset ret = (cPtr == IntPtr.Zero) ? null : new Dataset(cPtr, true, ThisOwn_true()); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Driver IdentifyDriver(string utf8_path, string[] papszSiblings) { IntPtr cPtr = GdalPINVOKE.IdentifyDriver(Gdal.StringToUtf8Bytes(utf8_path), (papszSiblings != null)? new GdalPINVOKE.StringListMarshal(papszSiblings)._ar : null); Driver ret = (cPtr == IntPtr.Zero) ? null : new Driver(cPtr, false, ThisOwn_false()); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Dataset OpenShared(string utf8_path, Access eAccess) { IntPtr cPtr = GdalPINVOKE.OpenShared(Gdal.StringToUtf8Bytes(utf8_path), (int)eAccess); Dataset ret = (cPtr == IntPtr.Zero) ? null : new Dataset(cPtr, true, ThisOwn_true()); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static Dataset OpenEx(string utf8_path, uint nOpenFlags, string[] allowed_drivers, string[] open_options, string[] sibling_files) { IntPtr cPtr = GdalPINVOKE.OpenEx(Gdal.StringToUtf8Bytes(utf8_path), nOpenFlags, (allowed_drivers != null)? new GdalPINVOKE.StringListMarshal(allowed_drivers)._ar : null, (open_options != null)? new GdalPINVOKE.StringListMarshal(open_options)._ar : null, (sibling_files != null)? new GdalPINVOKE.StringListMarshal(sibling_files)._ar : null); Dataset ret = (cPtr == IntPtr.Zero) ? null : new Dataset(cPtr, true, ThisOwn_true()); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }