#349: v.out.gpsbabel
---------------------------------+------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Keywords: gpsbabel gpx export | Platform: All
Cpu: All |
---------------------------------+------------------------------------------
Hi,
It would be nice to have a v.out.gpsbabel module which could export grass
vector maps as, e.g., GPX waypoints, tracks, and routes.
Perhaps a good approach would be to write & submit to the gpsbabel project
a new filter to handle I/O of the GRASS ASCII vector format.
That would also help simplify v.in.gpsbabel, which is needed.
#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Resolution: | Keywords: gpsbabel gpx export
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by jachym):
IMHO, this can be done via GDAL. GDAL has support for GPX (KML maybe
better) output, where gpsbabel is able to read the data and convert them
to GPS formats. It is fast enough and does not requiere aditional
dependance. Then v.out.gpsbabel would only be wrapper script for v.out.ogr
&& gpsbabel.
#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Resolution: | Keywords: gpsbabel gpx export
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by neteler):
ogr2ogr with GRASS plugin seems to do something for GPX:
{{{
ogr2ogr -f "GPX" /tmp/roads.gpx
/home/neteler/grassdata/latlong/PERMANENT/vector/roads/head
Warning 1: GRASS warning: GISBASE enviroment variable was not set, using:
/home/neteler/grass64/dist.x86_64-unknown-linux-gnu
ERROR 6: Field of name 'cat' is not supported in GPX schema. Use
GPX_USE_EXTENSIONS creation option to allow use of the <extensions>
element.
ERROR 6: Field of name 'FNODE_' is not supported in GPX schema. Use
GPX_USE_EXTENSIONS creation option to allow use of the <extensions>
element.
ERROR 6: Field of name 'TNODE_' is not supported in GPX schema. Use
GPX_USE_EXTENSIONS creation option to allow use of the <extensions>
element.
ERROR 6: Field of name 'LPOLY_' is not supported in GPX schema. Use
GPX_USE_EXTENSIONS creation option to allow use of the <extensions>
element.
...
#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Resolution: | Keywords: gpsbabel gpx export
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):
Replying to [comment:1 jachym]:
> IMHO, this can be done via GDAL. GDAL has support for GPX (KML maybe
better) output, where gpsbabel is able to read the data and convert them
to GPS formats. It is fast enough and does not requiere aditional
dependance. Then v.out.gpsbabel would only be wrapper script for v.out.ogr
&& gpsbabel.
Great idea. This is pretty obviously the way to go; the (read/write) above
hints that it could be a base for rewriting v.in.gpsbabel as well.
Currently we parse XML ourselves in a shell script for that.
I feel the same for using GDAL tools to download WMS & tiling for
r.in.wms, but there we still need to download and parse XML in python for
the feature list.
v.out.gpsbabel is now in SVN, but not activated. I used v.out.ogr, not
ogr2ogr.
{{{
TODO: check if we are already in ll/WGS84. If so skip m.proj step.
TODO: multi layer will probably fail badly due to sed 's/^ 1 /'
TODO: v.out.ogr: cat ID is being reported as evelation
TODO: v.out.ogr: fix attribute <extensions>. ogr2ogr -sql to rename
columns? And generally fill in as much metadata as we can manage.
}}}
Markus:
> ogr2ogr
v.out.ogr can create GPX directly, no need for ogr2ogr.
> I didn't check what GPX_USE_EXTENSIONS does
it adds column attributes as <extensions> metadata fields in the GPX file.
Unfortunately I can't get it to work. Perhaps column names need to be
renamed to "foo_colname" etc, but then what ogr2ogr format to use to avoid
the DBF 10 char problem?
#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Resolution: | Keywords: gpsbabel gpx export
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):
> Perhaps a good approach would be to write & submit to the gpsbabel
> project a new filter to handle I/O of the GRASS ASCII vector
> format. That would also help simplify v.in.gpsbabel, which is
> needed.
#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: unspecified
Resolution: | Keywords: gpsbabel gpx export
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):
Just to note that v.out.gps[babel] is pretty much ready to go in SVN, it
just waits on bug #354 being fixed before activation. (v.out.ogr column
number assumptions)
The side project of writing a GRASS vector ascii format i/o filter for
gpsbabel waits on a volunteer.