Skip to content
Prev 8281 / 29559 Next

writeOGR to GPX file: empty table

Hi!,

I'm converting from shape to gpx through rgdal (I get an empty file with
gpsbabel and, according to its web, I'm not convinced that the shape format
is actually fully supported by gpsbabel).

This is what I do:
OGR data source with driver: ESRI Shapefile
Error in writeOGR(AilantMSY09, dsn =
"/media/TRANSCEND/MONTSENY2008/MONTSENY_GEODATA/FloraExotica2009/AilantMSY09GPX", 
: 
  
	GDAL Error 6: Field of name 'Comentario' is not supported in GPX schema.
Use GPX_USE_EXTENSIONS creation option to allow use of the <extensions>
element.

After reading the gdal-ogr doc, I include dataset_options:
Error in writeOGR(AilantMSY09, dsn =
"/media/TRANSCEND/MONTSENY2008/MONTSENY_GEODATA/FloraExotica2009/AilantMSY09GPX", 
: 
  
	GDAL Error 1: Latitude 4627933.603181 is invalid. Valid range is [-90,90].
This warning will not be issued any more

Which indicates that the user must unproject first (it seems that GPX files
only support lon,lat):
Warning message:
In spTransform(xSP, CRSobj) :
  Only x- and y-coordinates are being transformed
Once in QGIS, the points are in the right sites but the attribute table is
all NULLs

This is not a concern (by now) for me as I just need the gpx file to upload
the points to the gps unit,
but report it just in case this is a bug and/or to know if I'm doing
something wrong.

Note: I do get the correct table for the gpx file using plugin OGR converter
in QGIS.

Thanks

Agus