Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have modified tiff file that i would like to turn to geotiff. My orginal geotiff has the following information that i got from gdalinfo:

Driver: Gtiff/Geotiff

Files: info.tiff

Size is 1127, 831 (new file is 4096 3020 in size)

Cordinate system is:


GEOGCS["WGS 84",

    DATUM[WGS_1984", 

    SPHEROID[WGS 84", 6378137,298.257223563,

    AUTHORITY["EPSG","7030"]],

    AUTHORITY["EPGS","6326"]],

    PRIMEM["Greenwich",0],

    UNIT["degree",0,0174532925199433],

    AUTHORITY["EPSG","4326"]]

Orgin = (-17.385864000000002,28.226624000000001)

Pixel Size = (0.000277826086957, -0.000277632972323)

Metadata: AREA_OR_POINT=Area

Image Structure Metadata:

INTERLEAVE=BAND

Corner Coordinates:

Upper Left (-17.3858640, 28.2266240)

Lower Left (-17.3858640, 27.9959110)

Upper Right (-17.0727540, 28.2266240)

Lower Right (-17.0727540, 27.9959110)

Center (-17.2293090, 281112675

Band 1 Block=1127x3 type=int16, Colorinterp=gray

NoData Value=32768


Now i would like to place this new tiff that will be converted to same place with same information of the orginal data.

I think i need to use gdal_translate, i have seen some examples but those are too confusing to understand and i need some wrap thing too i think.

Would it be possible for someone to show me the lines i need to use with the provided information, so i could manage to do it by my self next time. I made the new image copy of the orginal, but with more resolution and slight tweaks, the new file is 4096 x 3020.

Thank You Very Much!

share|improve this question

1 Answer 1

Given a GeoTIFF file named original.tif, and a modified file (modified.tif) without the GeoTIFF tags, but still the same size and region:
listgeo -no_norm original.tif > original.geo
geotifcp -g original.geo modified.tif modified_geotiff.tif

It's explained here

Now admittedly, that's not quite your question, because you've changed the pixel size. The output of listgeo, which we sent to original.geo, is just an ASCII file. Around the sixth line we have the pixel size. Your new pixels are .2571 of the original. So scale the pixel values by this factor, save the file, then perform step 2 (geotifcp).

I think that will work. I'm sure someone will correct me if I'm wrong :-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.