[R-sig-Geo] Import a GeoTIFF file and plot it on a map with lat-long coordinates - RESOLVED

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Oct 3 12:37:48 CEST 2013


On Thu, Oct 3, 2013 at 11:02 AM, Amelie LESCROEL
<Amelie.LESCROEL at cefe.cnrs.fr> wrote:
> Right, this is actually what I did, following your code. I used the .jpg file to get the projection and applied it to the .tif file.

 I think if you then save the tiff with writeGDAL or writeRaster you
can write a tiff with the projection info in the metadata. But
obviously the real solution is to persuade the data provider to put it
in the metadata in the first place! Not that that will happen.

 Actually, you can do this on the command line with gdal_translate:

gdal_translate  -a_srs RossSea.2004356.aqua.500m.prj
RossSea.2004356.aqua.500m.tif RossSea-prj.tif

and that takes the projection data from the .prj file, adds it to the
.tif, and writes a new .tif with the metadata!

I did think one of the gdal command tools would do it, didnt realise
it was this easy!

Barry



More information about the R-sig-Geo mailing list