[gdal-dev] Re: Proposal: gdal_muladd.py

2010-02-01 Thread Jukka Rahkonen
Greg Coats mac.com> writes: > > I would prefer to obtain in one step the absolute value of the difference between two pixels, in part because > I do not see the meaning of a negative pixel value. In my example, I do not see meaning to a signed byte value > for a pixel channel being red=-51. Greg

Re: [gdal-dev] Raster algebra with Gdal and Python

2010-02-01 Thread Alexander Bruy
Hi again, with your help I've fix problem with "integer overflow" and now I get correct results. Also I clean up my code for reduce memory usage but problem with large files is remain. I have raster with size 11779*10663 and 5 bands. When I calculate NDVI on Linux box (2 Gb RAM, 2Gb swap, GDAL 1.

Re: [gdal-dev] GdalTools contour

2010-02-01 Thread Even Rouault
John, from a quick look at gdal_contour.cpp, I see it uses a float value for the contour interval, so unless there's some cast to integer at lower level in the contour generation code, it looks more like a limitation by GdalTools, and not in GDAL. Indeed another quick look at https://trac.fau

[gdal-dev] Projection of GEOTIFF in C# problems

2010-02-01 Thread Patrik Svensson
Hi all, I have problem with geotiff files created with gdal_translate when I try to read them with the C# bindings. So I tested it with the GDALInfo commands. GDALInfo.exe (The c-api) will output the correct projection information: C:\tmp\release-1500-x64-gdal-mapserver\bin>gdal\apps\GDALI

[gdal-dev] GdalTools contour

2010-02-01 Thread John C. Tull
Hi all, I noticed that the contour tool in GdalTools only accepts integers for the contour interval. Having this field accept float would be great for those of us trying to manipulate contour outputs between various units. Cheers, John___ gdal-dev mai

Re: [gdal-dev] Proposal: gdal_muladd.py

2010-02-01 Thread Greg Coats
I would prefer to obtain in one step the absolute value of the difference between two pixels, in part because I do not see the meaning of a negative pixel value. In my example, I do not see meaning to a signed byte value for a pixel channel being red=-51. Greg On Feb 1, 2010, at 3:08 AM, Antoni

[gdal-dev] Re: ogr2ogr PGSQL_OGR_FID is not work

2010-02-01 Thread Jukka Rahkonen
dlr.de> writes: > if i try the following command > > ogr2ogr -f PostgreSQL -nln newlayer -nlt MULTIPOLYGON PG:"host=localhost user=admin password=xxx > dbname=mydb" PG:"host=localhost user=admin password=yyy dbname=otherdb" oldlayer -lco PGSQL_OGR_FID=myid > > everything works fine but the pr

[gdal-dev] ogr2ogr PGSQL_OGR_FID is not work

2010-02-01 Thread Christian.Strobl
hi all, at http://n2.nabble.com/GDAL-Dev-f2022644.html i found one thread with the same problem but unfortunately no answer. http://n2.nabble.com/ogr2ogr-PGSQL-OGR-FID-is-not-work-td4026177.html#a4026177 if i try the following command ogr2ogr -f PostgreSQL -nln newlayer -nlt MULTIPOLYGON PG:

Re: [gdal-dev] Color-palette file for use in rgb2pct

2010-02-01 Thread Chaitanya kumar CH
I'm on it. On Mon, Feb 1, 2010 at 5:16 PM, Jan Hartmann wrote: > Hi Frank, could this be added to the documentation? > > Jan > > > On 1-2-2010 12:37, Frank Warmerdam wrote: > >> Luuk Schaminee wrote: >> >>> Hi, >>> >>> I am trying to convert a 24 bit RGB TIFF file to a 8 bit TIFF file. >>> Witho

Re: [gdal-dev] Color-palette file for use in rgb2pct

2010-02-01 Thread Jan Hartmann
Hi Frank, could this be added to the documentation? Jan On 1-2-2010 12:37, Frank Warmerdam wrote: Luuk Schaminee wrote: Hi, I am trying to convert a 24 bit RGB TIFF file to a 8 bit TIFF file. Without the –pct option this works perfectly but I want to control the created colors with a palett

Re: [gdal-dev] Color-palette file for use in rgb2pct

2010-02-01 Thread Frank Warmerdam
Luuk Schaminee wrote: Hi, I am trying to convert a 24 bit RGB TIFF file to a 8 bit TIFF file. Without the –pct option this works perfectly but I want to control the created colors with a palette file. So I tried the following command: rgb2pct -pct c:\color_file.txt c:\image.tif e:\new_image.ti

[gdal-dev] Color-palette file for use in rgb2pct

2010-02-01 Thread Luuk Schaminee
Hi, I am trying to convert a 24 bit RGB TIFF file to a 8 bit TIFF file. Without the –pct option this works perfectly but I want to control the created colors with a palette file. So I tried the following command: rgb2pct -pct c:\color_file.txt c:\image.tif e:\new_image.tif. I downloaded FWTools

Re: [gdal-dev] Raster algebra with Gdal and Python

2010-02-01 Thread Vincent Schut
On 01/31/2010 07:40 PM, Alexander Bruy wrote: Hi all I want to write a raster calculator and have two problems with Python and GDAL. My first problem: when calculating a difference between two raster bands I get a wrong results. Raster in ERDAS IMAGINE format (HFA) and bands extracted correctly

Re: [gdal-dev] Proposal: gdal_muladd.py

2010-02-01 Thread Antonio Valentino
Hi Greg, Il giorno Sun, 31 Jan 2010 14:58:19 -0500 Greg Coats ha scritto: > Regarding the diff function > "diff": computes the difference between 2 raster bands (b1 - b2) > Since the result of diff could be a negative number, for example > 99-150=-51, I suggest that there be an additional functi