[Fwd: Re: [gdal-dev] Warping an already georeferenced image with control points

Jan Hartmann j.l.h.hartmann at uva.nl
Wed Feb 11 07:47:16 EST 2009

Sorry to keep moaning about this, but I need an indication what's going 
on here. Mind, I don't need an immediate solution: for the time being I 
have a workaround. Just an idea whether this a real problem, a dumb 
question, something that can be handled in the foreseeable future (or 
not), perhaps with adequate funding. Everything is better than talking 
to a blind wall.

Sorry again Frank,


Jan Hartmann wrote:
> No, this doesn't seem to work. Although the coordinate system *is* 
> retained when I add -a_srs to the gcps, the boundaries of the input 
> file are discarded: they are reset to the pixel dimensions of the 
> file. Is this a bug?
> Jan
> Frank Warmerdam wrote:
>> Jan Hartmann wrote:
>>> Hi,
>>> I am trying to georeference old maps in two steps: first 
>>> georeferencing them from the old projection to a modern one, and 
>>> then ameliorating the georeferenced image by rubber-sheeting it on 
>>> the base of control points, mostly triangulation points for which 
>>> the coordinates in the old and new maps are known.
>>> The second step causes trouble: if I add  control points to the 
>>> georeferenced image with gdal_translate -gcp , the projection 
>>> information gets lost.
>>> Yet, AFAICS it should be possible: if I use gdaltransform -s_srs 
>>> EPSG:28992 -t_srs EPSG:28992 -gcp ... , I can use control points 
>>> with coordinates in EPSG:28992 and get a correct transformation.
>>> So: regarding this behavior  of gdal_translate, to discard 
>>> projection information when control points are added: is it a bug or 
>>> is it the expected behavior? In the last case, how can I 
>>> rubber-sheet an already georeferenced map?
>> Jan,
>> If you use the -a_srs switch of gdal_translate in combination with the
>> -gcp switch to add gcps, the GCPs should be recorded as being in the
>> coordinate system described by -a_srs.  Because there is no reason to
>> believe that the current image coordinate system is related to the
>> coordinate system of the GCPs, no effort is made to use the existing 
>> image
>> coordinate system as the default GCP coordinate system.
>> By the way, setting GCPs with a GCP coordinate system on an image is 
>> likely
>> to not work with most GDAL supported formats, and the coordinate system
>> related aspect may also be supported in a variable fashion depending 
>> on the
>> format driver's implementation.
>> Hopefully things work well with the GeoTIFF format, which I assume 
>> you have
>> been using.
>> Best regards,
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

More information about the gdal-dev mailing list