-
Notifications
You must be signed in to change notification settings - Fork 46
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
[FEATURE] Limit queries to specific feature types #257
Comments
Addressing this would also require finally thinking about the by-now-four-year-old #55. In principle at the overpass side, each of these combinatorial possibilities (so from This simplicity was a very large part of the initial motivation for the package, and not something we would want to compromise. That just means that, if this were to be implemented, it would need to be done in a way that was as nonintrusive as possible, so nobody who didn't care about this would have to. And now the even bigger issue: The current "always-recurse-down" implementation ensures that all queries return sensibly complete spatial objects. Embarking upon any of these options opens up the possibilities of returning objects that make sense in the OSM domain, but which are difficult to convert into Simple Features format. I personally don't have any great issue with that, and would love a world in which everybody was happy with |
I think it is totally possible to keep it simple with good defaults.
opq_osm_id (type = "node", id = 243398687) |>
get_parent_objects() |>
osmdata_sf ()
|
Implementation of this is dependent on #255.
Currently each query is run on all three types of objects
node
,way
andrelation
written as three separate lines. There is only one way how to change this and that is withopq(..., nodes_only = TRUE)
that sets an attribute in opq object. If #255 gets implemented I could imagine adding another parameter that would specify type of objects.get_osm_features(match_all = c("natural = tree", "leaf_type = broadleaved"), type = "n")
Possible
type
values and their translations:n
:node[natural=tree][leaf_type=boradleaved];
w
:way[...
r
:rel[...
nw
:nw[...
nr
:nr[...
wr
:wr[...
nwr
:nwr[...
This will be stored by
get_osm_features
in newopq$type
slot. Length of$type
has to match length of$features
.The text was updated successfully, but these errors were encountered: