[gdal-dev] Re: Thin Plate Spline
Even Rouault
even.rouault at mines-paris.org
Tue May 4 15:10:19 EDT 2010
This email contained a .zip file attachment. Raytheon does not allow email attachments that are considered likely to contain malicious code. For your protection this attachment has been removed.
If this email is from an unknown source, please simply delete this email.
If this email was expected, and it is from a known sender, you may follow the below suggested instructions to obtain these types of attachments.
+ Instruct the sender to enclose the file(s) in a ".zip" compressed file, and rename the ".zip" compressed file with a different extension, such as, ".rtnzip". Password protecting the renamed ".zip" compressed file adds an additional layer of protection. When you receive the file, please rename it with the extension ".zip".
Additional instructions and options on how to receive these attachments can be found at:
http://security.it.ray.com/antivirus/extensions.html
http://security.it.ray.com/news/2007/zipfiles.html
Should you have any questions or difficulty with these instructions, please contact the Help Desk at 877.844.4712
---
Jan,
you'll need to provide the exact source data and command line you use because
I can't reproduce any problem.
I've generated a 1000x1000 artificial dataset with the following features :
* background is black
* a white grid made of horizontal lines and vertical lines spaced with 100
pixels
* 5 GCPs :
- red square at (150, 150). Target coords are (500000 + 100, 4500000 - 100)
- green square at (250,450). Target coords are (500000 + 100, 4500000 - 500)
- yellow square at (50, 850). Target coords are (500000 + 100, 4500000 - 900)
- cyan square at (950, 50). Target coords are (500000 + 900, 4500000 - 100)
- magenta square at (850, 950). Target coords are (500000 + 900, 4500000 -
900)
So the expected result is a warped grid, but such as the red,yellow,cyan and
magenta points form a perfect square (and the green square is in the middle
of the red-yellow segment). And that's exactly what I get. With a precision
of sub-pixel.
Attached a ZIP with the source image and C source code used to generate it.
Command line used to warp : gdalwarp -tps src_grid.tif dst_grid.tif
Best regards,
Even
Le Tuesday 04 May 2010 15:14:34 Jan Hartmann, vous avez écrit :
> Thanks, Jukka, that's exactly what I did. I used QGIS to test the
> coordinates in both images.
>
> Jan
>
> On 05/04/10 15:08, Jukka Rahkonen wrote:
> > Jan Hartmann<j.l.h.hartmann<at> uva.nl> writes:
> >> you can see a screenshot of the original image (right) and the
> >> georeferenced one (left, rotated almost 90 degrees). The red markers
> >> with the number 3 inside them show one of the control points: to the
> >> right the scan pixel (5023/3421), to the left the targeted
> >> georeferenced coordinate in EPSG:28992 (121527/487174). As you see, the
> >> georeferenced point is not exactly on the border of parcel 7, as I
> >> expected. Above the map you see the four coordinates I used as control
> >> points; I added four extra points half way the original ones, so the
> >> complete warp was done with 8 control points.
> >
> > Hi,
> >
> > I can try to repeat your test some day. Is this your workflow:
> >
> > 1. gdal_translate -of VRT -gcp p1 l1 e1 n1 -gcp p2 l2 e2 n2 -gcp p3 l3 e3
> > n3 -gcp p4 l4 e4 n4 -gcp p5 l5 e5 n5 input.tif temp_with_gcp.vrt
> >
> > 2. gdalwarp -s_srs EPSG:28992 -t_srs EPSG:28992 -tps temp_with_gcp.vrt
> > warped.tif
> >
> > 3. Measure the coordinates of the ground control points from warped.tif
> > with some GIS software like QGis and find out disappointed that
> > they have shifted.
> >
> > -Jukka Rahkonen-
> >
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> _______________________________________________
> 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