[GRASS-dev] [GRASS GIS] #184: v.in.garmin - detect gpstrans or gardump instead of user flag

#184: v.in.garmin - detect gpstrans or gardump instead of user flag
-------------------------+--------------------------------------------------
Reporter: kyngchaos | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Keywords: v.in.garmin |
-------------------------+--------------------------------------------------
v.in.garmin uses a flag for the user to specify whther to use gardump as
an alternate to the default gpstrans to get data from the GPS. This
requires the user to know which is installed in their system, or bundled
with a binary distribution of GRASS. This can also confuse the user if
gardump is installed (whether they realize it or not) and they don't use
the flag, then v.in.garmin tells them that gpstrans is not installed.
Something like:

{{{
if [ "`type -t gpstrans`" ] ; then
         USE_GPSTRANS=1
else
     if [ "`type -t gardump`" ] ; then
         USE_GARDUMP=1
     else
             g.message -e "either gpstrans or gardump is required, install
one first\
             http://gpstrans.sourceforge.net\
             http://www.snafu.org"
         exit 1
     fi
fi
}}}

Then test for USE_GPSTRANS or USE_GARDUMP later in the script for which to
use.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/184&gt;
GRASS GIS <http://grass.osgeo.org>

#184: v.in.garmin - detect gpstrans or gardump instead of user flag
--------------------------+-------------------------------------------------
  Reporter: kyngchaos | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Resolution: | Keywords: v.in.garmin
--------------------------+-------------------------------------------------
Changes (by hamish):

  * type: defect => enhancement

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/184#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#184: v.in.garmin - detect gpstrans or gardump instead of user flag
--------------------------+-------------------------------------------------
  Reporter: kyngchaos | Owner: hamish
      Type: enhancement | Status: assigned
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Resolution: | Keywords: v.in.garmin
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => hamish
* cc: grass-dev@lists.osgeo.org (added)

Comment:

On reflection I think the flag is better. Of course we can improve the
error message to suggest using the flag if the download program isn't
found.

The two programs (and gpsbabel too for that matter) are not direct
equivalents. Each one has its own strengths WRT attribute handling on
different garmin models (usually WRT waypoint metadata fields).

I have both gardump and gpstrans installed, so hardcoding the script to
run the first one it finds removes my ability to choose. Adding some sort
of environment variable to override that hardcoding is a regression from
the current situation IMO.

I don't consider it such a bad thing that the user know what 3rd party
programs they have installed and are running.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/184#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#184: v.in.garmin - detect gpstrans or gardump instead of user flag
--------------------------+-------------------------------------------------
  Reporter: kyngchaos | Owner: hamish
      Type: enhancement | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0
Resolution: wontfix | Keywords: v.in.garmin
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: assigned => closed
  * platform: => Unspecified
  * resolution: => wontfix
  * cpu: => Unspecified

Comment:

closing bug as "won't fix" for reasons stated earlier in the bug report.

Hamish

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