Open mpadge opened 7 years ago
I think the rasterizing would be a really good approach. But fasterize
doesn't support linestrings so far. I tried raster::rasterize
as well, but that's just way too slow. Also, I'd really like to keep the non-CRAN dependencies at a minimum if possible.
I didn't get iheatmapr
to do what I want it today, but I'll try some more tomorrow or so. But there's also the CRAN issue with that.
One more possible solution I could think of would be to just display the n features with the highest probability. Or maybe all features above a certain threshold. What do you think about that?
Oh yeah, of course fasterize
is just about polygons, because otherwise you have to arbitrarily decide how thick a line is. That package wouldn't necessarily be a CRAN issue, because i guess Noam will get it there pretty soon, or else we could just steal his code (with his approval). But maybe not just a good solution.
Thresholding will likely be necessary at some stage regardless, but can't be relied upon just to speed up plotting. We'll have to find another solution ... Can you have a look into the shiny/leaflet code to see exactly what it's doing that might make it so slow? Once we know that we'll have a better idea how to speed it up - you could use profvis
, as described here to help you find which parts of the code are slowing things down so much.
Andi,
Not that you should or likely can incorporate this into your package, but I submitted bikedata
to CRAN today. The vignette includes this nice graphic which illustrates yet another approach to standard shortest-paths in R
. The magic happens in the stplanr::sum_network_links()
function.
Two ideas directly follow:
R
, and you'll note that it still takes a fair degree of hefty coding (and is sp
-reliant, rather than sf
, so is slower than need be). This could serve as a nice benchmark against which to demonstrate the superiority of osmprob
.Holy crap, you're really pumping out those packages at the moment :)
ad 1. I will! Actually, I've already made a very similar leaflet
map in this style and was going to use it anyway. But I also want to generate some static maps somehow, so this could be good for that.
ad 2. Also very good! I've been looking for comparable things to benchmark.
The slowness of shiny/leaflet will eventually be a problem. Nice example of potentially alternative approach?, or maybe convert
sf
objects toraster
prior to overlaying on leaflet.