Skip to content

Query splitter #581

Open
Open

Description

@petervelosy

Is your feature request related to a problem? Please describe

Large queries frequently result in an Overpass timeout.

Describe the solution you'd like

A feature that splits large queries geographically. It triggers a geographic split reactively after an Overpass timeout until a response is received within a reasonable execution time.

Example: Download all city nodes in Germany. Query times out. The plugin splits the query into bounding boxes and tries it again and so on.

Perhaps the plugin could measure the response time of each bbox against the Overpass server's timeout to get a feel of "how close we are to the limit with the current bbox size" (provided the returned features are approximately evenly distributed) and use this information to find the ideal bbox size.

In case of non-point features, an "intersects" query could be used for each bounding box and the result set could be deduplicated, when splitting a large "in" query.

A similar algorithm is implemented in the R package "osmdata" here: https://docs.ropensci.org/osmdata/articles/query-split.html

Describe alternatives you've considered

Manually splitting the query or writing a script that emits queries - both are very tedious when entered by hand into QuickOSM.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions