[gdal-dev] gdal_merge / negative size
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue Nov 2 03:54:02 EDT 2010
Ghislain,
It may be counter intuitive to have smaller y-coordinate for lower lines but
you will have to take the pixel size into account.
Consider what would happen if you want to stitch such images together and
you try to reverse all the y coordinates.
On Tue, Nov 2, 2010 at 12:34 AM, Ghislain Picard <
ghislain.picard at lgge.obs.ujf-grenoble.fr> wrote:
>
> Hi All,
>
> I have an image having y-coordinate increasing in the downward direction.
> 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).
>
> For instance:
>
> gdal_merge.py -ul_lr
> 95926.7879548 490702.415307 2036599.49812 -1014610.25721
>
> fails because the output image size calculated by gdal_merge is negative.
> Inverting the y-coordinates like this:
>
> gdal_merge.py -ul_lr
> 95926.7879548 -1014610.25721 2036599.49812 490702.415307
>
> works but it is counter-intuitive as the lower-right point should have a
> smaller y-coordinate than the upper-left point.
> It seems the size calculated by gdal_merge does not account for the sign of
> the pixel size.
>
> Ghislain
>
>
>
>
> ENVI
> description = {
> File Imported into ENVI.}
> samples = 5601
> lines = 5601
> bands = 1
> header offset = 0
> file type = ENVI Standard
> data type = 4
> interleave = bsq
> sensor type = Unknown
> byte order = 0
> no data = 0
> wavelength units = Unknown
> map info = {Polar Stereographic, 1, 1, -2800500, -2800500, 1000,
> -1000,WGS-84}
> projection info = {31, 6378137, 6356752.314245179, -71, 0, 0, 0,WGS-84,
> Polar Stereographic}
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101102/ed07abab/attachment.html
More information about the gdal-dev
mailing list