0

I have have received data in the following long-lat format (3 examples):

x<-c(21.568216, 21.550362, 21.549982)
y<-c(100.4606,100.4362,100.4797)

I need to transform this data into UTM Zone 47 by using R. I am trying this by using the following post: the post at the very bottom. But I get always the error:

Error in `proj4string<-`(`*tmp*`, value = <S4 object of class "CRS">) : 
  Geographical CRS given to non-conformant data: 100.522355

I have tried other approaches like here or here but the problem persists. I have come to the conclusion that the formatting of my data is not in the right format. What is wrong with my data and how can I make it right?

Community
  • 1
  • 1
Lukas
  • 211
  • 3
  • 11
  • 1
    From `?proj4string`: `attempts to assign an object containing “longlat” to data extending beyond longitude [-180, 360] or lattitude [-90, 90] will be stopped.` My guess is that you are exceeding that limit. – slamballais Apr 22 '16 at 12:40
  • That means my x and Y coordinates are named wrong? So y is x and x is y? – Lukas Apr 22 '16 at 12:52
  • Well, is your `x` actually lattitude? If yes, then you mixed them up. If no, then I don't know why your `y` exceeds 90 in this case. Also, I don't know enough about these functions to further comment on it, but this was the first thing I found. – slamballais Apr 22 '16 at 12:54
  • I think this is one problem solved! Thanks, a few remain. – Lukas Apr 22 '16 at 13:22

0 Answers0