Changes between Version 1 and Version 2 of UserDocs/GdalTranslate


Ignore:
Timestamp:
May 22, 2007, 11:25:36 AM (17 years ago)
Author:
maphew
Comment:

added Syntax for PROJ4 section

Legend:

Unmodified
Added
Removed
Modified
  • UserDocs/GdalTranslate

    v1 v2  
    22  ''The official documentation for the `gdal_translate` utility is http://www.gdal.org/gdal_translate.html.''
    33
    4 '''when to use `-a_ullr`''' - ''Assign/override the georeferenced bounds of the output file.''
     4=== When to use `-a_ullr` ===
     5  ''Assign/override the georeferenced bounds of the output file.''
    56
    67Use the `-a_ullr` option to add coordinates and pixel size to your raster. Using `-a_srs` alone only adds information about coordinate system without modifying the coordinates themselves ( i.e. upper-left coordinates, pixel size and so on). So if the source image doesn't provide this information to gdal they need to be added by hand.
     8
     9== Syntax for PROJ.4 parameters ==
     10
     11In trying to use the gdal_translate on a non-standard projection, the hardest part is often to determine what the allowable syntax and meaning of the PROJ.4 parameters were (i.e. `+lat_0=70, +ellps=WGS84`) as an argument to `-a_srs, -t_srs, -s_srs`. There is no clean ready made list, however the [http://www.remotesensing.org/geotiff/proj_list/ GeoTIFF projections transform list] is a great start. Find the page for the projection you need and scan for the '''''PROJ.4 Organization''''' heading.
     12
     13For example this Arcinfo projection:
     14{{{
     15Projection    ALBERS
     16Datum         NAD83
     17Zunits        NO
     18Units         METERS
     19Spheroid      GRS1980
     20Xshift        0.0000000000
     21Yshift        0.0000000000
     22Parameters
     2361 40  0.000 /* 1st standard parallel
     2468  0  0.000 /* 2nd standard parallel
     25-132 30  0.000 /* central meridian
     2659  0  0.000 /* latitude of projection's origin
     27500000.00000 /* false easting (meters)
     28500000.00000 /* false northing (meters)
     29}}}
     30
     31Becomes this in PROJ4 [http://www.remotesensing.org/geotiff/proj_list/albers_equal_area_conic.html *]:
     32{{{
     33+proj=aea +lat_1=61.66666666666666 +lat_2=68.0 +lat_0=59.0 +lon_0=-132.5
     34+x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m
     35}}}
     36
     37If it is a projection you use a lot, write it to a text file and refer to it like this:
     38
     39{{{ gdal_translate ... -t_srs z:\common\yt-albers.proj4 ... infile.tif outfile.tif }}}
     40
     41