Hello everyone,

I have the coordinates of a weather station "Garmon" which are in epsg:4326 and I would like to convert them in epsg:31370. I first transformed the coordinates to a spatial object, then set the coordinates of the object to epsg:4326 as it was empty, and then changed the coordinates to epsg:31370.

However, the results I got does not match with reality. What could be wrong?

y = GARMON$LAT[1] #50.87991 #latitude

x = GARMON$LON[1] #4.696799 #longitude

coord <- cbind(x , y)

coord <- as.data.frame(coord) #prerequise for coordinate() function

coordinates(coord) <- ~ x + y #Create a spatial object

crs(coord) <- "+init=epsg:4326" #Set CRS because it was empty

coord <- spTransform(coord,CRS("+init=epsg:31370")) #Change CRS to 31370

coord@coords #x = 173176.6, y=174384.9 :wrong coordinates

#Should be x = 173086.5273 y= 174445.2110 in epsg:31370