[R-sig-Geo] how to crete a *.prj file from a Raster object

Mauricio Zambrano-Bigiarini mauricio.zambrano at jrc.ec.europa.eu
Wed Jul 31 09:17:45 CEST 2013


On 07/30/2013 03:53 PM, Emanuele Cordano wrote:
> Dear list,
>
> I have a RasterLayer object with CRS.
>
> I would like to write it in a *.asc ESRI ASCII file with writeRaster. I did
> it , I got the *.asc file but no related *.prj file was written.
> Is there a quick method to create directly the *.prj file from a
> RasterLayer object?

Hi Emanuele,

AFAIK, the .prj files are only used for vectorial shapefiles, and that 
is the reason why you don't get such file when using the 'writeRaster' 
function.

Have a look to:

https://en.wikipedia.org/wiki/Shapefile#Shapefile_projection_format_.28.prj.29

All the best,

Mauricio Zambrano-Bigiarini, Ph.D


-- 
=================================================
Water Resources Unit
Institute for Environment and Sustainability (IES)
Joint Research Centre (JRC), European Commission
webinfo    : http://floods.jrc.ec.europa.eu/
=================================================
DISCLAIMER:\ "The views expressed are purely those of th...{{dropped:7}}



More information about the R-sig-Geo mailing list