[gdal-dev] Warping an already georeferenced image with control
points
Frank Warmerdam
warmerdam at pobox.com
Thu Jan 29 16:26:02 EST 2009
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,
--
---------------------------------------+--------------------------------------
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