[R-sig-Geo] Plotting .shp and over()

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Apr 9 18:05:44 CEST 2013

On Tue, Apr 9, 2013 at 4:41 PM, Steven Ranney <steven.ranney at gmail.com> wrote:

> When I try to spTransform() the proj4string in barabay,
> spTransform(barabay, CRS("+proj=latlong +datum=WGS84 +ellps=WGS84
> +towgs84=0,0,0"))
> R prints out the object of barabay, including all of the lat/long values
> associated with the polygons.

 R doesn't (or rarely) replaces objects - you need to assign the
result of spTransform to something, eg:

barabayTrans = spTransform(barabay, CRS("..etc..."))

otherwise R just prints the result of spTransform, which is what you saw!


More information about the R-sig-Geo mailing list