[gdal-dev] Rectify TIFF: Difference between applied GCP and warped image

Peter Halls p.halls at york.ac.uk
Fri Apr 15 02:04:16 PDT 2016


Jukka, Richard,

        firstly, ESRI contracted the late John P Snyder, from USGS, to
design and initially implement their projection tools.  The team now
maintaining and developing this code has a highly respected pedigree.
Whilst mistakes *do* happen, I think the ESRI code will most likely be
reliable.  There may, of course, be issues of usage.

        There are a number of potential factors that also require
consideration - some PC chipsets, for example, are still reputably
unreliable for floating point maths!  I would, however, expect such to
affect both approaches equally and so, effectively, to cancel out.

         I am intrigued by the choice of Second Order polynomial.  The vast
majority of users do not need to consider such usage, so I guess a question
for Richard is why - and whether he has bibliography (or a suitable DEM)
supporting this choice for his context.  Back in the days when it was
deemed necessary for me to teach students the projection maths, I used to
give them a 3rd order equation and an aerial photograph for which one
specific area had just one GCP: the result was that this area was extruded
from the main image in a rather dramatic fashion (it was visually fine with
a First Order and nothing like as dramatic with a Second Order polynomial.
To 'lose' data, as you describe, suggests that this portion is computing to
NODATA: possibly indicating a GCP coding error.  I think it would be
sensible to back off this part of the specification for now, to see what
impact it is having.

        Lastly, for now, how are your GCPs arranged?  Do you have the
'standard five' of some introductory texts (eg four corners and centre)?
Or do you have a more dense pattern?  Are you using elevation control?  If
so, how does this relate to your GCPs (do your GCPs define breaks of slope,
for example)?

        An excellent text, with well explained equations, for your purposes
may be "Map Projection Transformation: Principles and Applications" by Qihe
Yang, John P Snyder and Waldo R Tobler and published by Taylor & Francis in
2000.   Snyder's introductions to map projections are generally available
for download from USGS.

Enjoy!

Peter

On 15 April 2016 at 08:27, Jukka Rahkonen <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Bischof, Richard <Richard.Bischof <at> lgln.niedersachsen.de> writes:
>
> >
> > Hi Jukka,
> >
> > you're correct. ArcMap is doing the on-the-fly transformation with the
> dataset, I applied the gcps using
> > gdal_translate to.
> > With both gdal_warp and ArcMap Rectify I use second order polynomial.
> >
> > I also found, that some areas of my source image are cut out from the
> gdal_warp destination dataset.
> >
>
> Hi,
>
> I can't really help you but because I do not understand warping algorithms.
> If ArcMap and GDAL makes different output with 2nd order polynomial and
> with
> the same gcp set I can see three alternatives:
>
> 1) GDAL is wrong
> 2) ArcMap is wrong
> 3) There are different interpretations about what should happen and both
> are
> right, or wrong.
>
> I suppose that what GDAL is doing is written in
> https://trac.osgeo.org/gdal/browser/trunk/gdal/alg/gdaltransformer.cpp
> I fear we do not have the code used by ArcMap available for making a
> comparison.
>
> Can you simplify the case into a question like:
> With this gcp set, applied to an image of sixe xxx(W) by yyy(H) pixels,
> after 2nd order polynomial transformation with GDAL the source pixel (x1,
> y1) is moved into location (x2, y2) in pixel space, and (xxx(E), yyy(N)) in
> projected cooordinates in EPSG:xxxx.
>
> ArcMap moves this pixel into (x2', y2') (xxx'(E), yyy'(N)) and I think than
> one or the other is wrong. What do warping specialists think?
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
----------------------------------------------------------------------------------------------------------------
Peter J Halls, PhD Student, Post-war Reconstruction and Development Unit
(PRDU),
                      University of York

Snail mail: PRDU, Derwent College, University of York,
                Heslington, York YO10 5DD
This message has the status of a private and personal communication
----------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160415/485f880e/attachment.html>


More information about the gdal-dev mailing list