[gdal-dev] Re: 254 into 255

2011-10-27 Thread joolek
Yes, this is exactly what I am struggling to do. Gdal is so powerful - but I can't get it working. J On 26 Oct 2011, at 17:10, Chaitanya kumar CH [via OSGeo.org]ml-node+s1803224n6933215...@n2.nabble.com wrote: Do you want to convert just the pixels with the values (254,254,254)? On Wed,

Re: [gdal-dev] Re: 254 into 255

2011-10-27 Thread Chaitanya kumar CH
J, A vrt file[1] can implement your requirements. It can create a 'lookup table' to translate your pixel values. Start by running gdalbuildvrt on your raster file and modify it to contain the LUT element. It will look something like this: VRTDataset rasterXSize=512 rasterYSize=512

[gdal-dev] Re: 254 into 255

2011-10-27 Thread joolek
Thank you for that, really really thank you. I'll definitelly give a go. If u don't mind me asking two questions: - what do you mean by appropriate parts? - I have around 3000 files... can I batch it somehow? If so... would you be able to give me a hint how to do it? J -- View this message in

[gdal-dev] Re: 254 into 255

2011-10-27 Thread joolek
Thank you for that, really really thank you. I'll definitelly give a go. If u don't mind me asking two questions: - what do you mean by appropriate parts? - I have around 3000 files... can I batch it somehow? If so... would you be able to give me a hint how to do it? J -- View this message in

Re: [gdal-dev] Re: 254 into 255

2011-10-27 Thread Jay L.
Thanks for posting this! I had to no idea that this functionality existed. Is this documented somewhere? On Thu, Oct 27, 2011 at 4:58 AM, Chaitanya kumar CH chaitanya...@gmail.comwrote: J, A vrt file[1] can implement your requirements. It can create a 'lookup table' to translate your pixel

Re: [gdal-dev] Re: 254 into 255

2011-10-27 Thread Etienne Tourigny
You can also modify the existing val_repl.py script, which modifies a specific value found in an input dataset. You would have to modify it because it changes the values for all bands, which is different from your case, that all bands must have that value (254). The doownside is that it's a

Re: [gdal-dev] Re: 254 into 255

2011-10-27 Thread Chaitanya kumar CH
J, The example I provided is for some other raster with three bands and resolution 500x500. Please go through the GDAL Virtual Format Tutorial[1] to get acquainted with what you are doing. You can dispose off the rasterXSize, rasterYSize, ScaleOffset, ScaleRatio, SrcRect and DstRect elements. If

[gdal-dev] ogr and mdb conversion

2011-10-27 Thread Chris Green
Hi I'm trying to get to a point where I can publish an .mdb dataset on Mapserver. Having tried for nearly a week to get OGR and the PGeo driver working on Linux (and not being willing to tackle building the MDB driver which involves compiling GDAL/OGR 1.9), I decided to try and get round my

Re: [gdal-dev] ogr and mdb conversion

2011-10-27 Thread Chaitanya kumar CH
Chris, Try to convert the data to some other format using ogr2ogr. GML or Shapefile are very convenient. On Thu, Oct 27, 2011 at 7:17 PM, Chris Green chris.gr...@ibstv.co.ukwrote: Hi ** ** I’m trying to get to a point where I can publish an .mdb dataset on Mapserver. Having tried for

RE: [gdal-dev] ogr and mdb conversion

2011-10-27 Thread Chris Green
Very constructive suggestion! OGR2OGR works fine from mdb to a shape file, so the problem obviously lies in MySQL’s ability to handle certain types of feature. I will have to decide which way to go next… Much appreciated. From: Chaitanya kumar CH [mailto:chaitanya...@gmail.com]

[gdal-dev] Translating files with a external mask file

2011-10-27 Thread Travis Kirstine
I have a rgb geotiff with a external mask file rgb_withmaskfile.tif.msk, I would like to convert the files to a compressed GeoTiff using a command simalar to the one below. This command will generate a illegal band # error gdal_translate rgb_withmaskfile.tif results.tif -b 1 -b 2 -b 3 -mask 4

Re: [gdal-dev] Translating files with a external mask file

2011-10-27 Thread Chaitanya kumar CH
Travis, There might be a problem with the mask band's number. Try fiddling with it. http://www.gdal.org/gdal_translate.html On Thu, Oct 27, 2011 at 8:44 PM, Travis Kirstine traviskirst...@gmail.comwrote: I have a rgb geotiff with a external mask file rgb_withmaskfile.tif.msk, I would like to

Re: [gdal-dev] Translating files with a external mask file

2011-10-27 Thread Frank Warmerdam
On Thu, Oct 27, 2011 at 8:14 AM, Travis Kirstine traviskirst...@gmail.com wrote: I have a rgb geotiff with a external mask file rgb_withmaskfile.tif.msk, I would like to convert the files to a compressed GeoTiff using a command simalar to the one below.  This command will generate a illegal

Re: [gdal-dev] Translating files with a external mask file

2011-10-27 Thread Even Rouault
Le jeudi 27 octobre 2011 18:48:07, Frank Warmerdam a écrit : On Thu, Oct 27, 2011 at 8:14 AM, Travis Kirstine traviskirst...@gmail.com wrote: I have a rgb geotiff with a external mask file rgb_withmaskfile.tif.msk, I would like to convert the files to a compressed GeoTiff using a command

[gdal-dev] GDAL, Java and UINT16

2011-10-27 Thread Mike O'Malley
Hi- I've built GDAL 1.8.1 on Windows and used SWIG to produce the Java bindings. I've tried to run Worldwind's GDALTest application (http://worldwind31.arc.nasa.gov/svn/trunk/GDAL/GDAL-1.7.2/swig/java/app s/GDALtest.java) against a known good NITF image, but with no success. Initially,

Re: [gdal-dev] GDAL, Java and UINT16

2011-10-27 Thread Even Rouault
Le jeudi 27 octobre 2011 20:14:32, Mike O'Malley a écrit : Hi- I've built GDAL 1.8.1 on Windows and used SWIG to produce the Java bindings. I've tried to run Worldwind's GDALTest application (http://worldwind31.arc.nasa.gov/svn/trunk/GDAL/GDAL-1.7.2/swig/java/app s/GDALtest.java)