<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="Times New Roman, Times, serif">Thanks Trent, I tried it
      out:<br>
      <br>
      original:                          3.886.894.126b<br>
      compressed DEFLATE:    266.046.034b<br>
      compressed LZW:             372.085.756b<br>
      compressed JPEG:             90.055.344b<br>
      <br>
      Although DEFLATE and LZW give very good results, JPEG compression
      is so much better that I need to go for it. The base raster is the
      cadastral map of Amsterdam in 1832 with a resolution of 30 cm.
      This is only the low-resolution scan, the base scan has a
      resolution of 15 cm, slightly better than Google Satellite. We are
      trying to set things up for the whole of the Netherlands, and with
      this sort of precision even a small country generates an awful lot
      of raster scans, and needs unbelievable amounts of processing,
      even with the Cloud system we have available now.<br>
      <br>
      That means, I'll have to clip the maps. It can be done as Dmitry
      suggested (gdalwarp -cutline), or alternatively using
      gdal-rasterize. I do have the bounding polygons. It can also be
      done with nearblack, as Even suggested. I guess the last method
      will take somewhat more time, as the area of the map has to be
      computed.<br>
      <br>
      Thanks for all your suggestions, they made me see where the
      problem lies. And a happy New Year to all.<br>
      <br>
      Jan<br>
       <br>
    </font>
    <div class="moz-cite-prefix">On 12/27/2012 05:18 PM, Hare, Trent
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAB6t5t-tnvv71VaCSHwew0vFb30eXLrdyf2zHQ8FPcekv=2fGg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Jan,
      <div>   Jpeg is a lossy compression and thus the collar will not
        be maintained perfectly as black (or 0). You will not get as
        much compression, but you can try a lossless method like LZW or
        Packbits. If you are getting close to the 4GB limit you might
        need to add "-co bigtiff=if_safer".</div>
      <div><br>
      </div>
      <div>Good luck,</div>
      <div>Trent</div>
      <div><br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Dec 27, 2012 at 5:38 AM, Jan
          Hartmann <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:j.l.h.hartmann@uva.nl" target="_blank">j.l.h.hartmann@uva.nl</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> <font face="Times
                New Roman, Times, serif">Can anyone tell me wath is
                happening here? I have a large three-band raster (3.8G)
                looking like this:</font><br>
              <br>
              <font face="Times New Roman, Times, serif"><a
                  moz-do-not-send="true"
                  href="http://mapserver.sara.nl/map2a.png"
                  target="_blank">http://mapserver.sara.nl/map2a.png</a></font><br>
              <br>
              <font face="Times New Roman, Times, serif">I compress it
                (from information from this list a few days ago) with:<br>
                <br>
                gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR
                big.tif small.tif<br>
                gdaladdo --config COMPRESS_OVERVIEW JPEG --config
                PHOTOMETRIC_OVERVIEW YCBCR -ro -r gauss small.tif 2 4 8
                16 32 64<br>
                <br>
                and get a file of 37M, which is nice. However, the map
                has all kinds of rubbish at the borders. It looks like
                this:<br>
                <br>
                <a moz-do-not-send="true"
                  href="http://mapserver.sara.nl/map2b.png"
                  target="_blank">http://mapserver.sara.nl/map2b.png</a><br>
                <br>
                The equivalent pictures of a small part of the map look
                like this:<br>
                <br>
                <a moz-do-not-send="true"
                  href="http://mapserver.sara.nl/map1a.png"
                  target="_blank">http://mapserver.sara.nl/map1a.png</a><br>
                <a moz-do-not-send="true"
                  href="http://mapserver.sara.nl/map1b.png"
                  target="_blank">http://mapserver.sara.nl/map1b.png</a>
                <br>
                <br>
                Can anyone help me?<span class="HOEnZb"><font
                    color="#888888"><br>
                    <br>
                    Jan<br>
                  </font></span></font> </div>
            <br>
            _______________________________________________<br>
            gdal-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
              target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>