[gdal-dev] gdal_translate gif ->gtiff
Dori
izzybitsie at gmail.com
Mon Apr 11 13:28:44 EDT 2011
Hi,
I am trying to convert a gif map downloaded from
http://aviationweather.gov/data/products/swl/ll_12_0_cl_new.gif to
georeferenced tiff. I found out that the Projection used to create this GIF
map is Polar Stereographic from the North Pole (90.0), center meridian 97W
and height of 0.
Map corners:
Upper Left = 44.5 N 135 W
Lower Right = 19.9N 74W
I used cs2cs in FWTools-2.0.6 to obtain the points for -a_ullr in
gdal_translate command:
*cs2cs +proj=latlon +to +proj=stere +lat_0=90 +lon_0=-97 -r <<EOF
>pts_stere_xy.dat
+44.5 135.0W
+19.9 74.0W
EOF*
Points created:
* cat pts_stere_xy.dat
-3297702.30 -4220866.46 0.00
3492766.64 -8228442.54 0.00*
Then I used gdal_translate to create the geotiff image:
*ulx=-3297702.30
uly=-4220866.46
lrx=3492766.64
lry=-8228442.54
gdal_translate -of GTiff -co PROFILE=GEOTIFF -co INTERLEAVE=PIXEL -a_srs
'+proj=stere +lat_0=90 +lon_0=-97' -a_ullr $ulx $uly $lrx $lry
../maps/my_image.gif ../maps/my_image_sterePts.tif*
geotiff image information:
*Driver: GTiff/GeoTIFF
Files: my_image_sterePts.tif
Size is 864, 526
Coordinate System is:
PROJCS["unnamed",
GEOGCS["WGS 84",
DATUM["unknown",
SPHEROID["unnamed",6378137,298.2572235629972]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Polar_Stereographic"],
PARAMETER["latitude_of_origin",90],
PARAMETER["central_meridian",-97],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-3297702.299999999813735,-4220866.459999999962747)
Pixel Size = (7859.339050925926131,-7618.965931558935154)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left (-3297702.300,-4220866.460) (135d 0'0.00"W, 44d30'0.00"N)
Lower Left (-3297702.300,-8228442.540) (118d50'21.73"W, 20d21'8.25"N)
Upper Right ( 3492766.640,-4220866.460) ( 57d23'32.09"W, 43d34'2.00"N)
Lower Right ( 3492766.640,-8228442.540) ( 74d 0'0.00"W, 19d54'0.00"N)
Center ( 97532.170,-6224654.500) ( 96d 6'8.37"W, 38d 0'27.51"N)
Band 1 Block=864x9 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
0: 0,0,0,255
....... color table continues .....*
*Q1: Could someone let me know if the commands I used look OK?*
I am able to display the image using openev, however I cannot display it
using another proprietary software.
I am no expert so, I may be using the tools incorrectly or something of the
like.
*Q2: Does the image info show anything seriously wrong I don't see?*
*Q3: Any suggestion on how to perform the conversion differently?*
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110411/76dcb700/attachment.html
More information about the gdal-dev
mailing list