r-spatial / dtwSat

Time-Weighted Dynamic Time Warping for satellite image time series analysis
https://www.victor-maus.com/dtwSat/
GNU General Public License v3.0
130 stars 39 forks source link

error in twdtwAssess #20

Closed SRKabir closed 6 years ago

SRKabir commented 6 years ago

Hi Victor, I'm having problem with "twdtwAssess". It shows the following error: Error in to - from : non-numeric argument to binary operator In addition: Warning message: In FUN(X[[i]], ...) : Computing the approximate surface area in km2 of cells in an unprojected (longitude/latitude) Raster object. See ?raster::area

here are some info:

packageDescription("dtwSat")$Version [1] "0.2.4" str(validation_samples) 'data.frame': 52 obs. of 5 variables: $ longitude: num -2.87 -2.87 -2.87 -2.87 -2.87 ... $ latitude : num 56 56 56 56 56 ... $ from : Factor w/ 1 level "2016-03-14": 1 1 1 1 1 1 1 1 1 1 ... $ to : Factor w/ 1 level "2016-08-08": 1 1 1 1 1 1 1 1 1 1 ... $ label : Factor w/ 5 levels "Built","Forest",..: 2 2 2 2 2 2 2 1 1 1 ... str(prj_str) chr "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

r_lucc An object of class "twdtwRaster" Time series layers: Class Distance Time range: 2016-08-14 ... 2016-08-14 dimensions: 2 227 713 1 (nlayers, nrow, ncol, length) resolution: 8.333333e-05 8.333333e-05 (x, y) extent : -2.9195 -2.860083 55.95725 55.97617 (xmin, xmax, ymin, ymax) coord.ref.: +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

Thanks Kabir

vwmaus commented 6 years ago

@EnvSci can you provide a reproducible example as well as str(r_lucc)?

vwmaus commented 6 years ago

duplicated #23