Professional Documents
Culture Documents
3. Converting coordinates
Then load your data, in my case was
data = read.csv('27-1997data.csv') or
data <- read.csv('27-1997data.csv')
I often use the first one with = sign to avoid me hitting shift key.
Then you must set your existing coordinate system. Because otherwise, R will treat your x and y as plain data, not coordinate. In this case we
SpatialPoints:
coords.x1 coords.x2
[1,]
783993 10767111
[2,]
778949 10758896
[3,]
784001 10765562
[4,]
789969 10766259
[5,]
783890 10765672
[6,]
785760 10767453
[7,]
777100 10753022
[8,]
776305 10757112
[9,]
776193 10757222
[10,]
785220 10765016
[11,]
779750 10753921
[12,]
790006 10759509
[13,]
785175 10752843
[14,]
780604 10759679
[15,]
784444 10765343
[16,]
777882 10751587
[17,]
782471 10762234
[18,]
782032 10761457
[19,]
783456 10764121
[20,]
786240 10760484
[21,]
775304 10758102
[22,]
785175 10752843
[23,]
785175 10752843
[24,]
785175 10752843
[25,]
785175 10752843
[26,]
782141 10761790
[27,]
791358 10754868
[28,]
776638 10756892
[29,]
779824 10760892
[30,]
783354 10762571
[31,]
783804 10761135
[32,]
779808 10763769
[33,]
785175 10752843
[34,]
785175 10752843
[35,]
785379 10756053
[36,]
785175 10752843
[37,]
778412 10755906
[38,]
785310 10748307
[39,]
784556 10765233
[40,]
784116 10764678
[41,]
785175 10752843
[42,]
768459 10755854
[43,]
785175 10752843
[44,]
771336 10755537
[45,]
785257 10758266
[46,]
785175 10752843
[47,]
781714 10759021
[48,]
779287 10757791
[49,]
785247 10760147
[50,]
790201 10764158
[51,]
784267 10757264
Coordinate Reference System (CRS) arguments: +init=epsg:32748
+proj=utm +zone=48 +south +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0
# Plotting points
par(mfrow = c(1, 2))
plot(cord.dec, axes = TRUE, main = "Lat-Long Coordinates", cex.axis = 0.95)
plot(cord.UTM, axes = TRUE, main = "UTM Coordinates", col = "red", cex.axis = 0.95)