mapview
mapview copied to clipboard
added SpatVector and SpatRaster methods to mapView.R
Hey @tim-salabim, I've been running into issue #432 and thought I would take a go at adding methods for SpatRaster and SpatVector. In short, I added a setMethod() for both SpatRaster and SpatVector from which the functions are .stars_method and sf_method. Essentially converting to either stars::st_as_stars('some_SpatRaster') or sf::st_as_sf('some_SpatVector'). Hope this might be of some help... Thanks again for this great package! I use it so so much. Take care.
Thanks for this @joshualerickson! Very helpful! Did you R CMD check the package? I think terra would need to be suggested/imported in DESCRIPTION (which I don't see in the PR).
Hey @tim-salabim I can’t remember? One thing I have noticed is devtools::document() won’t run successfully with the current head. Not a big deal (we’ll might be…) but not sure why?
I can run a check tomorrow evening and put terra in the suggests and then push. Thanks again for the sweet package!
No problem. I'll have a look tomorrow as well (a whole day of rain, so dev time 😁).
Seems to check just fine without having terra in DESCRIPTION. I'll merge as soon as minor thing above is addressed
Hi @joshualerickson @tim-salabim -- any updates on this?
(CC: @HannaMeyer)
Hey @Nowosad I can't remember why we didn't merge? @tim-salabim do you remember? Is it the issue with devtools::document()? The fork works locally (i've been using it) but when I check in dev I get the error below.
> devtools::document()
ℹ Updating mapview documentation
ℹ Loading mapview
Error in setMethod("mapView", signature(x = "RasterLayer"), function(x, :
no existing definition for function ‘mapView’
Warning message:
.onUnload failed in unloadNamespace() for 'mapview', details:
call: NULL
error: 'stopWatching' is not an exported object from 'namespace:mapview'
Not sure if this was the minor issue you were talking about 🤷
Sorry for the delay!