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

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Oct 6 23:55:58 EDT 2011


Matt,

Affine transform and GCPs are the two methods used to set the georeference
of a raster. These two are practically exclusive of each other. You cannot
use Affine transform because your images they are not exactly rectangular.
Your only option is setting GCPs.

Since you are using WGS84, the X and Y values indicate the longitude and
latitude of the pixel's position.

Please go through the GDAL Data Model page[1] so that you don't miss any
other details.

[1]: http://www.gdal.org/gdal_datamodel.html

On Fri, Oct 7, 2011 at 3:35 AM, matt.feemster <matt.feemster at ga-asi.com>wrote:

> 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.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111007/c70d2e18/attachment-0001.html


More information about the gdal-dev mailing list