[gdal-dev] Re: Best way to add geo-referencing to a PNG

Christopher Barker Chris.Barker at noaa.gov
Fri Feb 19 18:33:53 EST 2010


Jukka Rahkonen wrote:
> Christopher Barker <Chris.Barker <at> noaa.gov> writes:
> 
>> That seems to get the basics: QGIS puts it in the right place on the 
>> map, and gdal_translate seems to be able to make a geotiff out of it. 
>> However, I'd like to be able to put a bit more information in, like that 
>> it's wgs84, and geo-coordinates. How can I do that? It seems an 
>> *.aux.xml file should be able to do what I want. but I don't what to put 
>> in that.
> 
> I would convert them to geotiffs with -a_srs option for telling it is in wgs84.
> 
> gdal_translate -of GTiff -a_srs epsg:4326 image.png image.tif

thanks -- by adding the world file, then using that to convert to 
geotiff, I do get what I want. I can now use gdal_translate to convert 
back to png, and I get a .aux.xml file that is what I want.

Thanks,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the gdal-dev mailing list