Opened 10 years ago

Closed 10 years ago

#5499 closed defect (invalid)

gdalwarp: spline transformation doesn't give point-exact transformation

Reported by: georg Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.8.0
Severity: normal Keywords:
Cc:

Description

I'm using gdalwarp to perform nonlinear image transformation. I'm using tps transformation, which should be exact in point where gcp is available.

The result image doesn't match the source image at gcp points. Even if I create non-moving points (source match the destination), they move.

Are my expectations correct? Should gdalwarp output image correspond to gdaltranslate gcp transformations?

I could work on mwe, but then you will be required to download large sets of raster data. So I prefer to ask the questiong first.

PS: my version is 1.8.0 but as I understand, there were no changes in warping algorithm for a long time.

Change History (5)

comment:1 by Even Rouault, 10 years ago

Please provide a sample dataset and the gdalwarp command line used.

comment:2 by georg, 10 years ago

Could you, please, anwser first if my expectations (posted above) are correct?

comment:3 by Even Rouault, 10 years ago

Transformation should be exact at GCP points. So the result you observe is strange. You should also try a more recent version, just in case.

comment:4 by georg, 10 years ago

Here is an example: http://yadi.sk/d/IzqmZAP2SNLzC

Due to licensing limitations I'm unable to send you the geodata, so I've to use sample image from Wikipedia. Archive contains test.sh script with gcps used.

I've added two interesting gcps to test: 1720 1450 is around Mona Lisa's nose end and seems to be left in place 1680 1120 is around left end of the right eye, and seems to be simple ignored.

All the data was created using 1.8.0, but I hope this doesn't matter.

comment:5 by Even Rouault, 10 years ago

Resolution: invalid
Status: newclosed

I put a red pixel at 1680 1120 on the source image and checked that it is correctly present at 1680 1120 on the target image. But the amount of shearing in that area due to the specified GCPs is such that you have to be ultra precise when you look at the images, and it is difficult to judge on the original image that has continuous tones.

So I've no reason to believe that -tps does not work.

Note: See TracTickets for help on using tickets.