OSM Guadeloupe trail relation

Day 2 of 30DayMapChallenge
R
30DayMapChallenge
spatial
OSM
datavisualization
Author

Michaël

Published

2023-11-02

Modified

2023-11-02

A photo of tropical forest in Guadeloupe

Guadeloupe – CC-BY-SA by SnippyHolloW

Day 2 of 30DayMapChallenge: « Lines » (previously).

Using data from Openstreetmap we will map the GR G1 trail (fr) crossing Guadeloupe. We could use {osmdata} (see this post), but in this case it’s easier to just grab a GPX file from Waymarked Trail (see the link in lower right corner).

library(sf)
library(tidyverse)
library(leaflet)

st_layers("https://hiking.waymarkedtrails.org/api/v1/details/relation/10692471/geometry/gpx")
Driver: GPX 
Available layers:
    layer_name     geometry_type features fields crs_name
1    waypoints             Point        0     23   WGS 84
2       routes       Line String        0     12   WGS 84
3       tracks Multi Line String        1     12   WGS 84
4 route_points             Point        0     25   WGS 84
5 track_points             Point     3673     26   WGS 84
gr <- read_sf("https://hiking.waymarkedtrails.org/api/v1/details/relation/10692471/geometry/gpx",
              layer = "tracks")
# Map
leaflet(gr) |> 
  addPolylines() |> 
  addTiles()
Figure 1: GR G1 in Guadeloupe