GPX and writeOGR

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GPX and writeOGR

Patrick Giraudoux
Dear listers,

I am struggling with writeOGR (package rgdal) to make it write a gpx
file. Among other trials, I am stuck with this (dbposWGS84 is a
SpatialPointsDataFrame with three attribute fields):

writeOGR(dbposWGS84,"dbposWGS84","waypoints","GPX") Error in
writeOGR(dbposWGS84, "dbposWGS84", "waypoints", "GPX") : Creating Name
field failed


Any idea about what is going wrong ?

Patrick



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: GPX and writeOGR

Roger Bivand
Administrator
On Wed, 19 Aug 2015, Patrick Giraudoux wrote:

> Dear listers,
>
> I am struggling with writeOGR (package rgdal) to make it write a gpx
> file. Among other trials, I am stuck with this (dbposWGS84 is a
> SpatialPointsDataFrame with three attribute fields):
>
> writeOGR(dbposWGS84,"dbposWGS84","waypoints","GPX") Error in
> writeOGR(dbposWGS84, "dbposWGS84", "waypoints", "GPX") : Creating Name
> field failed
>
>
> Any idea about what is going wrong ?

You need the dataset_options="GPX_USE_EXTENSIONS=YES" argument, see:

http://www.gdal.org/drv_gpx.html

Roger

>
> Patrick
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: [hidden email]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway