<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This result is not entirely unexpected, though it depends on the two
    projections. A square box in one projection will map onto something
    entirely different in many cases, often introducing skew which will
    change the aspect ratio and size of the resulting raster. If you
    view your reprojected dataset you will almost certainly find a
    skewed region surrounded by no data values.<br>
    <br>
    On 3/2/2015 9:01 AM, Robert Oehler wrote:
    <blockquote type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hi,
      <div class=""><br class="">
      </div>
      <div class="">I’m developing a raster library using GDAL. I use
        the Java bindings.</div>
      <div class=""><br class="">
      </div>
      <div class="">I would like to do a reprojection of an image which
        I have in memory.</div>
      <div class=""><br class="">
      </div>
      <div class="">I’m using an in-memory driver to create a dataset. I
        fill it with the properties of the image and its data.</div>
      <div class=""><br class="">
      </div>
      <div class="">Now I’m doing</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class="" style="margin: 0px; font-size: 11px; font-family:
          Monaco;">Dataset warped = gdal.AutoCreateWarpedVRT(ds,
          src_proj.ExportToWkt(), dst_proj.ExportToWkt());</div>
      </div>
      <div class="" style="margin: 0px; font-size: 11px; font-family:
        Monaco;"><br class="">
      </div>
      <div class="" style="margin: 0px;">but the resulting raster is
        very different from the original. (720,720 --> 635,810) while
        the resulting bounding box is correct (compared to my own
        reprojection implementation)</div>
      <div class="" style="margin: 0px;"><br class="">
      </div>
      <div class="" style="margin: 0px;">What am I doing wrong?</div>
      <div class="" style="margin: 0px;"><br class="">
      </div>
      <div class="" style="margin: 0px;">I’ve seen
        gdal.reprojectImage(..) What is the difference? Is it preferable
        in my case ?</div>
      <div class="" style="margin: 0px;"><br class="">
      </div>
      <div class="" style="margin: 0px;">Thank you</div>
      <div class=""><br class="">
        <div apple-content-edited="true" class="">
          <div class="" style="word-wrap: break-word; -webkit-nbsp-mode:
            space; -webkit-line-break: after-white-space;">
            <div class="" style="word-wrap: break-word;
              -webkit-nbsp-mode: space; -webkit-line-break:
              after-white-space;">
              <div class="" style="orphans: 2; text-align: -webkit-auto;
                widows: 2; word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space;">
                <div class="">Robert Oehler</div>
                <div class=""><br class="">
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <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>
    <br>
  </body>
</html>