| ox_to_geojson | R Documentation |
Writes the graph's edges (or nodes) to a GeoJSON file via sf::st_write().
Geometry is transformed to EPSG:4326, the GeoJSON standard CRS.
ox_to_geojson(g, path, layer = c("edges", "nodes"))
g |
An osm_graph. |
path |
Output file path. |
layer |
Which layer to write: |
path, invisibly.
g <- example_osm_graph()
ox_to_geojson(g, tempfile(fileext = ".geojson"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.