Skip to content

Slow load times for map with ~600k river segments #72

@johnForne

Description

@johnForne

Kia ora
I've been testing whether we can use leafgl to report on river water quality data for New Zealand. From my testing, I've discovered that leafgl seems to work really fast and nicely for a subset river segments in New Zealand. However, once I try mapping all river segments using leafgl it becomes too slow to load the map. I would really appreciate your thoughts and insights into whether it is possible to speed up the time it takes to load the maps.

I have created a repository in Github to provide an example of the type of map that I'm trying to publish and for people to see the slow load times I'm getting (takes me approximately 2 minutes:20 seconds to load the shiny app. Note that the data used in this example is just the river lines data and doesn't include the river water quality attributes.

For context, we regularly publish environmental indicators using Shiny.io (see for example River water quality: clarity and turbidity). Currently we rasterize() the vector riverlines in order to get the load times and performance we need to make it useable.

From the README.md it is apparent that leafgl

allows rendering of a large amount of features on a leaflet map.

I suspect that the issue is that while I'm trying to plot ~600k river features (less that the 1 million points which the readme suggests should be ok) - that these are slower because there are effectively many more than a million points joined up to form the lines.

Just wanted to check if anyone had an ideas about how I might be able to publish the river lines as vector?

Thanks in advance,

John

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions