Skip to content
Prev 1121 / 29559 Next

proj4 transform problem (Hungarian EOV CRS)

On Mon, 19 Jun 2006, B?lint Cz?cz wrote:

            
Actually, the problem is that you have wgs84 instead of WGS84:

library(rgdal)
EOV <- "+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 
  +alpha=90 +k=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m 
  +no_defs +towgs84=+57.01,-69.97,-9.29"
test <- matrix(c(5,1,5,2,6,2,6,1,5,1)*100000, ncol=2, byrow=TRUE)
test1 <- SpatialPolygons(list(Polygons(list(Polygon(test)),ID=1)), 
  proj4string=CRS(EOV))
test2 <- spTransform(test1, CRS("+proj=longlat +datum=WGS84"))
plot(test2, axes=TRUE)

Some of the proj4 names are sometimes case-sensitive, WGS84 is one of them
(contrast your use of WGS84 in cs2cs! I've used the rgdal package here -
it includes spproj - and the transform() methods have become
spTransform(), but otherwise this should now work.

Thanks for an excellent report!

Hope this helps,

Roger