[R-sig-Geo] projection() and proj4string()
Agustin Lobo
alobolistas at gmail.com
Sat May 29 19:02:49 CEST 2010
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
Roger Bivand wrote:
>
> .../...
> Probably projection<-() needs the same if() statement as that used in
> projection(), to distinguish extensions of "BasicRaster" from those of
> "Spatial", in which case projection<-() and proj4string<-() will both work
> on objects extending "Spatial" too.
>
> Roger
>
>From a user point of view, this would be certainly useful.
Thanks!
Agus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/projection-and-proj4string-tp5115767p5116707.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list