Import a GeoTIFF file and plot it on a map with lat-long coordinates - RESOLVED
Also also consider the "creation options" -co TILED=YES and -co COMPRESS=LZW which really help efficiency and storage (for some tools) (if they support it) (and so it depends on the target as usual). These are available via arguments to writeRaster and writeGDAL. Cheers, Mike. On Thu, Oct 3, 2013 at 8:37 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
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
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Michael Sumner Hobart, Australia e-mail: mdsumner at gmail.com