On Sat, May 29, 2010 at 6:02 PM, Agustin Lobo <alobolis...@gmail.com> wrote:
>
> So, if I correctly understand, projection() can be used to retrieve
> information
> from an sp object but not to assign that info to a sp object:
>> projection(a)
> [1] "+proj=utm +zone=31 +ellps=intl +units=m +no_defs"
>
>> projection(a) <- projection(a)
> Error in checkSlotAssignment(object, name, value) :
>  "crs" is not a slot in class "SpatialPoints"
> Calls: projection<- -> @<- -> slot<- -> checkSlotAssignment

 Read the source. "projection" does a bunch of class tests (sure sign
of a broken OO model), returning x...@crs for BasicRaster and
x...@proj4string for Spatial classes.

 However, "projection<-" doesn't. It tries to assign to x...@crs whatever.

Barry

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to