[Gdal-dev] RE: GCPs and Thin Plate Splines - C++

chris pozsgai poz at rocketmail.com
Sat Mar 10 07:41:04 EST 2007

  I have been successful in using GDALGCPsToGeoTransform, but
  I would like to have zero error at the GCPs.  I was hoping to use
  TPS transformer for this purpose.  My thought was to first get
  the GDAL GCP transformer working, then to get brave and try
  the TPS transformer.  I was unfortunately not able to get good results
  with the GCP transformer, and got nothing when I used the TPS transform
  method.  (My geotransform had parameters on the order of 10e67 in it.)

  I guess my main question would be if this is the correct approach to the
  problem.  If it is, I'll keep working at it.  If not, I can live with using the 
  least squares transform used in GDALGCPsToGeoTransform.
  Thanks again,
  Chris Pozsgai
Frank Warmerdam <warmerdam at pobox.com> wrote:
  chris pozsgai wrote:
> Hello again..
> I would like to repost my query to the mailing list regarding the thin plate
> splines... (I now have access to my code and the internet at the same time.)
> I was able to get reasonable results using the
> GDALGCPsToGeoTransform function to generate a geo transform, but I would
> like to have an exact fit at the GCPs. That drove me to delve further 
> into the
> GDAL functionality where I ran across the warping functions.
> I tried to first use the gdal warper to be able to reproduce the results 
> I got
> using the GDALGCPstoGeoTransform function with the warper. I was
> not able to do that, but here is the code that I wrote. My intention was to
> look at the TPS transform's ability to preserve the GCP values, but I 
> could not
> get that to work, or even to reproduce the results from 
> GDALGCPsToGeoTransform
> using regular GCP warping.
> I apologize for putting this much code on the mailing but I guess it's 
> the best way....


I'm sorry for being dense, but I've lost track of what you are asking us to
look for in the following code. Are you having trouble getting the warp
api to work with the GCP transformer (using polynomials)? Or is it just
the TPS that wasn't working for you? Is it that you get a poor warp or
that nothing works?

I hesitate to try and grok a substantial amount of code in the hopes of
then realizing what it is you wanted me to look for. This is very time
and frustration intensive.

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 | President OSGeo, http://osgeo.org

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070310/30b572f8/attachment.html

More information about the Gdal-dev mailing list