You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int num_nodes = sel.select_nodes_from_bbox(b, MAX_NODES);
if (num_nodes > MAX_NODES) {
throwhttp::bad_request(
(format("You requested too many nodes (limit is %1%). ""Either request a smaller area, or use planet.osm")
% MAX_NODES).str());
}
We've said it would be good to the max values configurable before, but now I have a project that could use it, so I have some motivation to fixing it.
I think it makes sense to change where the logic is being evaluated at the same time.
You can imagine a backend which caches in a tiled schema so it makes sense to return a larger area than requested for small requests. This could mean that for an area with an exceptionally high node density that the number of nodes selected will always be >MAX_NODES.
Another example is a backend that somehow knows that a particular request will be more than MAX_NODES without running it. It would be foolish to run it, but the number of nodes selected for select_nodes_from_bbox would be 0.
This could be accommodated by changing select_nodes_from_bbox(b,MAX_NODES) to throw http::bad_request itself
The text was updated successfully, but these errors were encountered:
Currently we define
with the logic
We've said it would be good to the max values configurable before, but now I have a project that could use it, so I have some motivation to fixing it.
I think it makes sense to change where the logic is being evaluated at the same time.
You can imagine a backend which caches in a tiled schema so it makes sense to return a larger area than requested for small requests. This could mean that for an area with an exceptionally high node density that the number of nodes selected will always be >MAX_NODES.
Another example is a backend that somehow knows that a particular request will be more than MAX_NODES without running it. It would be foolish to run it, but the number of nodes selected for select_nodes_from_bbox would be 0.
This could be accommodated by changing
select_nodes_from_bbox(b,MAX_NODES)
to throwhttp::bad_request
itselfThe text was updated successfully, but these errors were encountered: