[R-sig-Geo] raster() and projection

Robert J. Hijmans r.hijmans at gmail.com
Wed Dec 2 22:55:04 CET 2009


Hi Agus,

How do you know the tif file has correct information. It likely is not
something that gdal understands

Can you show:

raster("/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/mde10mny.tif")

GDALinfo("/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/mde10mny.tif")

and a command line gdalinfo to the same file?

Thanks, Robert


On Wed, Dec 2, 2009 at 1:38 PM, Agustin Lobo <alobolistas at gmail.com> wrote:
> Hi!
>
> Why is it that when we "read" a raster i.e.
> dem <- raster("/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/mde10mny.tif")
>
> (where the tif file is a geotif file with correct projection informatio)
> we actually do not get the projection information?
>
>> projection(dem)
> [1] "NA"
>
> By now I solve it thanks to a SPDF:
>> delme <-
>> readOGR(dsn="/media/Transcend/MONTSENY2008/MONTSENY_GEODATA/Limitparcplaespecial",
>> layer="AmbitPlaEspecial")
>> projection(dem) <- projection(delme)
>
> Am I doing something wrong?
>
> Thanks
>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list