Properly Converting from UTM to Lat/Long with gdalwarp

المشرف العام

Administrator
طاقم الإدارة
I have a file in GeoTiff format in UTM coordinates. I convert the file to LatLong, then back to UTM, and the coordinates aren't what I started with. I have the printout of the process below. Thanks for your help!

gdalsrsinfo 6b6.tif produces the following:

PROJ.4 : '+proj=utm +zone=16 +datum=NAD83 +units=m +no_defs '

OGC WKT :pROJCS["NAD_1983_UTM_Zone_16N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-87], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26916"]]

gdalwarp -t_srs '+proj=longlat +datum=WGS84 +no_defs' 6b6.tif output.tif

gdalinfo output.tifDriver: GTiff/GeoTIFFFiles: output.tifSize is 1384, 1379Coordinate 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 = (-86.750459052801645,40.250430422810176)Pixel Size = (0.000091263992370,-0.000091263992370)Metadata: AREA_OR_POINT=Area BandDefinitionKeyword=NONEImage Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left ( -86.7504591, 40.2504304) ( 86d45' 1.65"W, 40d15' 1.55"N)Lower Left ( -86.7504591, 40.1245774) ( 86d45' 1.65"W, 40d 7'28.48"N)Upper Right ( -86.6241497, 40.2504304) ( 86d37'26.94"W, 40d15' 1.55"N)Lower Right ( -86.6241497, 40.1245774) ( 86d37'26.94"W, 40d 7'28.48"N)Center ( -86.6873044, 40.1875039) ( 86d41'14.30"W, 40d11'15.01"N)Band 1 Block=1384x1 Type=Float32, ColorInterp=Gray NoData Value=-3.4028234663852886e+38 Metadata: RepresentationType=ATHEMATIC

and then converting back, gdalwarp -t_srs EPSG:26916 output.tif back.tif

gdalinfo back.tifDriver: GTiff/GeoTIFFFiles: back.tifSize is 1197, 1552Coordinate System is:pROJCS["NAD83 / UTM zone 16N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-87], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26916"]]Origin = (521222.733228680794127,4455620.891041336581111)Pixel Size = (9.022681340919917,-9.022681340919917)Metadata: AREA_OR_POINT=Area BandDefinitionKeyword=NONEImage Structure Metadata: INTERLEAVE=BANDCorner Coordinates:Upper Left ( 521222.733, 4455620.891) ( 86d45' 1.65"W, 40d15' 2.78"N)Lower Left ( 521222.733, 4441617.690) ( 86d45' 3.31"W, 40d 7'28.60"N)Upper Right ( 532022.883, 4455620.891) ( 86d37'24.49"W, 40d15' 1.54"N)Lower Right ( 532022.883, 4441617.690) ( 86d37'27.00"W, 40d 7'27.37"N)Center ( 526622.808, 4448619.290) ( 86d41'14.11"W, 40d11'15.14"N)Band 1 Block=1197x1 Type=Float32, ColorInterp=Gray NoData Value=-3.4028234663852886e+38 Metadata: RepresentationType=ATHEMATIC



أكثر...
 
أعلى