[Gdal-dev] gdalwarp documentation/tutorial
fwarmerdam at gmail.com
Sun Apr 24 10:07:13 EDT 2005
On 4/24/05, Paul Surgeon <surgpub at telkomsa.net> wrote:
> A have a minor gripe about the gdal tools and it's that I can't find
> sufficient documentation or tutorials on how to use the command line
> It may be obvious to a seasoned GIS user but to someone relatively new to the
> GIS scene it's a black box and reading source files and API documentation is
> not helping me at all.
I sympathize. To be honest I also find it hard to figure out
all the parameters possible for projections. The authoritative
docs for PROJ.4 are spread over several PostScript documents
amoung other challenges.
> For starters what are all the projections that I can use in gdalwarp?
> I understand that it's using proj.4 but I can't find what command line syntax
> to use.
Well, the place to look for details docs is the PROJ.4 postscript
files, but for the more common projections I generally look at the
following list to see how they are formulated in PROJ.4 and some
> What I'm trying to do is really simple.
> I want to warp Landsat 7 ETM+ images into an unprojected format so that I can
> cut them along a lat and lon boundary and stick them through an image
> processing tool.
> I have tried :
> gdalwarp -s_srs "+proj=utm +zone=35 +datum=WGS84" -t_srs "+proj=latlong
> +datum=WGS84" input.tif output.tif
> For both I get an error message :
> ERROR 5: GDALWarpOptions.Validate()
> pfnTransformer is NULL
I tried this and it worked for me. I am suspecting that your
GDAL isn't finding PROJ.4.
> What does that error mean?
It means that GDAL was unable to instantiate a transformer,
potentially for a number of reasons.
> What is the difference between the latlon and ortho projections?
> I know that's a general GIS question.
Right, so I am tempted to avoid it. But briefly ortho projection
is as if you were looking at the earth from space, from an infinite
distance away. lat/long ... is lat/long. Plate Caree or Equirectangular
is essentially the same thing as lat/long, but scaled. Perhaps you
are thinking of that.
> I also have the accompanying "met" file with all the projection info for the
> bands but how do I get gdalwarp to read it or what must I extract out of it
> and stick in the command line?
> Is that neccessary or will the GeoTIFF header have enough info in it for
> gdalwarp to work with?
You are providing sufficient above to do the warp. If the GeoTIFF
header has the coordinate system properly, than that should be
sufficient for the input.
Coming back to the original problem, what build of GDAL are
you using? You might want to try FWTools and verify it works
with that (http://fwtools.maptools.org).
I am interested in improving the error reporting, but understand
that in an environment where folks are building and installing
the software themselves there are alot of ways that things can
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