Error: sEPSG not valid
- Dominant language
- C++
- Stars
- 20
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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:
```r
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:
```r
# 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:
```r
# 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!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.