Etienne,<br>you are really reason.<br><br>I often forgot the great powerful of the tiff driver and so forgot also to read the tiff driver page.<br><br>Thx to remenber me this.<br><br>Regards,<br><br><div class="gmail_quote">
2011/9/3 Etienne Tourigny <span dir="ltr"><<a href="mailto:etiennesky.dev@gmail.com">etiennesky.dev@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Andrea,<br>
<br>
please read the gtiff driver page at <a href="http://www.gdal.org/frmt_gtiff.html" target="_blank">http://www.gdal.org/frmt_gtiff.html</a><br>
<br>
you need to add a few options, such as -co COMPRESS=CCITTFAX4 -co NBITS=1<br>
<font color="#888888"><br>
Etienne<br>
</font><div><div></div><div class="h5"><br>
On Fri, Sep 2, 2011 at 7:15 PM, Andrea Peri <<a href="mailto:aperi2007@gmail.com">aperi2007@gmail.com</a>> wrote:<br>
><br>
> Hi Frank,<br>
> thx for very rapid response.<br>
><br>
> gdal_merge.py now work and the result is intellegible.<br>
><br>
> testing the result ,<br>
> I notice the result is a 256 color image.<br>
><br>
> Instead the starting image was true CCITTFax4 raster.<br>
> This mean a huge dimension of files.<br>
><br>
> Is possible to have a real Tiff4 (1 bit color) image as result ?<br>
><br>
> Thx,<br>
><br>
> Andrea.<br>
><br>
> 2011/9/2 Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>><br>
>><br>
>> Andrea,<br>
>><br>
>> I think the problem is that these are one bit files with<br>
>> a black/white color table and by default gdal_merge.py<br>
>> does not copy the color table. If you add the -pct<br>
>> switch it should do so.<br>
>><br>
>> I imagine the result file does have pixels with values of<br>
>> zero and one, but you won't see them as different in<br>
>> most viewers.<br>
>><br>
>> Best regards,<br>
>><br>
>> On Fri, Sep 2, 2011 at 2:40 PM, Andrea Peri <<a href="mailto:aperi2007@gmail.com">aperi2007@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> > I need to merge some Tiff4 (bw) raster and obtain 1 only more big tiff4<br>
>> > raster.<br>
>> ><br>
>> > I'm try-ing this with gdal_merge.py<br>
>> > and using a comand like this:<br>
>> ><br>
>> > python gdal_merge.py -o ../raster/216.tif -n 1 -ot Byte<br>
>> > ../raster/10k/216*.tif<br>
>> ><br>
>> > Unfortunately the resulted raster is intellegible (the input raster was all<br>
>> > clearly visible).<br>
>> > It is an all black image :(<br>
>> ><br>
>> > I tried also with option "-n 0" but the result is the same.<br>
>> ><br>
>> > I analyze the input raster using gdalinfo, and the result is this.<br>
>> ><br>
>> > ------------------<br>
>> >>gdalinfo.exe ../raster/10k/216100.tif<br>
>> > Driver: GTiff/GeoTIFF<br>
>> > Files: ../raster/10k/216100.tif<br>
>> > ../raster/10k/216100.tfw<br>
>> > Size is 10065, 10049<br>
>> > Coordinate System is:<br>
>> > LOCAL_CS["unnamed",<br>
>> > UNIT["unknown",1]]<br>
>> > Origin = (1561222.860009765700000,4927094.449960937700000)<br>
>> > Pixel Size = (0.500000000000000,-0.500000000000000)<br>
>> > Metadata:<br>
>> > AREA_OR_POINT=Point<br>
>> > TIFFTAG_RESOLUTIONUNIT=1 (unitless)<br>
>> > TIFFTAG_SOFTWARE=Arc/Info<br>
>> > TIFFTAG_XRESOLUTION=2<br>
>> > TIFFTAG_YRESOLUTION=2<br>
>> > Image Structure Metadata:<br>
>> > COMPRESSION=CCITTFAX4<br>
>> > INTERLEAVE=BAND<br>
>> > MINISWHITE=YES<br>
>> > Corner Coordinates:<br>
>> > Upper Left ( 1561222.860, 4927094.450)<br>
>> > Lower Left ( 1561222.860, 4922069.950)<br>
>> > Upper Right ( 1566255.360, 4927094.450)<br>
>> > Lower Right ( 1566255.360, 4922069.950)<br>
>> > Center ( 1563739.110, 4924582.200)<br>
>> > Band 1 Block=10065x32 Type=Byte, ColorInterp=Palette<br>
>> > Image Structure Metadata:<br>
>> > NBITS=1<br>
>> > Color Table (RGB with 2 entries)<br>
>> > 0: 255,255,255,255<br>
>> > 1: 0,0,0,255<br>
>> > -----------------<br>
>> ><br>
>> > What am I wrong ?<br>
>> ><br>
>> > Thx,<br>
>> ><br>
>> > --<br>
>> > -----------------<br>
>> > Andrea Peri<br>
>> > . . . . . . . . .<br>
>> > qwerty àèìòù<br>
>> > -----------------<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > gdal-dev mailing list<br>
>> > <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> ---------------------------------------+--------------------------------------<br>
>> I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
>> light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
>> and watch the world go round - Rush | Geospatial Software Developer<br>
><br>
><br>
><br>
> --<br>
> -----------------<br>
> Andrea Peri<br>
> . . . . . . . . .<br>
> qwerty àèìòù<br>
> -----------------<br>
><br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br><br>