[gdal-dev] Fwd: gdal_translate gif ->gtiff
Dori
izzybitsie at gmail.com
Thu Apr 7 17:36:23 EDT 2011
Hi,
I am trying to convert a GIF image into a georeference tiff image. Since I
don't know the exact projection used to create the original image I
downloaded from a website, I am trying to use various projections in an
attempt to get the right one. On an ealier post it was suggested to use
cs2cs command to convert the lat/lon corner points to projected coordinates
I could assign to -a_ullr when creating the tiff.
I am running cs2cs and gdal_translate included in FWTools-2.0.6 in a RedHat
Linux host.
These are the 2 commands I run to create the gtiff assuming the projection
is Polar Stereographic with central meridian=-98.19:
1) *cs2cs +proj=latlon +to +proj=stere +lat_0=90 +lat_ts=70 +lon_0=-98.19
-r<<EOF >stere98pts.dat
+44.0 135.0W
+20.0 74.0W
EOF*
where Upper Left map corner: 44N 135W
Lower Right map corner: 20N 74W
2) using the points created by command 1) and assigning them to ulx, uly,
lrx, and lry respectively I run:
*ulx=-3150617.86
uly=-4209985.73
lrx=3545943.53
lry=-7893766.64
gdal_translate -of GTiff -co PROFILE=GEOTIFF -co INTERLEAVE=PIXEL -a_srs
'+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-98.19' -a_ullr $ulx $uly $lrx $lry
my_image.gif my_image_stere98.tif*
The info for the tiff image looks like:
*Driver: GTiff/GeoTIFF
Files: my_image_stere98.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",70],
PARAMETER["central_meridian",-98.19],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-3150617.859999999869615,-4209985.730000000447035)
Pixel Size = (7750.649756944443652,-7003.385760456272692)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left (-3150617.860,-4209985.730) (135d 0'0.00"W, 44d 0'0.00"N)
Lower Left (-3150617.860,-7893766.640) (119d56'53.85"W, 20d58'17.68"N)
Upper Right ( 3545943.530,-4209985.730) ( 58d 5'0.89"W, 42d 4'44.10"N)
Lower Right ( 3545943.530,-7893766.640) ( 74d 0'0.00"W, 20d 0'0.00"N)
Center ( 197662.835,-6051876.185) ( 96d19'9.49"W, 37d52'39.33"N)
Band 1 Block=864x9 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
0: 0,0,0,255
1: 0,255,255,255
2: 153,153,102,255
3: 204,204,204,255
4: 255,0,0,255
5: 51,153,204,255*
........ color table follow here .......
Unfortunately, I cannot see this image using a third party software that
allows me to see other conversions of this same GIF using lcc and lcc2
conversions.
*Q1: Am I converting lat/lon points correctly?
Q2: Am I using gdal_translate correctly?
*
I'd appreciate it any help to determine what I am doing wrong with this
stereographic conversion.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110407/c3672665/attachment.html
More information about the gdal-dev
mailing list