Difference between revisions of "Georeferencing Images"

From Silent Wings Wiki
Jump to: navigation, search
(New page: If you have an aerial photo or another image that you want to use as input for the texture mapper it needs to have georeferencing information, i.e information on the geographical limits of...)
 
 
Line 8: Line 8:
  
 
* -a_srs EPSG:4326 => apply geographic projection (EPSG code 4326)
 
* -a_srs EPSG:4326 => apply geographic projection (EPSG code 4326)
* -a_ullr => ullr means upper left - lower right in X Y pairs
+
* -a_ullr => ullr means upper left - lower right in X Y pairs 0.0 40.0 30.0 20.0 will make the image cover 0 degrees East to 30 degrees East and 40 degrees North to 20 degrees North
      0.0 40.0 30.0 20.0 will make the image cover 0 degrees East to 30 degrees East and 40 degrees North to 20 degrees North
 
 
* -co interleave=pixel makes gdal write the GeoTIFF in pixel interleave format instead of the default band interleave which texmapper can't read
 
* -co interleave=pixel makes gdal write the GeoTIFF in pixel interleave format instead of the default band interleave which texmapper can't read
  
 
[[Category:Scenery]]
 
[[Category:Scenery]]

Latest revision as of 10:05, 15 March 2007

If you have an aerial photo or another image that you want to use as input for the texture mapper it needs to have georeferencing information, i.e information on the geographical limits of the image.

Most aerial images or satellite images from geodata providers has this information already, but sometimes you may have to add it manually. To do this, you can for example use the command line app gdal_translate from the GDAL software.

Example:

gdal_translate -a_srs EPSG:4326 -a_ullr 0.0 40.0 30.0 20.0 -co interleave=pixel <input.tif> <output.tif>
  • -a_srs EPSG:4326 => apply geographic projection (EPSG code 4326)
  • -a_ullr => ullr means upper left - lower right in X Y pairs 0.0 40.0 30.0 20.0 will make the image cover 0 degrees East to 30 degrees East and 40 degrees North to 20 degrees North
  • -co interleave=pixel makes gdal write the GeoTIFF in pixel interleave format instead of the default band interleave which texmapper can't read