osm_search_notes {osmapiR} | R Documentation |
Search for notes
Description
Returns notes that match the specified query. If no query is provided, the most recently updated notes are returned.
Usage
osm_search_notes(
q,
user,
bbox,
from,
to,
closed = 7,
sort = c("updated_at", "created_at"),
order = c("newest", "oldest"),
limit = getOption("osmapir.api_capabilities")$api$notes["default_query_limit"],
format = c("R", "xml", "rss", "json", "gpx")
)
Arguments
q |
Text search query, matching either note text or comments. |
user |
Search for notes which the given user interacted with. The value can be the user id ( |
bbox |
Search area expressed as a string or a numeric vector of 4 coordinates of a valid bounding box
( |
from |
Beginning date range for |
to |
End date range for |
closed |
Specifies the number of days a note needs to be closed to no longer be returned. A value of 0 means only open notes are returned. A value of -1 means all notes are returned. 7 is the default. |
sort |
Sort results by creation ( |
order |
Sorting order. |
limit |
Maximum number of results between 1 and 10000 (may change, see |
format |
Format of the the returned list of notes. Can be |
Details
The notes will be ordered by the date of their last change, the most recent one will be first.
Value
If format = "R"
, returns a data frame with one map note per row. If format = "json"
, returns a list with the json
structure. For format
in "xml"
, "rss"
, and "gpx"
, a xml2::xml_document with the corresponding format.
See Also
Other get notes' functions:
osm_feed_notes()
,
osm_get_notes()
,
osm_read_bbox_notes()
Examples
notes <- osm_search_notes(
q = "POI", bbox = "0.1594133,40.5229822,3.3222508,42.8615226",
from = "2017-10-01", to = "2018-10-27T15:27A", limit = 10
)
notes
my_notes <- osm_search_notes(
user = "jmaspons", bbox = c(-0.1594133, 40.5229822, 3.322251, 42.861523),
closed = -1, format = "json"
)
my_notes