[Gdal-dev] Error Message with gdalwarp
tdobmeye at ball.com
Tue Oct 12 12:40:53 EDT 2004
Thank you for your continued help. I have gotten it set up so it can
create the file that I would like it to do. But when I try to open the
file, it says that the Drawing Failed. I am just using Windows Picture
and Fax Viewer, but it is able to show the original picture. Why is this
picture then undrawable? I typed in my line correctly.
gdal_translate -srcwin 5400 5400 9000 1800 land_shallow_topo_west.tif
Am I typing something incorrectly? Thanks again for your help.
From: Manuel Massing [mailto:m.massing at warped-space.de]
Sent: Tuesday, October 12, 2004 10:32 AM
To: Dobmeyer, Todd
Cc: gdal-dev at xserve.flids.com
Subject: Re: [Gdal-dev] Error Message with gdalwarp
> W to 60 W and from 30 N to 45 N. I converted these to pixels like you
> said and came out to my x_pixel being 37,800, my y_pixel to be 14,400,
> my x_size to 9000, and my y_size to be 1800. When I type in my
> I get this following error.
use negative longitude for western hemisphere in the formulas
(note that they only pertrain to the specific dataset you mentioned!)...
I also made a small mistake, y_pixel should be (90 - latitude)*120.
I.e. x_pixel = (-135+180)*120 = 5400
and y_pixel = (90-45)*120 = 5400.
This gives you the offset in pixels, so you have to use the -srcwin
Use -projwin for projected coordinates only (i.e., in your case
longitude+latitude). This will only work if the input file is
More information about the Gdal-dev