Esempio n. 1
0
 public static HandleRef getCPtrAndSetReference(RasterIOExtraArg obj, object parent)
 {
     if (obj != null)
     {
         obj.swigParentRef = parent;
         return(obj.swigCPtr);
     }
     else
     {
         return(new HandleRef(null, IntPtr.Zero));
     }
 }
Esempio n. 2
0
        public CPLErr WriteRaster(int xOff, int yOff, int xSize, int ySize, IntPtr buffer, int buf_xSize, int buf_ySize, DataType buf_type, int bandCount, int[] bandMap, int pixelSpace, int lineSpace, int bandSpace, RasterIOExtraArg extraArg)
        {
            CPLErr ret = (CPLErr)GdalPINVOKE.Dataset_WriteRaster__SWIG_1(swigCPtr, xOff, yOff, xSize, ySize, buffer, buf_xSize, buf_ySize, (int)buf_type, bandCount, bandMap, pixelSpace, lineSpace, bandSpace, RasterIOExtraArg.getCPtr(extraArg));

            if (GdalPINVOKE.SWIGPendingException.Pending)
            {
                throw GdalPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 3
0
        public CPLErr WriteRaster(int xOff, int yOff, int xSize, int ySize, double[] 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 = WriteRaster(xOff, yOff, xSize, ySize, handle.AddrOfPinnedObject(), buf_xSize, buf_ySize, DataType.GDT_Float64,
                                     bandCount, bandMap, pixelSpace, lineSpace, bandSpace, extraArg);
            } finally {
                handle.Free();
            }
            GC.KeepAlive(this);
            return(retval);
        }
Esempio n. 4
0
 public static HandleRef getCPtr(RasterIOExtraArg obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 5
0
        public CPLErr ReadRaster(int xOff, int yOff, int xSize, int ySize, int[] buffer, int buf_xSize, int buf_ySize, int pixelSpace, int lineSpace, 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, pixelSpace, lineSpace, extraArg);
            } finally {
                handle.Free();
            }
            GC.KeepAlive(this);
            return(retval);
        }