Dear all,

Thanks for the suggestions. I tried


r2 <- raster("grid_count.asc")# this is my grid file
pr1 <- projectRaster(r2, crs="+proj=longlat +datum=WGS84 +ellps=WGS84
+towgs84=0,0,0")
and I get the following error message

Raster(r2, crs = "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
:
  input projection is NA

I also tried it with the example in the r manual and that works fine.

What is it that I am doing wrong?

//minti
On Mon, Oct 22, 2012 at 11:17 PM, Robert J. Hijmans <r.hijmans@gmail.com>wrote:

> Minti,
>
> For spatial objects (points, lines, polygons) you can use spTransform in
> the rgdal package. For gridded data, as is the case here, you can use
> projectRaster from the raster package.
>
> Robert
>
>
> On Mon, Oct 22, 2012 at 2:26 PM, Struve,Juliane <jstruve@ufl.edu> wrote:
>
>> Hi Minti,
>>
>> Have a look at convUL() in package PBSmapping.
>>
>> Regards,
>>
>> Juliane
>>
>> -----Original Message-----
>> From: r-sig-geo-bounces@r-project.org [mailto:
>> r-sig-geo-bounces@r-project.org] On Behalf Of alemante zd
>> Sent: Monday, October 22, 2012 5:16 PM
>> To: r-sig-geo@r-project.org
>> Subject: [R-sig-Geo] converting UTM to decimal (latitude and longitude)
>>
>> Dear all,
>>
>> I have an ascii grid file based on UTM coordinates. How can I transform it
>> to decimal format.
>>
>> Regards
>> Minti
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>

	[[alternative HTML version deleted]]

