User Tools

Site Tools


blog:2018:1003_pixel_to_geodesic_coordinate_transformations_using_geotiffs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
blog:2018:1003_pixel_to_geodesic_coordinate_transformations_using_geotiffs [2018/12/17 17:02]
bharath
blog:2018:1003_pixel_to_geodesic_coordinate_transformations_using_geotiffs [2018/12/17 17:05]
bharath
Line 36: Line 36:
  
 === Orthorectified Images === === Orthorectified Images ===
 +Now we consider orthorectified images.
 == Pixel represents an AREA == == Pixel represents an AREA ==
  
 We will first use two separate tools namely **listgeo** and **gdal** to inspect the GeoTransform of this image. ​   ​ We will first use two separate tools namely **listgeo** and **gdal** to inspect the GeoTransform of this image. ​   ​
- 
- 
  
 The GeoTransform is usually obtained by the **gdal.GetGeoTransform()** function and it returns a tuple as described above. From the [[https://​www.gdal.org/​gdal_datamodel.html|GDAL Data Model]], we quote "Note that the pixel/line coordinates are from (0.0,0.0) at the top left corner of the top left pixel to (width_in_pixels,​height_in_pixels) at the bottom right corner of the bottom right pixel. The pixel/line location of the center of the top left pixel would therefore be (0.5,​0.5)."​ To illustrate with an example, if we wanted to find the world point corresponding to the (x,y) pixel we first need to add an offset of 0.5 to represent the center of the pixel and then use the GeoTransform. So we would have The GeoTransform is usually obtained by the **gdal.GetGeoTransform()** function and it returns a tuple as described above. From the [[https://​www.gdal.org/​gdal_datamodel.html|GDAL Data Model]], we quote "Note that the pixel/line coordinates are from (0.0,0.0) at the top left corner of the top left pixel to (width_in_pixels,​height_in_pixels) at the bottom right corner of the bottom right pixel. The pixel/line location of the center of the top left pixel would therefore be (0.5,​0.5)."​ To illustrate with an example, if we wanted to find the world point corresponding to the (x,y) pixel we first need to add an offset of 0.5 to represent the center of the pixel and then use the GeoTransform. So we would have
Line 49: Line 47:
 ** Note the extra 0.5 in these equations when compared to the equations in the previous section **. It must be stressed that the 0.5 is added only to represent the center of the pixel because pixel coordinates are integers by definition. ** Note the extra 0.5 in these equations when compared to the equations in the previous section **. It must be stressed that the 0.5 is added only to represent the center of the pixel because pixel coordinates are integers by definition.
  
-== Pixel represents an AREA == +\\ 
-   +  
-  Pixel represents an AREA.+Bharath Comandur
  
-~Bharath Comandur +**This page was last edited at ~~LASTMOD~~** ​
- +
-**This page was last edited at ~~LASTMOD~~** +
- +
  
 {{tag>}} {{tag>}}
blog/2018/1003_pixel_to_geodesic_coordinate_transformations_using_geotiffs.txt · Last modified: 2020/04/03 11:50 by admin