Re: [gdal-dev] Value Error While Writing the File in Chunks

2014-11-23 Thread Simen Langseth
Even Rouault, Thank you! Now the program is working. On Mon, Nov 24, 2014 at 2:15 AM, Even Rouault wrote: > Le dimanche 23 novembre 2014 17:04:05, Simen Langseth a écrit : > > import gdal, numpy as np > > from gdalconst import * > > > > infile = r"D:\given.tif" > > inraster = gdal.Open(infile, G

Re: [gdal-dev] Value Error While Writing the File in Chunks

2014-11-23 Thread Even Rouault
Le dimanche 23 novembre 2014 17:04:05, Simen Langseth a écrit : > import gdal, numpy as np > from gdalconst import * > > infile = r"D:\given.tif" > inraster = gdal.Open(infile, GA_ReadOnly) > x_total,y_total=refraster.RasterXSize,refraster.RasterYSize > n_chunks=10 > x_offsets=np.linspace(0,x_tota

[gdal-dev] Value Error While Writing the File in Chunks

2014-11-23 Thread Simen Langseth
import gdal, numpy as np from gdalconst import * infile = r"D:\given.tif" inraster = gdal.Open(infile, GA_ReadOnly) x_total,y_total=refraster.RasterXSize,refraster.RasterYSize n_chunks=10 x_offsets=np.linspace(0,x_total,n_chunks).astype(int) x_offsets=zip(x_offsets[:-1],x_offsets[1:]) y_offsets=np