2

I would like to transform coordinates expressed in the Swiss reference system LV95 into LatLong/WGS84. On the website of the Swiss topography centre, there is an application to do so, however altitude data are required and I don't have them.

In Plotting species distribution on map in R, the user also wants to convert from Lv95 into LatLong. I was wondering if the solution he gets (reprojecting his shapefile into lat/long) could also work for me, as I don't have a shapefile but just separate coordinates.

  • The application you link to does not appear to require altitude data, unless you check that box for step 3. Per the instructions "if needed". As for the other solution, you'd likely have to first create points out of your coordinates, and then reproject it. – Chris W Jul 21 '15 at 20:36
  • I thought that the application did not require altitude data at first too, but when I tried it, I got a box message saying that altitude data were necessary. – Lilio Jul 22 '15 at 12:54
1

This it's very easy using r package sp.

But you should give an example of your data. I'm going to suppose that you have a table with the points coordinates. And you can save this table on CSV format.

library(sp)

test <- read.csv("test.points.csv")

# We create a Spatial points data frame for our data, where X and Y are the fields with coordinates
coordinates(test) <- ~ X + Y

# We tell R our data it's on LV95, EPSG=2056
test@proj4string <- CRS("+init=epsg:2056")

# We can check the original coords
test@coords

# We can plot the data to check
plot(test)

# Then we transform the data to WGS84
test2 <- spTransform(test, CRS("+init=epsg:4326"))

# We can see the transformed coords
test2@coords
| improve this answer | |

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.