[GRASS-dev] Re: [GRASS GIS] #349: v.out.gpsbabel

GRASS GIS trac at osgeo.org
Thu Oct 30 07:49:26 EDT 2008


#349: v.out.gpsbabel
--------------------------+-------------------------------------------------
  Reporter:  hamish       |       Owner:  grass-dev at 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.

 {{{
 $ ogrinfo --formats | grep -i gpx
   -> "GPX" (read/write)
 }}}

 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?


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/349#comment:3>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list