[gdal-dev] Help with setting GCPs in a GeoTiff

matt.feemster matt.feemster at ga-asi.com
Thu Oct 6 18:05:33 EDT 2011


Long time GDAL user here, but first time poster.

I have an image in an internal format that I want to save out as a GeoTiff.
>From all of the examples I've seen, they say to use a transformation matrix.
However, we cannot do that with our images because they are not exactly
square. When using a transformation matrix, they come out skewed.

What we ideally need to do, is simply save the corner coordinates of the
original image in the GeoTiff (similar to how a NITF is done). We already
know what they are in our original format, but I cannot figure out how to
properly assign them using GDAL.

I have tried setting the GCPs with no luck, so I feel like I am missing
something.

So my question involves three steps:

1) Is it possible to store only corner coordinates as a way of telling
GDAL/GeoTiff what the geo information is for a GeoTiff? Again,
transformations will not work here.

2) If it is possible, how to go about it?

3) When assigning the GCPs, what exactly do the 'x' and 'y' members of the
GDAL_GCP structure mean? Per the documentation: X position of GCP in
georeferenced space. Are x and y a lat/lon pair? ECEF x/y? UTM
easting/northing? What exactly should I be assigning these values.


Assume WGS84 for everything.

Any help would greatly be appreciated. I've burned two solid days on this
task and am out of ideas.

Thanks.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Help-with-setting-GCPs-in-a-GeoTiff-tp6867532p6867532.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list