[FWTools] Questions about gdalwarp from fwtools-linux distribution
Frank Warmerdam
warmerdam at pobox.com
Wed Oct 10 17:21:48 EDT 2007
Giannakos Apostolos wrote:
> First in my case i want to be able to import the same input and
> reference gcps in each erdas imagine (hfa) img so as to perform
> geometric correction and then resample procedure for a great number,
> more than 300 of raw(without spatial reference) erdas images. How can i
> import my gcps in a way that i do not have to type them for each image
> when i am executing gdalwarp command?
Giannakos,
I'm not sure of a convenient way to get them from the existing binary
support files into a script that could use them with gdal_translate.
Note, you need to copy the data to a new GeoTIFF file with gdal_translate
in order to attach GCPs that can then be used by gdalwarp.
> Furthermore i did not understand what -multi option does? Is there a way
> the procedure could be automatically done?
The -multi switch is intended to do the warp in two threads in order
to try and squeeze a bit of extra performance out. It does not relate
to warping multiple images.
> I think that -srcfile
> -dstfile option limits the batch capabilities in away that for each time
> i use the gdalwarp i have to specify the input and output image. Can i
> specify input and output folder for all my images instead of this
> single and time consuming procedure?
No. You would need to write a script that can loop over the files,
and invoke the commands once for each.
If this is going to be difficult for you, then I think getting the
GCPs into the correct form is going to be essentially impractical and
that you might be best just doing this process manually with Imagine.
If you *really* want to automate things, it would be possible to write
a small program that would extract the gcps from the binary file, and
write out a .bat file or equivelent suitable to run all the files.
But the cost/effort of doing so will likely be more than the cost/effort
of just running the images manually.
I'd add that Imagine has scripting capabilities, so you might also
consider scripting it within Imagine though I don't know where one
would start with such a task.
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 | President OSGeo, http://osgeo.org
More information about the FWTools
mailing list