[gdal-dev] geotransform rotation and gdal_merge

David Hoese dhoese at gmail.com
Mon Jul 23 06:00:11 PDT 2012


I attempted a few small examples with GCPs and gdalwarp told me:
"ERROR 1: Failed to compute GCP transform: Transform is not solvable

I tried it with 2 GCPs at the sides from a 1x15 image array and another 
with every point's GCP defined, both failed with that error.  Sorry I 
forgot to mention this, I'll be using the python API and the data is 
provided as 3 numpy arrays, image/lat/lon. I've tried using rotation now 
then running it through gdalwarp which seems to work (although you lose 
a lot of data with the settings I was using).  And by work I mean that 
gdalwarp recognizes the rotation of the data and puts it into an 
aligned/square grid.  Another thing I may not have mentioned is that 
I'll eventually be putting this data into MapServer for WMS viewing.

If I'm not missing something, doesn't gdalwarp essentially do the same 
thing as gdal_merge.py, at least in this case?  It's even better if it 
actually uses the rotation in its calculations.

Also, I know the pixels won't be aligned exactly because the instrument 
is on an aircraft that's moving/turning.  It's more important that the 
data gets shown, not that its in the exact location.


On 7/23/12 7:02 AM, Chaitanya kumar CH wrote:
> Dave,
> The reason you have lat/lon values for each pixel is because they may 
> not be aligned exactly.
> Even though it is not very 'efficient', you have to define the GCPs 
> for each pixel with the lat/lon values of that pixel. Then you use 
> gdalwarp while forcing use of these GCPs to combine all the images.
> How are the lat/lon values stored?

More information about the gdal-dev mailing list