<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body 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>
<style type="text/css">p, li { white-space: pre-wrap; }</style>
<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>
</body>
</html>