Skip to content
Prev 11856 / 29559 Next

newbie bbox type question

Coercion with 'as' seems to fail for me:

 > rb=bbox(r)
 > rb
        min       max
x -2.840466 -2.342137
y 54.042700 54.339724
 > as(rb,"Spatial")

Error in as(rb, "Spatial") :
  no method or default for coercing "matrix" to "Spatial"

but using Spatial() works:

 plot(Spatial(rb))

despite the warning about Spatial being an abstract class...
Texas may be awake now, but I think it might be a holiday in the USA...

Barry