[gdal-dev] Merging tiff4 files

2011-09-02 Thread Andrea Peri
Hi, I need to merge some Tiff4 (bw) raster and obtain 1 only more big tiff4 raster. I'm try-ing this with gdal_merge.py and using a comand like this: python gdal_merge.py -o ../raster/216.tif -n 1 -ot Byte ../raster/10k/216*.tif Unfortunately the resulted raster is intellegible (the input raster

Re: [gdal-dev] Merging tiff4 files

2011-09-02 Thread Frank Warmerdam
Andrea, I think the problem is that these are one bit files with a black/white color table and by default gdal_merge.py does not copy the color table. If you add the -pct switch it should do so. I imagine the result file does have pixels with values of zero and one, but you won't see them as dif

Re: [gdal-dev] Merging tiff4 files

2011-09-02 Thread Andrea Peri
Hi Frank, thx for very rapid response. gdal_merge.py now work and the result is intellegible. testing the result , I notice the result is a 256 color image. Instead the starting image was true CCITTFax4 raster. This mean a huge dimension of files. Is possible to have a real Tiff4 (1 bit color)

Re: [gdal-dev] Merging tiff4 files

2011-09-02 Thread Etienne Tourigny
Andrea, please read the gtiff driver page at http://www.gdal.org/frmt_gtiff.html you need to add a few options, such as -co COMPRESS=CCITTFAX4 -co NBITS=1 Etienne On Fri, Sep 2, 2011 at 7:15 PM, Andrea Peri wrote: > > Hi Frank, > thx for very rapid response. > > gdal_merge.py now work and the

Re: [gdal-dev] Merging tiff4 files

2011-09-02 Thread Andrea Peri
Etienne, you are really reason. I often forgot the great powerful of the tiff driver and so forgot also to read the tiff driver page. Thx to remenber me this. Regards, 2011/9/3 Etienne Tourigny > Andrea, > > please read the gtiff driver page at http://www.gdal.org/frmt_gtiff.html > > you need

Re: [gdal-dev] Merging tiff4 files

2011-09-05 Thread aperi2007
Hi, I'm try-ing to merge some tiff4 raster. The call I'm using (thx Frank and Etienne) is these: python gdal_merge.py -o ../raster/raster_1.tif -n 0 -ot Byte -pct ../raster/raster_1/*.tif gdal_translate -co NBITS=1 -co COMPRESS=CCITTFAX4 -co TFW=YES ../raster/raster_1.tif ../raster/raster_2.ti

Re: [gdal-dev] Merging tiff4 files

2011-09-05 Thread Even Rouault
Le lundi 05 septembre 2011 09:55:52, aperi2007 a écrit : > Hi, > I'm try-ing to merge some tiff4 raster. > > The call I'm using (thx Frank and Etienne) is these: > > python gdal_merge.py -o ../raster/raster_1.tif -n 0 -ot Byte -pct > ../raster/raster_1/*.tif > gdal_translate -co NBITS=1 -co COMPR

Re: [gdal-dev] Merging tiff4 files

2011-09-05 Thread aperi2007
> Are you sure you are using a 64bit GDAL ? AFAIR, OSGeo4W is 32bit only. > Thx for response. I download the gdal 64bit version. explode it on a single folder. I use osgeo shell only as environment for python and go in the folder gdal64 to call its gdal_merge.py. I guess the libraries used was

Re: [gdal-dev] Merging tiff4 files

2011-09-05 Thread Jean-Claude Repetto
On 09/05/11 20:08, aperi2007 wrote: But gdalwarp is a tool I never will think to use for this. Is gdalwarp capable to merge raster ? According to previous messages posted on this list, gdalwarp is THE tool you must use to merge rasters. gdal_merge.py is only a demo script that has been writ