How can I project a tiff using the position of the four corners where the picture have to be placed ?

The tiff file has no georeference or projection information

I have got a grid with values of probability. Every time I need to project the grid, the rotation and the pixel resolution will vary. Then I must use the position of the corners (using lon/lat) How can I do it using GDAL?

From gdal docs

  adfGeoTransform[0]/* top left x */
  adfGeoTransform[1]/* w-e pixel resolution */
  adfGeoTransform[2]/* rotation, 0 if image is "north up" */
  adfGeoTransform[3]/* top left y */
  adfGeoTransform[4]/* rotation, 0 if image is "north up" */
  adfGeoTransform[5]/* n-s pixel resolution */

But I can not find the relationship between corners, pixel resolution and rotation just the four positions where the corners have to be fixed.

  • Have you looked at the ecode for the gdal_edit.py utility? – BradHards Nov 5 '14 at 9:27
  • geotransforms = dataset.GetGeoTransform() (0.0, 1.0, 0.0, 0.0, 0.0, 1.0) – kamome Nov 5 '14 at 12:25
  • Well, I think I have my blank file as geo. I would like to project it using Lon/lat list with the four square positions. How can I do it. If I understand the gdal_edit.py I must enter just two corners, lower_left and upper_right but the tiff is rotated some degrees from N/S direction. – kamome Nov 5 '14 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.