1

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.

Can you 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.

1 Answer 1

4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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