-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up trim_osmdata #178
Comments
I'm using osmium extract to operate directly on .osm files, based on a boundary stored in a geojson file, could it work for you ? The performance is quite good. I'm using it through system calls to the Windows Subsystem for Linux, from R, so it might be tricky to integrate it with in a stand alone R package. |
Yeah, for that kind of operation, |
Another option is to do the trimming on the server side (also means less downloaded data). Possibility 1.:
Full query:
Full query:
|
Yes indeed that would be useful @Mashin6, and better in all ways. One way to achieve it might be to introduce yet another opq(...) |>
add_osm_feature(...) |>
overpass_trim(...) |>
osmdata_<whatever>() There'd still be a use case for both forms, because area polygons don't always exist, and the current If you'd be interested in contributing more directly, please feel free to start a pull request to develop this further. Note also that #252 will require some kind of initial function to determine or validate an OSM area for a given nominatim query - just to check that the string corresponds to a single OSM relation ID. That would then also be used here. |
I agree. Having an option to trim locally by a custom polygon is a useful feature. I will start a new issue for the server side trimming. |
Because I finally had call to trim a huge data set (New York City within the official boundary polygon => around 700,000 vertices submitted to
sp::point.in.polygon
orsf::st_within
). The latter especially does not scale well at all, and took something like half an hour. I should just bundleclipper
like I already have inmoveability
and use that instead. That should make it entirely scalable.The text was updated successfully, but these errors were encountered: