Skip to content
Prev 3453 / 29559 Next

readOGR and proj4 string

On Thu, 10 Apr 2008, Agustin Lobo wrote:

            
Please ensure that t1 looks sane, spaces between tag=value pairs.

PBS have changed the way they store the UTM zone - it is now a top level 
attribute, but was an attribute of an attribute:

t1 <- CRS(paste("+proj=utm +zone=31 +ellps=intl",
    "+towgs84=-87.0,-98.0,-121.0,0.0,0.0,0.0,0.0"))
proj4string(x) <- t1
a1 <- SpatialPolygons2PolySet(x)
attr(a1, "projection")
attr(attr(a1, "projection"), "zone") <- attr(a1, "zone")
attr(a1, "projection")
a2 <- PolySet2SpatialPolygons(a1)

I'll update the function in due course.

Hope this helps,

Roger