1

I have some coordinated in SWEREF 99 TM which I cannot convert into WGS84 using the proj4 package in R.

temp <-  data.frame (x = c(598223, 598812, 598824, 598232, 597614, 597629), 
        y = c(7095460, 7095426, 7094827, 7094227, 7094821, 7095433))


ptransform(temp, 
    src.proj = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ',
    dst.proj = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs', silent=TRUE)

Note that the output is not equivalent to coordinates in Sweden - latitudes are equivalent to those near the equator.

2

I managed to convert the coordinates using the rgdal package:

temp <-  data.frame (x = c(598223, 598812, 598824, 598232, 597614, 597629), 
        y = c(7095460, 7095426, 7094827, 7094227, 7094821, 7095433))


temp <- SpatialPoints (temp, proj4string = CRS ('+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'))
cord.WGS84 <- spTransform(temp, CRS('+proj=longlat +datum=WGS84 +no_defs'))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.