Ghislain,<br><br>It may be counter intuitive to have smaller y-coordinate for lower <br><br><div class="gmail_quote">On Tue, Nov 2, 2010 at 12:34 AM, Ghislain Picard <span dir="ltr"><<a href="mailto:ghislain.picard@lgge.obs.ujf-grenoble.fr">ghislain.picard@lgge.obs.ujf-grenoble.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<br>
Hi All,<br>
<br>
I have an image having y-coordinate increasing in the downward
direction.<br>
To display the image, the pixel size is -1000 on the y-axis (see
ENVI header file below). This works perfectly except in gdal_merge
when use to clip the raster (using QGis GdalTools(s plugin for
instance). <br>
<br>
For instance:<br>
<p style="margin: 0px; text-indent: 0px;">gdal_merge.py -ul_lr<br>
95926.7879548 490702.415307 2036599.49812 -1014610.25721</p>
<br>
fails because the output image size calculated by gdal_merge is
negative.<br>
Inverting the y-coordinates like this:<br>
<br>
<p style="margin: 0px; text-indent: 0px;">gdal_merge.py -ul_lr<br>
95926.7879548 -1014610.25721 2036599.49812 490702.415307</p>
<br>
works but it is counter-intuitive as the lower-right point should
have a smaller y-coordinate than the upper-left point.<br>
It seems the size calculated by gdal_merge does not account for the
sign of the pixel size.<br>
<br>
Ghislain<br>
<br>
<br>
<br>
<br>
ENVI<br>
description = {<br>
File Imported into ENVI.}<br>
samples = 5601<br>
lines = 5601<br>
bands = 1<br>
header offset = 0<br>
file type = ENVI Standard<br>
data type = 4<br>
interleave = bsq<br>
sensor type = Unknown<br>
byte order = 0<br>
no data = 0<br>
wavelength units = Unknown<br>
map info = {Polar Stereographic, 1, 1, -2800500, -2800500, 1000,
-1000,WGS-84}<br>
projection info = {31, 6378137, 6356752.314245179, -71, 0, 0,
0,WGS-84, Polar Stereographic}<br>
<br>
</div>
<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></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>