Can't create Projection Coordinate System in GeoTiff

1.8k views Asked by At

I have a jpg image that I would like to convert to a GeoTiff. I have done the following with GDAL:

gdal_translate -a_srs "+proj=latlong +datum=WGS84" -of GTiff -co "INTERLEAVE=PIXEL" -a_ullr -112.749767303467 40.2223700746836 -112.731463909149 40.2063119735618 image0.jpg image0.tif

This provides a GeoTiff with the following Geo Data (using gdalinfo):

Driver: GTiff/GeoTIFF    
Files: image0.tif    
Size is 853, 980    
Coordinate System is:    
GEOGCS["WGS 84",     
    DATUM["WGS_1984",    
        SPHEROID["WGS 84",6378137,298.257223563,    
            AUTHORITY["EPSG","7030"]],    
        AUTHORITY["EPSG","6326"]],    
    PRIMEM["Greenwich",0],    
    UNIT["degree",0.0174532925199433],    
    AUTHORITY["EPSG","4326"]]    
Origin = (-112.749767303467000,40.222370074683603)    
Pixel Size = (0.000021457672120,-0.000016385817471)    
Metadata:    
  AREA_OR_POINT=Area    
Image Structure Metadata:    
  INTERLEAVE=PIXEL    
Corner Coordinates:    
Upper Left  (-112.7497673,  40.2223701) (112d44'59.16"W, 40d13'20.53"N)    
Lower Left  (-112.7497673,  40.2063120) (112d44'59.16"W, 40d12'22.72"N)    
Upper Right (-112.7314639,  40.2223701) (112d43'53.27"W, 40d13'20.53"N)    
Lower Right (-112.7314639,  40.2063120) (112d43'53.27"W, 40d12'22.72"N)    
Center      (-112.7406156,  40.2143410) (112d44'26.22"W, 40d12'51.63"N)    
Band 1 Block=853x3 Type=Byte, ColorInterp=Red    
Band 2 Block=853x3 Type=Byte, ColorInterp=Green    
Band 3 Block=853x3 Type=Byte, ColorInterp=Blue    

I now want to add a projection to the file using gdalwarp so I do this:

gdalwarp  -of GTiff -co "INTERLEAVE=PIXEL" -s_srs "+proj=utm +zone=12 +datum=WGS84" -    t_srs "+proj=latlong +datum=WGS84" -r cubic image0.tif image0proj.tif

The output from gdal info for this is:

Driver: GTiff/GeoTIFF    
Files: image0proj.tif    
Size is 974, 860    
Coordinate System is:    
GEOGCS["WGS 84",    
    DATUM["WGS_1984",    
        SPHEROID["WGS 84",6378137,298.257223563,    
            AUTHORITY["EPSG","7030"]],    
        AUTHORITY["EPSG","6326"]],    
    PRIMEM["Greenwich",0],    
    UNIT["degree",0.0174532925199433],    
    AUTHORITY["EPSG","4326"]]    
Origin = (-115.489754008884220,0.000362780166170)    
Pixel Size = (0.000000000168394,-0.000000000168394)    
Metadata:    
  AREA_OR_POINT=Area    
Image Structure Metadata:    
  INTERLEAVE=PIXEL    
Corner Coordinates:    
Upper Left  (-115.4897540,   0.0003628) (115d29'23.11"W,  0d 0' 1.31"N)    
Lower Left  (-115.4897540,   0.0003626) (115d29'23.11"W,  0d 0' 1.31"N)    
Upper Right (-115.4897538,   0.0003628) (115d29'23.11"W,  0d 0' 1.31"N)    
Lower Right (-115.4897538,   0.0003626) (115d29'23.11"W,  0d 0' 1.31"N)    
Center      (-115.4897539,   0.0003627) (115d29'23.11"W,  0d 0' 1.31"N)    
Band 1 Block=974x2 Type=Byte, ColorInterp=Red    
Band 2 Block=974x2 Type=Byte, ColorInterp=Green    
Band 3 Block=974x2 Type=Byte, ColorInterp=Blue    

I was expecting the output to contain projection information in UTM starting like this:
Coordinate System is:
PROJCS["UTM",
GEOGCS["WGS 84",

What am I doing wrong?

Thanks in advance.

JC

0

There are 0 answers