Skip to contents

Returns the existing notes in the specified bounding box. The notes will be ordered by the date of their last change, the most recent one will be first.

Usage

osm_read_bbox_notes(
  bbox,
  limit = 100,
  closed = 7,
  format = c("R", "sf", "xml", "rss", "json", "gpx")
)

Arguments

bbox

Coordinates for the area to retrieve the notes from (left,bottom,right,top). Floating point numbers in degrees, expressing a valid bounding box, not larger than the configured size limit, 25 square degrees, not overlapping the dateline.

limit

Specifies the number of entries returned at max. A value between 1 and 10000 is valid. Default to 100.

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. Default to 7.

format

Format of the output. Can be "R" (default), "sf" "xml", "rss", "json" or "gpx".

Value

If format = "R", returns a data frame with one map note per row. If format = "sf", returns a sf object from sf.

format = "xml"

Returns a xml2::xml_document with the following format:

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="https://www.openstreetmap.org/copyright" license="https://opendatacommons.org/licenses/odbl/1-0/">
  <note lon="0.1000000" lat="51.0000000">
    <id>16659</id>
    <url>https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659</url>
    <comment_url>https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659/comment</comment_url>
    <close_url>https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659/close</close_url>
    <date_created>2019-06-15 08:26:04 UTC</date_created>
    <status>open</status>
    <comments>
      <comment>
        <date>2019-06-15 08:26:04 UTC</date>
        <uid>1234</uid>
        <user>userName</user>
        <user_url>https://master.apis.dev.openstreetmap.org/user/userName</user_url>
        <action>opened</action>
        <text>ThisIsANote</text>
        <html>&lt;p&gt;ThisIsANote&lt;/p&gt;</html>
      </comment>
      ...
    </comments>
  </note>
  ...
</osm>

format = "json"

Returns a list with the following json structure:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {"type": "Point", "coordinates": [0.1000000, 51.0000000]},
      "properties": {
        "id": 16659,
        "url": "https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659.json",
        "comment_url": "https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659/comment.json",
        "close_url": "https://master.apis.dev.openstreetmap.org/api/0.6/notes/16659/close.json",
        "date_created": "2019-06-15 08:26:04 UTC",
        "status": "open",
        "comments": [
          {"date": "2019-06-15 08:26:04 UTC", "uid": 1234, "user": "userName", "user_url": "https://master.apis.dev.openstreetmap.org/user/userName", "action": "opened", "text": "ThisIsANote", "html": "<p>ThisIsANote</p>"},
          ...
        ]
      }
    }
  ]
}

format = "rss" & format = "gpx"

For format in "rss", and "gpx", a xml2::xml_document with the corresponding format.

Note

The comment properties (uid, user, user_url) will be omitted if the comment was anonymous.

See also

Examples

notes <- osm_read_bbox_notes(bbox = c(3.7854767, 39.7837403, 4.3347931, 40.1011851), limit = 10)
## bbox as a character value also works (bbox = "3.7854767,39.7837403,4.3347931,40.1011851").
notes
#>          lon        lat      id
#> 1  3.8966313 39.9235207 3876566
#> 2  3.8953735 39.9280748 3139391
#> 3  3.8923717 39.9277469 2295586
#> 4  3.8345008 39.9998912 3987138
#> 5  4.2707197 39.8881776 5029532
#> 6  3.9106600 39.9387017 5026416
#> 7  3.9640971 39.9393598 5016036
#> 8  3.9640783 39.9393557 5016035
#> 9  3.9883139 39.9316044 4994892
#> 10 4.0344053 39.9174052 4985304
#>                                                        url
#> 1  https://api.openstreetmap.org/api/0.6/notes/3876566.xml
#> 2  https://api.openstreetmap.org/api/0.6/notes/3139391.xml
#> 3  https://api.openstreetmap.org/api/0.6/notes/2295586.xml
#> 4  https://api.openstreetmap.org/api/0.6/notes/3987138.xml
#> 5  https://api.openstreetmap.org/api/0.6/notes/5029532.xml
#> 6  https://api.openstreetmap.org/api/0.6/notes/5026416.xml
#> 7  https://api.openstreetmap.org/api/0.6/notes/5016036.xml
#> 8  https://api.openstreetmap.org/api/0.6/notes/5016035.xml
#> 9  https://api.openstreetmap.org/api/0.6/notes/4994892.xml
#> 10 https://api.openstreetmap.org/api/0.6/notes/4985304.xml
#>                                                        comment_url
#> 1                                                             <NA>
#> 2                                                             <NA>
#> 3                                                             <NA>
#> 4                                                             <NA>
#> 5  https://api.openstreetmap.org/api/0.6/notes/5029532/comment.xml
#> 6  https://api.openstreetmap.org/api/0.6/notes/5026416/comment.xml
#> 7  https://api.openstreetmap.org/api/0.6/notes/5016036/comment.xml
#> 8  https://api.openstreetmap.org/api/0.6/notes/5016035/comment.xml
#> 9  https://api.openstreetmap.org/api/0.6/notes/4994892/comment.xml
#> 10 https://api.openstreetmap.org/api/0.6/notes/4985304/comment.xml
#>                                                        close_url
#> 1                                                           <NA>
#> 2                                                           <NA>
#> 3                                                           <NA>
#> 4                                                           <NA>
#> 5  https://api.openstreetmap.org/api/0.6/notes/5029532/close.xml
#> 6  https://api.openstreetmap.org/api/0.6/notes/5026416/close.xml
#> 7  https://api.openstreetmap.org/api/0.6/notes/5016036/close.xml
#> 8  https://api.openstreetmap.org/api/0.6/notes/5016035/close.xml
#> 9  https://api.openstreetmap.org/api/0.6/notes/4994892/close.xml
#> 10 https://api.openstreetmap.org/api/0.6/notes/4985304/close.xml
#>           date_created status
#> 1  2023-09-07 20:57:14 closed
#> 2  2022-04-18 10:33:38 closed
#> 3  2020-08-05 20:32:23 closed
#> 4  2023-11-14 14:31:29 closed
#> 5  2025-10-30 09:33:03   open
#> 6  2025-10-28 13:38:07   open
#> 7  2025-10-21 06:59:45   open
#> 8  2025-10-21 06:59:45   open
#> 9  2025-10-07 15:10:55   open
#> 10 2025-09-30 09:54:57   open
#>                                                           comments
#> 1  2 comments from 2023-09-07 to 2025-11-12 by diibv, Hugoren M...
#> 2  2 comments from 2022-04-18 to 2025-11-12 by fifirifi, Hugore...
#> 3  2 comments from 2020-08-05 to 2025-11-12 by Manu793, Hugoren...
#> 4  2 comments from 2023-11-14 to 2025-11-09 by samel, grau trav...
#> 5                            1 comment from 2025-10-30 by TrixTrax
#> 6                       1 comment from 2025-10-28 by Geovelo_Notes
#> 7                            1 comment from 2025-10-21 by TrixTrax
#> 8                            1 comment from 2025-10-21 by TrixTrax
#> 9                            1 comment from 2025-10-07 by TrixTrax
#> 10                        1 comment from 2025-09-30 by PiaVespRoll