[Gdal-dev] gdalwarp should keep prj info (?)

Matt Wilkie matt.wilkie at gov.yk.ca
Thu Feb 1 17:18:47 EST 2007


Hi All,

Currently gdalwarp drops the projection info if it is not specifically
assigned. I think it should either keep all projection info unless 
directed otherwise, or, have an option to retain it.

Eg.

gdalwarp inimg.tif outimg.tif ---> keeps prj
gdalwarp -t_srs SAME inimg.tif outimg.tif ---> keeps prj
gdalwarp -t_srs NONE inimg.tif outimg.tif ---> drops prj
gdalwarp -t_srs [a proj4 string] inimg.tif outimg.tif ---> transforms to 
new prj

http://bugzilla.remotesensing.org/show_bug.cgi?id=1471

Why is this an issue? One could reasonably wonder why use gdalwarp 
unless one IS going to perform a transform. It does have the name WARP 
after all. Well, gdalwarp has these handy options that other commands 
like gdal_translate do not have. For instance I like being able to 
convert values to nodata in the output:

    gdalwarp -srcnodata 148 -dstnodat 255 ...

Or resample using desired pixel dimensions in map units rather than row 
and column dimensions, and perhaps use cubic spline resampling :

    gdalwarp -tr 250 -rcs ...

Or control the megabytes of ram to use:

    gdalwarp -wo 500 ...

So maybe the real request is that there be more shared functions between 
the two. Or perhaps they shouldn't be two separate programs at all, just 
a single one called "gdal". (?)


-- 
matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------




More information about the Gdal-dev mailing list