<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 12/05/13 16:39, Vincent Schut wrote:<br>
    <blockquote cite="mid:52A09E16.9070105@sarvision.nl" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      On 12/05/13 16:21, Ammar wrote:<br>
      <blockquote
        cite="mid:1386256870.1521.YahooMailNeo@web163004.mail.bf1.yahoo.com"
        type="cite">
        <div style="color:#000; background-color:#fff;
          font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
          Lucida Grande, sans-serif;font-size:12pt">Hello list,
          <div style="font-family: HelveticaNeue, Helvetica Neue,
            Helvetica, Arial, Lucida Grande, sans-serif; font-size:
            12pt;">
            <div style="font-family: HelveticaNeue, Helvetica Neue,
              Helvetica, Arial, Lucida Grande, sans-serif; font-size:
              12pt;">
              <div class="y_msg_container">
                <div id="yiv9098566702">
                  <div class="yiv9098566702yqt8543993028"
                    id="yiv9098566702yqtfd63070">
                    <div>
                      <div
                        style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                        Helvetica Neue, Helvetica, Arial, Lucida Grande,
                        sans-serif;font-size:12pt;">
                        <div style="font-family:HelveticaNeue, Helvetica
                          Neue, Helvetica, Arial, Lucida Grande,
                          sans-serif;font-size:12pt;">
                          <div style="font-family:HelveticaNeue,
                            Helvetica Neue, Helvetica, Arial, Lucida
                            Grande, sans-serif;font-size:12pt;">
                            <div class="yiv9098566702y_msg_container">
                              <div id="yiv9098566702">
                                <div>
                                  <div
                                    style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                                    Helvetica Neue, Helvetica, Arial,
                                    Lucida Grande,
                                    sans-serif;font-size:12pt;">
                                    <div
                                      style="font-family:HelveticaNeue,
                                      Helvetica Neue, Helvetica, Arial,
                                      Lucida Grande,
                                      sans-serif;font-size:12pt;">
                                      <div
                                        style="font-family:HelveticaNeue,
                                        Helvetica Neue, Helvetica,
                                        Arial, Lucida Grande,
                                        sans-serif;font-size:12pt;">
                                        <div
                                          class="yiv9098566702y_msg_container">
                                          <div id="yiv9098566702">
                                            <div>
                                              <div
                                                style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                                                Helvetica Neue,
                                                Helvetica, Arial, Lucida
                                                Grande,
                                                sans-serif;font-size:12pt;">
                                                <div><br clear="none">
                                                </div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;">I
                                                  am new to GDAL and I
                                                  have been using the
                                                  utilities to process
                                                  and prepare TIFF  to
                                                  create a mosaic in
                                                  Geoserver. I am
                                                  expermineting with
                                                  different compression
                                                  methods and I have
                                                  noticed that after
                                                  compressing a file
                                                  with LZW, the
                                                  previously created
                                                  tiles and overviews
                                                  disappear!<br
                                                    clear="none">
                                                </div>
                                                <div> what I did was:</div>
                                                <div><br clear="none">
                                                </div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;">gdal_translate

                                                  -a_srs "EPSG:3011" -co
                                                  "TILED=YES" -co
                                                  "BLOCKXSIZE=512" -co
                                                  "BLOCKYSIZE=512"
                                                  in.tif out.tif<span
                                                    class="yiv9098566702tab">
                                                  </span><br
                                                    clear="none">
                                                </div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><br
                                                    clear="none">
                                                </div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;">gdaladdo

                                                  -r average file.tif 2
                                                  4 8 16 32<span
                                                    class="yiv9098566702tab">   

                                                    //Adding the
                                                    overviews</span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><br
                                                    clear="none">
                                                  <span
                                                    class="yiv9098566702tab"></span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><span
class="yiv9098566702tab">gdal_translate -co compress=LZW in.tif out.tif</span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><br
                                                    clear="none">
                                                  <span
                                                    class="yiv9098566702tab"></span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><span
style="font-weight:bold;"><span class="yiv9098566702tab">After the
                                                      compression, I got
                                                      the original block
                                                      size and with no
                                                      overviews!</span></span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><br
                                                    clear="none">
                                                  <span
                                                    class="yiv9098566702tab"></span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><span
class="yiv9098566702tab">Any ideas, thoughts or tips will be
                                                    appreciated.</span></div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      <br>
      Hello Ammar,<br>
      <br>
      the default for gdal_translate is no tiling, no compression, and
      don't copy overviews. So your last gdal_translate command
      effectively removes all tiling, overviews and compression. If you
      want to have a tiled and compressed file, add the '-co
      compress=lzw" to your first gdal_translate command, which will
      create a tiled and compressed 'out.tif'. Then add overviews to
      that with gdaladdo. If I'm not mistaken, the overviews use the
      settings from the main dataset, so would also use lzw compression.<br>
      <br>
      Best,<br>
      Vincent Schut.<br>
    </blockquote>
    <br>
    Correction: that should of course read: "So your last gdal_translate
    command effectively removes all tiling and overviews, while adding
    lzw compression."<br>
    <blockquote cite="mid:52A09E16.9070105@sarvision.nl" type="cite">
      <blockquote
        cite="mid:1386256870.1521.YahooMailNeo@web163004.mail.bf1.yahoo.com"
        type="cite">
        <div style="color:#000; background-color:#fff;
          font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
          Lucida Grande, sans-serif;font-size:12pt">
          <div style="font-family: HelveticaNeue, Helvetica Neue,
            Helvetica, Arial, Lucida Grande, sans-serif; font-size:
            12pt;">
            <div style="font-family: HelveticaNeue, Helvetica Neue,
              Helvetica, Arial, Lucida Grande, sans-serif; font-size:
              12pt;">
              <div class="y_msg_container">
                <div id="yiv9098566702">
                  <div class="yiv9098566702yqt8543993028"
                    id="yiv9098566702yqtfd63070">
                    <div>
                      <div
                        style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                        Helvetica Neue, Helvetica, Arial, Lucida Grande,
                        sans-serif;font-size:12pt;">
                        <div style="font-family:HelveticaNeue, Helvetica
                          Neue, Helvetica, Arial, Lucida Grande,
                          sans-serif;font-size:12pt;">
                          <div style="font-family:HelveticaNeue,
                            Helvetica Neue, Helvetica, Arial, Lucida
                            Grande, sans-serif;font-size:12pt;">
                            <div class="yiv9098566702y_msg_container">
                              <div id="yiv9098566702">
                                <div>
                                  <div
                                    style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                                    Helvetica Neue, Helvetica, Arial,
                                    Lucida Grande,
                                    sans-serif;font-size:12pt;">
                                    <div
                                      style="font-family:HelveticaNeue,
                                      Helvetica Neue, Helvetica, Arial,
                                      Lucida Grande,
                                      sans-serif;font-size:12pt;">
                                      <div
                                        style="font-family:HelveticaNeue,
                                        Helvetica Neue, Helvetica,
                                        Arial, Lucida Grande,
                                        sans-serif;font-size:12pt;">
                                        <div
                                          class="yiv9098566702y_msg_container">
                                          <div id="yiv9098566702">
                                            <div>
                                              <div
                                                style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                                                Helvetica Neue,
                                                Helvetica, Arial, Lucida
                                                Grande,
                                                sans-serif;font-size:12pt;">
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><br
                                                    clear="none">
                                                  <span
                                                    class="yiv9098566702tab"></span></div>
                                                <div style="color:rgb(0,
                                                  0,
                                                  0);font-size:16px;font-family:HelveticaNeue,
                                                  Helvetica Neue,
                                                  Helvetica, Arial,
                                                  Lucida Grande,
                                                  sans-serif;background-color:transparent;font-style:normal;"><span
class="yiv9098566702tab">//Ammar<br clear="none">
                                                  </span></div>
                                              </div>
                                            </div>
                                          </div>
                                          <br clear="none">
                                          <br clear="none">
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br clear="none">
                              <br clear="none">
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <br>
                <br>
              </div>
            </div>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
gdal-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>