[Gdal-dev] gdalwarp, using GCPs with pixel positions outside
the input image
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 22 09:21:31 EDT 2004
Chris Campbell wrote:
>
>> I think your approach is correct and the problem is likely due to
>> inaccuracies and differing round-off errors in the polynomial calculation
>> code. What order polynmomial are you using? In general I am not
>> impressed
>> with the numerical quality of the GDAL polynomial solver and transformer.
>
>
> I see... I am using order = 1.
Chris,
Well, it is hard to imagine that first order would have significant
computational difference based on a shift. This should be the most
stable case.
> I thought this might be pointed out :)
> The scalability problem is not with gdal but with the generation
> process, which needs more than a reasonable amount of memory to generate
> a 50,000x50,000 pixel image. I can generate it in smaller tiles and then
> join these together in a much less memory demanding way and then warp,
> but it takes a long time and a lot of redundant disk space until I can
> finally get a look at some rectified output.
> I don't know too much about these kind of matrices, but is it possible
> to calculate the transformation coefficients using the original set of
> GCPs and then alter some values in the matrix to get a desired pixel
> offset?
Of course it is, in theory, possible to do this. But it is the nature of
object encapsulation that makes this somewhat hard to accomplish in practice.
Note that the matrix is never stored anywhere. It is generated in memory from
the GCPs by gdalwarp. You could write an altered gdalwarp that uses a under
defined transformation that takes care of applying offsets before in turn
calling the normal GCP based transformer, but this would require a bunch of
programming.
All told though, I am surprised you are even running into a noticable problem.
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