diff --git a/R/cutPlot.R b/R/cutPlot.R index 2b1bc2b..1d15feb 100644 --- a/R/cutPlot.R +++ b/R/cutPlot.R @@ -98,9 +98,10 @@ cutPlot <- function(projCoord, plot, cornerNum, gridsize = 100, dimX = 200, dimY )) # Transformation of relative grid coordinates into absolute coordinates - absCoord <- bilinearInterpolation(relCoord = gridMat , cornerCoord = data[,.(X,Y,cornerNum)] ,dimX = plotDimX, dimY = plotDimY ) + #absCoord <- bilinearInterpolation(relCoord = gridMat , cornerCoord = data[,.(X,Y,cornerNum)] ,dimX = plotDimX, dimY = plotDimY ) + absCoord <- bilinearInterpolation(coord = gridMat , fromCornerCoord = relCoordMat , toCornerCoord = absCoordMat ) - return(data.table(XRel = gridMat[, 1], YRel = gridMat[, 2], absCoord[, 1], absCoord[, 2])) + return(data.table(XRel = gridMat[, 1], YRel = gridMat[, 2], XAbs=absCoord[, 1], YAbs=absCoord[, 2])) } # Apply gridFunction to all plots