Skip to content

Commit

Permalink
Format xml blocs in docs (tabs -> 2 spaces)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaspons committed Nov 17, 2024
1 parent f49f450 commit 28154d2
Show file tree
Hide file tree
Showing 18 changed files with 499 additions and 499 deletions.
16 changes: 8 additions & 8 deletions R/osm_get_gpx_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
#' ```xml
#' <?xml version="1.0" encoding="UTF-8"?>
#' <osm version="0.6" generator="OpenStreetMap server">
#' <gpx_file id="836619" name="track.gpx" lat="52.0194" lon="8.51807" uid="1234" user="Hartmut Holzgraefe" visibility="public" pending="false" timestamp="2010-10-09T09:24:19Z">
#' <description>PHP upload test</description>
#' <tag>test</tag>
#' <tag>php</tag>
#' </gpx_file>
#' <gpx_file>
#' ...
#' </gpx_file>
#' <gpx_file id="836619" name="track.gpx" lat="52.0194" lon="8.51807" uid="1234" user="Hartmut Holzgraefe" visibility="public" pending="false" timestamp="2010-10-09T09:24:19Z">
#' <description>PHP upload test</description>
#' <tag>test</tag>
#' <tag>php</tag>
#' </gpx_file>
#' <gpx_file>
#' ...
#' </gpx_file>
#' </osm>
#' ```
#' @family get GPS' functions
Expand Down
42 changes: 21 additions & 21 deletions R/osm_get_notes.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@
#' ``` xml
#' <?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>
#' ...
#' <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>
#' ```
#'
Expand Down
26 changes: 13 additions & 13 deletions R/osm_get_points_gps.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
#' ``` xml
#' <?xml version="1.0" encoding="UTF-8"?>
#' <gpx version="1.0" creator="OpenStreetMap.org" xmlns="http://www.topografix.com/GPX/1/0">
#' <trk>
#' <name>20190626.gpx</name>
#' <desc>Footpaths near Blackweir Pond, Epping Forest</desc>
#' <url>https://api.openstreetmap.org/user/John%20Leeming/traces/3031013</url>
#' <trkseg>
#' <trkpt lat="51.6616100" lon="0.0534560">
#' <time>2019-06-26T14:27:58Z</time>
#' </trkpt>
#' ...
#' </trkseg>
#' ...
#' </trk>
#' ...
#' <trk>
#' <name>20190626.gpx</name>
#' <desc>Footpaths near Blackweir Pond, Epping Forest</desc>
#' <url>https://api.openstreetmap.org/user/John%20Leeming/traces/3031013</url>
#' <trkseg>
#' <trkpt lat="51.6616100" lon="0.0534560">
#' <time>2019-06-26T14:27:58Z</time>
#' </trkpt>
#' ...
#' </trkseg>
#' ...
#' </trk>
#' ...
#' </gpx>
#' ```
#' * This response is NOT wrapped in an OSM xml parent element.
Expand Down
46 changes: 23 additions & 23 deletions R/osm_get_user_details.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
#' Returns a [xml2::xml_document-class] with the following format:
#' ``` xml
#' <osm version="0.6" generator="OpenStreetMap server">
#' <user id="12023" display_name="jbpbis" account_created="2007-08-16T01:35:56Z">
#' <description></description>
#' <contributor-terms agreed="false"/>
#' <img href="http://www.gravatar.com/avatar/c8c86cd15f60ecca66ce2b10cb6b9a00.jpg?s=256&amp;d=http%3A%2F%2Fwww.openstreetmap.org%2Fassets%2Fusers%2Fimages%2Flarge-39c3a9dc4e778311af6b70ddcf447b58.png"/>
#' <roles>
#' </roles>
#' <changesets count="1"/>
#' <traces count="0"/>
#' <blocks>
#' <received count="0" active="0"/>
#' </blocks>
#' </user>
#' <user id="210447" display_name="siebh" account_created="2009-12-20T10:11:42Z">
#' <description></description>
#' <contributor-terms agreed="true"/>
#' <roles>
#' </roles>
#' <changesets count="267"/>
#' <traces count="1"/>
#' <blocks>
#' <received count="0" active="0"/>
#' </blocks>
#' </user>
#' <user id="12023" display_name="jbpbis" account_created="2007-08-16T01:35:56Z">
#' <description></description>
#' <contributor-terms agreed="false"/>
#' <img href="http://www.gravatar.com/avatar/c8c86cd15f60ecca66ce2b10cb6b9a00.jpg?s=256&amp;d=http%3A%2F%2Fwww.openstreetmap.org%2Fassets%2Fusers%2Fimages%2Flarge-39c3a9dc4e778311af6b70ddcf447b58.png"/>
#' <roles>
#' </roles>
#' <changesets count="1"/>
#' <traces count="0"/>
#' <blocks>
#' <received count="0" active="0"/>
#' </blocks>
#' </user>
#' <user id="210447" display_name="siebh" account_created="2009-12-20T10:11:42Z">
#' <description></description>
#' <contributor-terms agreed="true"/>
#' <roles>
#' </roles>
#' <changesets count="267"/>
#' <traces count="1"/>
#' <blocks>
#' <received count="0" active="0"/>
#' </blocks>
#' </user>
#' </osm>
#' ```
#'
Expand Down
74 changes: 37 additions & 37 deletions R/osmapi_changesets.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
# The payload of a changeset creation request is the metadata of this changeset. The body of the request has to include one or more `changeset` elements, which optionally include an arbitrary number of tags (such as 'comment', 'created_by", ...). All `changeset` elements need to be enclosed in an `osm` element.
# <syntaxhighlight lang="xml">
# <osm>
# <changeset>
# <tag k="created_by" v="JOSM 1.61"/>
# <tag k="comment" v="Just adding some streetnames"/>
# ...
# </changeset>
# ...
# <changeset>
# <tag k="created_by" v="JOSM 1.61"/>
# <tag k="comment" v="Just adding some streetnames"/>
# ...
# </changeset>
# ...
# </osm>
# </syntaxhighlight>
# If there are multiple `changeset` elements in the XML the tags from all of them are used, later ones overriding the earlier ones in case of duplicate keys.
Expand Down Expand Up @@ -148,20 +148,20 @@ osm_create_changeset <- function(comment, ...,
# <syntaxhighlight lang="xml">
#
# <osm version="0.6" generator="CGImap 0.9.3 (987909 spike-08.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
# <changeset id="10" created_at="2008-11-08T19:07:39+01:00" open="true" user="fred" uid="123" min_lon="7.0191821" min_lat="49.2785426" max_lon="7.0197485" max_lat="49.2793101" comments_count="3" changes_count="10">
# <tag k="created_by" v="JOSM 1.61"/>
# <tag k="comment" v="Just adding some streetnames"/>
# ...
# <discussion>
# <comment id="1234" date="2015-01-01T18:56:48Z" uid="1841" user="metaodi">
# <text>Did you verify those street names?</text>
# </comment>
# <comment id="5678" date="2015-01-01T18:58:03Z" uid="123" user="fred">
# <text>sure!</text>
# </comment>
# ...
# </discussion>
# </changeset>
# <changeset id="10" created_at="2008-11-08T19:07:39+01:00" open="true" user="fred" uid="123" min_lon="7.0191821" min_lat="49.2785426" max_lon="7.0197485" max_lat="49.2793101" comments_count="3" changes_count="10">
# <tag k="created_by" v="JOSM 1.61"/>
# <tag k="comment" v="Just adding some streetnames"/>
# ...
# <discussion>
# <comment id="1234" date="2015-01-01T18:56:48Z" uid="1841" user="metaodi">
# <text>Did you verify those street names?</text>
# </comment>
# <comment id="5678" date="2015-01-01T18:58:03Z" uid="123" user="fred">
# <text>sure!</text>
# </comment>
# ...
# </discussion>
# </changeset>
# </osm>
# </syntaxhighlight>
#
Expand Down Expand Up @@ -239,20 +239,20 @@ osm_create_changeset <- function(comment, ...,
#' Returns a [xml2::xml_document-class] with the following format:
#' ``` xml
#' <osm version="0.6" generator="CGImap 0.9.3 (987909 spike-08.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
#' <changeset id="10" created_at="2008-11-08T19:07:39+01:00" open="true" user="fred" uid="123" min_lon="7.0191821" min_lat="49.2785426" max_lon="7.0197485" max_lat="49.2793101" comments_count="3" changes_count="10">
#' <tag k="created_by" v="JOSM 1.61"/>
#' <tag k="comment" v="Just adding some streetnames"/>
#' ...
#' <discussion>
#' <comment id="1234" date="2015-01-01T18:56:48Z" uid="1841" user="metaodi">
#' <text>Did you verify those street names?</text>
#' </comment>
#' <comment id="5678" date="2015-01-01T18:58:03Z" uid="123" user="fred">
#' <text>sure!</text>
#' </comment>
#' ...
#' </discussion>
#' </changeset>
#' <changeset id="10" created_at="2008-11-08T19:07:39+01:00" open="true" user="fred" uid="123" min_lon="7.0191821" min_lat="49.2785426" max_lon="7.0197485" max_lat="49.2793101" comments_count="3" changes_count="10">
#' <tag k="created_by" v="JOSM 1.61"/>
#' <tag k="comment" v="Just adding some streetnames"/>
#' ...
#' <discussion>
#' <comment id="1234" date="2015-01-01T18:56:48Z" uid="1841" user="metaodi">
#' <text>Did you verify those street names?</text>
#' </comment>
#' <comment id="5678" date="2015-01-01T18:58:03Z" uid="123" user="fred">
#' <text>sure!</text>
#' </comment>
#' ...
#' </discussion>
#' </changeset>
#' </osm>
#' ```
#'
Expand Down Expand Up @@ -340,9 +340,9 @@ osm_read_changeset <- function(changeset_id, include_discussion = FALSE,
# Payload should be an OSM document containing the new version of a single changeset. Bounding box, update time and other attributes are ignored and cannot be updated by this method. Only those tags provided in this call remain in the changeset object. For updating the bounding box see the ''expand_bbox'' method.
# <syntaxhighlight lang="xml">
# <osm>
# <changeset>
# <tag k="comment" v="Just adding some streetnames and a restaurant"/>
# </changeset>
# <changeset>
# <tag k="comment" v="Just adding some streetnames and a restaurant"/>
# </changeset>
# </osm>
# </syntaxhighlight>
#
Expand Down
50 changes: 25 additions & 25 deletions R/osmapi_elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@
# A Node:
# <syntaxhighlight lang="xml">
# <osm>
# <node changeset="12" lat="..." lon="...">
# <tag k="note" v="Just a node"/>
# ...
# </node>
# <node changeset="12" lat="..." lon="...">
# <tag k="note" v="Just a node"/>
# ...
# </node>
# </osm>
# </syntaxhighlight>
# A Way:
# <syntaxhighlight lang="xml">
# <osm>
# <way changeset="12">
# <tag k="note" v="Just a way"/>
# ...
# <nd ref="123"/>
# <nd ref="4345"/>
# ...
# </way>
# <way changeset="12">
# <tag k="note" v="Just a way"/>
# ...
# <nd ref="123"/>
# <nd ref="4345"/>
# ...
# </way>
# </osm>
# </syntaxhighlight>
# A Relation:
# <syntaxhighlight lang="xml">
# <osm>
# <relation changeset="12">
# <tag k="note" v="Just a relation"/>
# ...
# <member type="node" role="stop" ref="123"/>
# <member type="way" ref="234"/>
# </relation>
# <relation changeset="12">
# <tag k="note" v="Just a relation"/>
# ...
# <member type="node" role="stop" ref="123"/>
# <member type="way" ref="234"/>
# </relation>
# </osm>
# </syntaxhighlight>
# If multiple elements are provided only the first is created. The rest is discarded (this behavior differs from changeset creation).
Expand Down Expand Up @@ -167,10 +167,10 @@ osm_create_object <- function(x, changeset_id) {
# XML representing the element, wrapped in an <code><osm></code> element:
# <syntaxhighlight lang="xml">
# <osm>
# <node id="123" lat="..." lon="..." version="142" changeset="12" user="fred" uid="123" visible="true" timestamp="2005-07-30T14:27:12+01:00">
# <tag k="note" v="Just a node"/>
# ...
# </node>
# <node id="123" lat="..." lon="..." version="142" changeset="12" user="fred" uid="123" visible="true" timestamp="2005-07-30T14:27:12+01:00">
# <tag k="note" v="Just a node"/>
# ...
# </node>
# </osm>
# </syntaxhighlight>
#
Expand Down Expand Up @@ -255,9 +255,9 @@ osm_read_object <- function(osm_type = c("node", "way", "relation"),
# This example is an update of the node 4326396331, updating the version 1 to alter existing tags. This change is made while the changeset with id 188021 is still open:
# <syntaxhighlight lang="xml">
# <osm>
# <node changeset="188021" id="4326396331" lat="50.4202102" lon="6.1211032" version="1" visible="true">
# <tag k="foo" v="barzzz" />
# </node>
# <node changeset="188021" id="4326396331" lat="50.4202102" lon="6.1211032" version="1" visible="true">
# <tag k="foo" v="barzzz" />
# </node>
# </osm>
# </syntaxhighlight>
#
Expand Down Expand Up @@ -402,7 +402,7 @@ osm_update_object <- function(x, changeset_id) {
#
# <syntaxhighlight lang="xml">
# <osm>
# <node id="..." version="..." changeset="..." lat="..." lon="..." />
# <node id="..." version="..." changeset="..." lat="..." lon="..." />
# </osm>
# </syntaxhighlight>
#
Expand Down
Loading

0 comments on commit 28154d2

Please sign in to comment.