[Gdal-dev] Image Reprojection
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 3 13:12:33 EST 2003
Matt Lynch wrote:
> Hi Frank,
>
> The gdalwarptest sounds interesting. To get an orientation I have built
> GDAL (the cleanest open source build on a windows box in a long time, by
> the way!).
>
> When I try to run gdalwarp I just get a usage blurb.
> ------------------------------------------------------------------------
> -----------------
> C:\gdal>gdalwarp -t_srs '+proj=latlong +datum=WGS84' jeffpan2000_10m.tif
> out.tif
>
> Usage: gdalwarp [--version] [--formats]
> [-s_srs srs_def] [-t_srs srs_def] [-order n] [-et err_threshold]
> [-te xmin ymin xmax ymax] [-tr xres yres] [-ts width height]
> [-of format] [-co "NAME=VALUE"]* srcfile dstfile
> ------------------------------------------------------------------------
> -----------------
>
> jeffpan2000_10m.tif is in the current directory
> out.tif does not exist yet.
Matt,
I believe this is a commandline parsing issue. The '+proj=latlong +datum=WGS84'
would be parsed as a single argument by a Unix shell, but the DOS shell doesn't
work the same. I can think of three likely solutions:
o Relink stuff with the SETARGV.OBJ file (see nmake.opt file for some
discussion of this) to get more unix like argument parsing. But this might
only do wildcarding and not quoting. I am unsure.
o Use the Cygwin (http://www.cygwin.com) shell as your shell. It provides
Unix style commandline parsing as well as lots of other stuff.
o Put the coordinate system definition into a file, and refer to that.
Put "+proj=latlong +datum=WGS84" in a file called wgs84.proj4 (without any
quotes) and then use the command:
gdalwarp -t_srs .\wgs84.proj4 jeffpan2000_10m.tif out.tif
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list