public static HandleRef getCPtrAndSetReference(RasterIOExtraArg obj, object parent) { if (obj != null) { obj.swigParentRef = parent; return(obj.swigCPtr); } else { return(new HandleRef(null, IntPtr.Zero)); } }
public CPLErr WriteRaster(int xOff, int yOff, int xSize, int ySize, IntPtr buffer, int buf_xSize, int buf_ySize, DataType buf_type, int pixelSpace, int lineSpace, RasterIOExtraArg extraArg) { CPLErr ret = (CPLErr)GdalPINVOKE.Band_WriteRaster__SWIG_1(swigCPtr, xOff, yOff, xSize, ySize, buffer, buf_xSize, buf_ySize, (int)buf_type, pixelSpace, lineSpace, RasterIOExtraArg.getCPtr(extraArg)); if (GdalPINVOKE.SWIGPendingException.Pending) { throw GdalPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public CPLErr WriteRaster(int xOff, int yOff, int xSize, int ySize, double[] buffer, int buf_xSize, int buf_ySize, int pixelSpace, int lineSpace, RasterIOExtraArg extraArg) { CPLErr retval; GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); try { retval = WriteRaster(xOff, yOff, xSize, ySize, handle.AddrOfPinnedObject(), buf_xSize, buf_ySize, DataType.GDT_Float64, pixelSpace, lineSpace, extraArg); } finally { handle.Free(); } GC.KeepAlive(this); return(retval); }
public static HandleRef getCPtr(RasterIOExtraArg obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
public CPLErr ReadRaster(int xOff, int yOff, int xSize, int ySize, int[] buffer, int buf_xSize, int buf_ySize, int bandCount, int[] bandMap, int pixelSpace, int lineSpace, int bandSpace, RasterIOExtraArg extraArg) { CPLErr retval; GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); try { retval = ReadRaster(xOff, yOff, xSize, ySize, handle.AddrOfPinnedObject(), buf_xSize, buf_ySize, DataType.GDT_Int32, bandCount, bandMap, pixelSpace, lineSpace, bandSpace, extraArg); } finally { handle.Free(); } GC.KeepAlive(this); return(retval); }