Hi,<br><br>I would like to convert imagery which has an empty coordinate system to geotif format via gdalwarp:<br><br>Below is part of a gdalinfo dump of the original imagery. Notice that the Coordinate System is empty<br>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
Size is 12074, 13232<br>Coordinate System is `'<br>GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG",7030]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG",6326]],PRIMEM["Greenwich",0,AUTHORITY["EPSG",8901]],UNIT["DMSH",0.0174532925199433,AUTHORITY["EPSG",9108]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG",4326]]<br>
GCP[ 0]: Id=1, Info=<br> (0.5,0.5) -> (36.77378,-17.270641,0)<br>GCP[ 1]: Id=2, Info=<br> (6037,0.5) -> (35.398528,-16.938865,0)<br>GCP[ 2]: Id=3, Info=<br> (12073.5,0.5) -> (34.027899,-16.597882,0)<br>
GCP[ 3]: Id=4, Info=<br> (0.5,3307.5) -> (36.58987,-17.99724,0)<br>GCP[ 4]: Id=5, Info=<br> (6037,3307.5) -> (35.209644,-17.663643,0)<br>GCP[ 5]: Id=6, Info=<br> (12073.5,3307.5) -> (33.834311,-17.320427,0)<br>
GCP[ 6]: Id=7, Info=<br> (0.5,6614.5) -> (36.404318,-18.723611,0)<br>GCP[ 7]: Id=8, Info=<br> (6037,6614.5) -> (35.01887,-18.388159,0)<br>GCP[ 8]: Id=9, Info=<br> (12073.5,6614.5) -> (33.638591,-18.042675,0)<br>
GCP[ 9]: Id=10, Info=<br> (0.5,9921.5) -> (36.21706,-19.449749,0)<br>GCP[ 10]: Id=11, Info=<br> (6037,9921.5) -> (34.826137,-19.112408,0)<br>GCP[ 11]: Id=12, Info=<br> (12073.5,9921.5) -> (33.440671,-18.764619,0)<br>
GCP[ 12]: Id=13, Info=<br> (0.5,13228.5) -> (36.028031,-20.175626,0)<br>GCP[ 13]: Id=14, Info=<br> (6037,13228.5) -> (34.631381,-19.836361,0)<br>GCP[ 14]: Id=15, Info=<br> (12073.5,13228.5) -> (33.24048,-19.486228,0)<br>
Metadata:<br> ELLIPSOID=WGS84 <br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0,13232.0)<br>Upper Right (12074.0, 0.0)<br>Lower Right (12074.0,13232.0)<br>Center ( 6037.0, 6616.0)<br>
Band 1 Block=12074x1 Type=Byte, ColorInterp=Undefined<br>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br><br>Based on the above gdalinfo data I assumed that the projection should be wgs84/EPSG:4326<br><br>So I run the following command against the imagery to convert it to geotiff with an EPSG code of 4326:<br>gdalwarp -rc -s_srs epsg:4326 -t_srs epsg:4326 source_imagery destination_geotiff<br>
<br>Next I run gdalinfo against the converted geotiff file which is listed below:<br>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
Driver: GTiff/GeoTIFF<br>Files: C:\dat_01.tif<br>Size is 15174, 15369<br>Coordinate System is:<br>GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS 84",6378137,298.2572235630016,<br>
AUTHORITY["EPSG","7030"]],<br> AUTHORITY["EPSG","6326"]],<br> PRIMEM["Greenwich",0],<br> UNIT["degree",0.0174532925199433],<br> AUTHORITY["EPSG","4326"]]<br>
Origin = (33.240318507099211,-16.597638311748319)<br>Pixel Size = (0.000232863689106,-0.000232863689106)<br>Metadata:<br> AREA_OR_POINT=Area<br>Image Structure Metadata:<br> INTERLEAVE=BAND<br>Corner Coordinates:<br>Upper Left ( 33.2403185, -16.5976383) ( 33d14'25.15"E, 16d35'51.50"S)<br>
Lower Left ( 33.2403185, -20.1765203) ( 33d14'25.15"E, 20d10'35.47"S)<br>Upper Right ( 36.7737921, -16.5976383) ( 36d46'25.65"E, 16d35'51.50"S)<br>Lower Right ( 36.7737921, -20.1765203) ( 36d46'25.65"E, 20d10'35.47"S)<br>
Center ( 35.0070553, -18.3870793) ( 35d 0'25.40"E, 18d23'13.49"S)<br>Band 1 Block=15174x1 Type=Byte, ColorInterp=Gray<br>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>The readme file has the CORNER COORDINATES of:<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br>
17°16'14.30" S 16°35'52.37" S<br> 36°46'25.60" E 34°01'40.43" E<br> <br> 20°10'34.62" S 19°29'12.77" S<br> 36°01'40.29" E 33°14'25.06" E<br>
<br>CENTER 18°22'S 035°01'E<br>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br clear="all">
<br>In comparing the readme file to converted geotiff the resolution increased slightly and the coordinates were slightly different. <br>Am I correct in assuming that the EPSG code should be 4326 when converting to geotiff format via gdalwarp?<br>
<br>Thanks,<br><br>John J. Mitchell