0

I'm trying to plot lines from a gpkg using leaflet, but many of the lines are missing. I don't think it is a problem with the gpkg of sf, because all the lines plot fine when using ggplot. Here is some example code: leaflet() %>% addPolylines(data=subset(waterWaysDb_sf)

vs

ggplot(data = waterWaysDb_sf) + geom_sf()

And here is the gpkg: https://drive.google.com/file/d/13SPdY25C0JMJEqSqG4uEGIvUl4NqDsYG/view?usp=sharing

I saw some folks in other questions mention updating leaflet and ensuring that names(st_geometry(thegpkg)) = NULL, but neither of those have helped here.

Here are the outputs using leaflet: enter image description here

And here are the outputs using ggplot:

enter image description here

You can see that most of the interior waterways in the US are missing from the leaflet plot.

0

Browse other questions tagged or ask your own question.