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

2011-11-27 Thread Chaitanya kumar CH
I should have said that you need to copy all bands 'individually'. On Mon, Nov 28, 2011 at 11:35 AM, Graeme Merrall wrote: > I've discovered that he bands are determined by the args to > driver.Create() that is if I create a 4 band image then the bands are > correct, however if I'm going to copy

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

2011-11-27 Thread Graeme Merrall
I've discovered that he bands are determined by the args to driver.Create() that is if I create a 4 band image then the bands are correct, however if I'm going to copy the image chunk around using ReadAsArray and WriteArray, doesn't it mean I need to retreive each band in turn? Or have I missed som

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

2011-11-27 Thread Chaitanya kumar CH
Graeme, You do need to copy all bands. Also, make sure you set the correct number of bands while 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,

[gdal-dev] gdalinfo on win 7 64-bit

2011-11-27 Thread jdmorgan
Hello, I am running gdal on windows 7 64-bit which I installed via OSGeo4W. When I run gdalinfo on a raster GeoTiff file I get the following runtime error: RS6034 An application has made an attempt to load the C runtime library incorrectly. Any ideas one why this might be occuring, or how I

[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] Compile GDAL for x86 on an x64 machine

2011-11-27 Thread Martin Chapman
Thanks Mateusz. I figured I was doing something wrong. Your feedback is much appreciated. Marty -Original Message- From: Mateusz Łoskot [mailto:mate...@loskot.net] Sent: Saturday, November 26, 2011 6:02 PM To: Martin Chapman Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Compile

RE: [gdal-dev] Compile GDAL for x86 on an x64 machine

2011-11-27 Thread Martin Chapman
Thanks Joaquim. You are correct, I am using that bat file to configure the VC environment. I did a search and found the 32.bat file so I will try and use that. I'm glad to know someone else can do it which means I am doing something wrong which is what I figured. Thanks for your response. B

Re: [gdal-dev] Gdalinfo.exe is magic, why not bindings ?

2011-11-27 Thread Florent JITIAUX
2011/11/27 Even Rouault > > Hum, when I say *exact*, I really mean *exact* ... And what is interesting > is > the first error emitted by the SRP driver, not the last one in higher > layers. > > I don't remember all errors but the the first two errors from gdalinfo are wrong value G and wrong valu

Re: [gdal-dev] Gdalinfo.exe is magic, why not bindings ?

2011-11-27 Thread Even Rouault
Le dimanche 27 novembre 2011 11:54:03, Florent JITIAUX a écrit : > n fact in the Gdalinfo.java program or in the Gdalinfo.c, if the dataset is > null the program print the message error and call the system.exit(). > The message says there is a problem with a value (if i remember error 4) > and the

Re: [gdal-dev] Gdalinfo.exe is magic, why not bindings ?

2011-11-27 Thread Even Rouault
> > It seems to me that a datasource can be opened using a datasource > (class) method or driver (object) method. Only the first tests for the > case ds not null and error, but usually the error state is always > checked after a call to GDAL internals in the bindings. The > UseExceptions/DontUseEx

Re: [gdal-dev] Gdalinfo.exe is magic, why not bindings ?

2011-11-27 Thread Florent JITIAUX
n fact in the Gdalinfo.java program or in the Gdalinfo.c, if the dataset is null the program print the message error and call the system.exit(). The message says there is a problem with a value (if i remember error 4) and the last error is "open failed -1". The message is exactly the same with Gdal

Re: [gdal-dev] Gdalinfo.exe is magic, why not bindings ?

2011-11-27 Thread Ari Jolma
On 11/26/2011 06:55 PM, Even Rouault wrote: Le samedi 26 novembre 2011 14:21:35, Florent JITIAUX a écrit : Hi, first thanks for all tools and bidings. I have a question about Gdalinfo.exe and gdal binding programs. I have an USRP map but with some fields errors. When i try to load it with the