Re: [gdal-dev] Clipping an image via Python API problems

2011-11-28 Thread Graeme Merrall
Excellent. Thanks folks for your helpful replies Cheers, Graeme On Tue, Nov 29, 2011 at 6:01 AM, Even Rouault wrote: > Le lundi 28 novembre 2011 07:44:26, Chaitanya kumar CH a écrit : > > I should have said that you need to copy all bands 'individually'. > > Well, ReadAsArary() and WriteArray()

Re: [gdal-dev] Clipping an image via Python API problems

2011-11-27 Thread Graeme Merrall
creating the destination dataset. > > Color interpretation is useful when you have multiple bands. If you want > to show your image in red, set it to GCI_PaletteIndex and set a colortable. > > On Mon, Nov 28, 2011 at 6:40 AM, Graeme Merrall wrote: > >> The smallest almost w

[gdal-dev] Clipping an image via Python API problems

2011-11-27 Thread Graeme Merrall
The smallest almost working code chunk I have right now is below. This is taaking a 40k by 40k and pulling out the top left quarter. The original has 4 bands - RGBA from osgeo import gdal import numpy img = gdal.Open("original.tif") geotransform = img.GetGeoTransform() band1 = img.GetRasterBand(

Re: [gdal-dev] gdal_contour stuck in processing?

2011-10-23 Thread Graeme Merrall
You can download it from http://dl.dropbox.com/u/5657619/dtm.tif Only 9.6Mb Cheers, Graeme On Mon, Oct 24, 2011 at 3:02 PM, Chaitanya kumar CH wrote: > Graeme, > > Can you provide a small sample image for testing? > > > On Mon, Oct 24, 2011 at 9:20 AM, Graeme Merrall wrot

Re: [gdal-dev] gdal_contour stuck in processing?

2011-10-23 Thread Graeme Merrall
Correction, the cmdline was "gdal_contour -a ELEL -i 10.0 dtm.tif dtm-10m.shp" On Mon, Oct 24, 2011 at 1:58 PM, Graeme Merrall wrote: > Apologies for the delay in replying. > > I ran the same command with 10m spacing "gdal_contour -a ELEL -i 1.0 > dtm.tif dtm-

Re: [gdal-dev] gdal_contour stuck in processing?

2011-10-23 Thread Graeme Merrall
raeme, > > Can you try again with a much larger interval? > > On Thu, Oct 13, 2011 at 6:32 AM, Graeme Merrall wrote: > >> I'm trying out gdal_contour just to see what falls out of it as an >> experiment. I've noticed it seems to get to "0.." e.g. 7%

[gdal-dev] gdal_contour stuck in processing?

2011-10-12 Thread Graeme Merrall
I'm trying out gdal_contour just to see what falls out of it as an experiment. I've noticed it seems to get to "0.." e.g. 7% or so, and then seems to hang. I'm trying it on a relatively small DTM The cmdline is pretty simple "gdal_contour -a ELEL -i 1.0 dtm_11072101.tif dtm-1m.shp" and gdalinf