Helper function to stitch tile coordinates together to form one complete picture
Examples
location_file <- data.table::data.table(
field = rep(c(1, 2), 5),
X.X = rnorm(10), Y.Y = rnorm(10), XtileIndex = seq_len(10),
YtileIndex = seq_len(10)
)
stitchTileCoordinates(location_file, Xtilespan = 0.5, Ytilespan = 0.5)
#> field X.X Y.Y XtileIndex YtileIndex Xcoord Ycoord
#> <num> <num> <num> <int> <int> <num> <num>
#> 1: 1 1.8788842 -0.6380339 1 1 1.87888423 -0.6380339
#> 2: 2 0.1590069 -1.0957999 2 2 0.65900687 -0.5957999
#> 3: 1 -0.1069341 1.0024878 3 3 0.89306589 2.0024878
#> 4: 2 -1.4611245 1.3914528 4 4 0.03887555 2.8914528
#> 5: 1 -0.7023167 0.1196433 5 5 1.29768329 2.1196433
#> 6: 2 0.9188768 -1.3120106 6 6 3.41887685 1.1879894
#> 7: 1 1.4691341 -0.3885520 7 7 4.46913414 2.6114480
#> 8: 2 -0.1815672 -0.1108921 8 8 3.31843281 3.3891079
#> 9: 1 0.7793798 -1.3222087 9 9 4.77937978 2.6777913
#> 10: 2 1.0789663 -1.2427025 10 10 5.57896627 3.2572975