Hello,
On line 177 of btb_smooth.R, you check that the length of the sEPSG argument is equal to 4 characters when the function is provided with a sf object:
stopifnot("sEPSG not valid "= identical(nchar(as.character(sEPSG)),4L))
However, the epsg code could be of a length greater than 4 character. You have such an instance in the second example that you provide:
# Example 2
data(reunion)
# Call mode 1: classic smoothing - automatic grid
reunionSmoothed <- btb_smooth( pts = reunion,
sEPSG = "32740",
iCellSize = 200L,
iBandwidth = 400L)
reunion is a data.frame, but if you transform it to a sf object and try to run the code, it errors:
# Example 2
data(reunion)
reunion <- sf::st_as_sf(reunion, coords = c("x","y"), crs = 32740)
# Call mode 1: classic smoothing - automatic grid
reunionSmoothed <- btb_smooth( pts = reunion,
iCellSize = 200L,
iBandwidth = 400L)
Error in btb_smooth(pts = reunion, iCellSize = 200L, iBandwidth = 400L) :
sEPSG not valid
Is there a reason I am not understanding for the check for a epsg length equal to 4?
Thank you, and thank you for your very useful package!
Hello,
On line 177 of
btb_smooth.R, you check that the length of thesEPSGargument is equal to 4 characters when the function is provided with asfobject:However, the epsg code could be of a length greater than 4 character. You have such an instance in the second example that you provide:
reunionis a data.frame, but if you transform it to asfobject and try to run the code, it errors:Is there a reason I am not understanding for the check for a epsg length equal to 4?
Thank you, and thank you for your very useful package!