[gdal-dev] Merging tiff4 files

Andrea Peri aperi2007 at gmail.com
Fri Sep 2 18:15:50 EDT 2011


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) image as result ?

Thx,

Andrea.

2011/9/2 Frank Warmerdam <warmerdam at pobox.com>

> 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 different in
> most viewers.
>
> Best regards,
>
> On Fri, Sep 2, 2011 at 2:40 PM, Andrea Peri <aperi2007 at gmail.com> wrote:
> > 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 was
> all
> > clearly visible).
> > It is an all black image :(
> >
> > I tried also with option "-n 0" but the result is the same.
> >
> > I analyze the input raster using gdalinfo, and the result is this.
> >
> > ------------------
> >>gdalinfo.exe ../raster/10k/216100.tif
> > Driver: GTiff/GeoTIFF
> > Files: ../raster/10k/216100.tif
> >        ../raster/10k/216100.tfw
> > Size is 10065, 10049
> > Coordinate System is:
> > LOCAL_CS["unnamed",
> >     UNIT["unknown",1]]
> > Origin = (1561222.860009765700000,4927094.449960937700000)
> > Pixel Size = (0.500000000000000,-0.500000000000000)
> > Metadata:
> >   AREA_OR_POINT=Point
> >   TIFFTAG_RESOLUTIONUNIT=1 (unitless)
> >   TIFFTAG_SOFTWARE=Arc/Info
> >   TIFFTAG_XRESOLUTION=2
> >   TIFFTAG_YRESOLUTION=2
> > Image Structure Metadata:
> >   COMPRESSION=CCITTFAX4
> >   INTERLEAVE=BAND
> >   MINISWHITE=YES
> > Corner Coordinates:
> > Upper Left  ( 1561222.860, 4927094.450)
> > Lower Left  ( 1561222.860, 4922069.950)
> > Upper Right ( 1566255.360, 4927094.450)
> > Lower Right ( 1566255.360, 4922069.950)
> > Center      ( 1563739.110, 4924582.200)
> > Band 1 Block=10065x32 Type=Byte, ColorInterp=Palette
> >   Image Structure Metadata:
> >     NBITS=1
> >   Color Table (RGB with 2 entries)
> >     0: 255,255,255,255
> >     1: 0,0,0,255
> > -----------------
> >
> > What am I wrong ?
> >
> > Thx,
> >
> > --
> > -----------------
> > Andrea Peri
> > . . . . . . . . .
> > qwerty àèìòù
> > -----------------
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
>
>
>
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Software Developer
>



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110903/37102228/attachment.html


More information about the gdal-dev mailing list