Closed sigmafelix closed 1 month ago
You may need to S4 register the class, using setOldClass("bbox")
, so that S4 can dispatch on it. It would be reasonable to assume sf
does this, but that has not happened so far:
$ grep setOld *R
init.R:setOldClass("sf")
init.R:setOldClass(c("sfc_POINT", "sfc"))
init.R:setOldClass(c("sfc_MULTIPOINT", "sfc"))
init.R:setOldClass(c("sfc_LINESTRING", "sfc"))
init.R:setOldClass(c("sfc_MULTILINESTRING", "sfc"))
init.R:setOldClass(c("sfc_POLYGON", "sfc"))
init.R:setOldClass(c("sfc_MULTIPOLYGON", "sfc"))
init.R:setOldClass(c("sfc_GEOMETRY", "sfc"))
init.R:setOldClass(c("sfc_GEOMETRYCOLLECTION", "sfc"))
init.R:setOldClass("sfg")
init.R:setOldClass("crs")
sgbp.R:setOldClass("sgbp")
sp.R:setOldClass("XY")
Thank you for the prompt response and the new push.
st_bbox()
output has class that is reported whenclass()
is run, however, when a S4 method tries to utilize this information, I encounter a "no definition for class bbox" error.Reproducible example
With
sf
class object, S4 method works properly: