A. Mort
A. Mort

Reputation: 308

convert PNG to GeoTIFF with GDAL

I have a PNG that I am trying to make into a GeoTIFF. My result ends up being an all-black image with the correct bounds and size (all channels min & max pixel values are 0).

My source image is a 16bit per channel PNG (UInt16). Below is my command. Do I need to do something differently? My image is 1760width x 3466height in the San Diego, CA area.

gdalwarp -t_srs EPSG:4326 -r near -of GTiff -te -117.119811 32.700376 -117.059864 32.799896 -ts 1760 3466 -to SRC_METHOD=NO_GEOTRANSFORM 11bit.png OUTPUT.tif

Upvotes: 2

Views: 4825

Answers (1)

binzo
binzo

Reputation: 1569

If your goal is to convert a PNG image with known geographic coordinates of its corners to a GeoTIFF file of the same size as the original image, you can use gdal_translate.

gdal_translate -of GTiff -a_srs EPSG:4326 -a_ullr -117.119811 32.700376 -117.059864 32.799896 11bit.png OUTPUT.tif

Upvotes: 4

Related Questions