% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write_gpx.R
\name{write_gpx}
\alias{write_gpx}
\title{Function to export geometries as a GPX file.}
\usage{
write_gpx(sp, file, force = TRUE)
}
\arguments{
\item{sp}{Spatial object.}

\item{file}{File name of GPX file.}

\item{force}{Should the projection be forced to WGS84? Default is \code{TRUE}
because this is the standard for GPX files.}
}
\value{
Invisible.
}
\description{
\code{write_gpx} uses \code{rgdal::writeOGR} as the GPX writer. GPX files do 
not support polygons, therefore polygon geometries will be coerced to lines.
}
\examples{
\dontrun{

# Export a GPX file containing points
write_gpx(sp_bus_stations, "~/Desktop/bus_stations.gpx")

# Export GPX file which contains a track
write_gpx(sp_gpx_track, "~/Desktop/drive_to_bath.gpx")

}

}
\author{
Stuart K. Grange
}
