[Gdal-dev] Use of gdalwarp/translate utility
guillaume huby
guillaume.huby.lists at gmail.com
Fri May 18 12:36:24 EDT 2007
>
> -------- Message original --------
>
> Sujet: [Gdal-dev] Use of gdalwarp/translate utility
> Date: Fri, 18 May 2007 11:51:21 -0400
> De: Doug Nebert <ddnebert at usgs.gov>
> Répondre à: ddnebert at usgs.gov
> Pour: gdal-dev at lists.maptools.org
>
> I have a series of images that are 2000x2000 pixels centered on the
> polar regions in a EPSG:3413 projection, though Proj.4/GDAL don't seem
> to know about it yet. I'd like to take the GIFs and embed the
> projection information in the TIFF header so that they may be
> used/interpreted in applications such as transformation to other
> projections.
>
...
> gdal_translate -a_srs "+proj=stere +datum=wgs84 +lat_ts=70.0 +lat_0=90
>
> +lon_0=-45" -of GTiff input1.gif quickscat1.tif
...
gdalinfo says:
>
> Driver: GTiff/GeoTIFF
> Size is 1530, 1530
> Coordinate System is:
> PROJCS["unnamed",
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.2572235630016,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]],
> PROJECTION["Polar_Stereographic"],
> PARAMETER["latitude_of_origin",70],
> PARAMETER["central_meridian",-45],
> PARAMETER["scale_factor",1],
> PARAMETER["false_easting",0],
> PARAMETER["false_northing",0],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]]]
> Metadata:
> AREA_OR_POINT=Area
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0, 1530.0)
> Upper Right ( 1530.0, 0.0)
> Lower Right ( 1530.0, 1530.0)
> Center ( 765.0, 765.0)
It seems you should add the -a_ullr option (see
http://www.gdal.org/gdal_translate.html) to add coordinates and pixel size
to your raster.
Using -a_srs alone you only add information about coordinate system without
modifying the coordinates themselves (i.e. upper-left coordinates, pixel
size and so on).
So if your GIF doesn't provide these informations to gdal you should add
them by hand.
Good luck,
Guillaume.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070518/695de9c0/attachment.html
More information about the Gdal-dev
mailing list