[GRASS5] [bug #3153] (grass) v.in.garmin waypoint import

this bug's URL: http://intevation.de/rt/webrt?serial_num=3153
-------------------------------------------------------------------------

Subject: v.in.garmin waypoint import

Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.0 release

The waypoint-import works fine for LL-locations.
If a UTM-location is used, there's a problem about the database:

v.in.garmin -v -w out=tafelnX port=/dev/ttyS0
---------snip----------------------------------
Uploading Waypoints
Coordinate format: DDD
Attempting waypoint projection transform with cs2cs
Importing Waypoints...
Maximum input row length: 0
Maximum number of columns: 0
Minimum number of columns: -1
ERROR: x column number > minimum last column number

<tafelnX> columns:
DBMI-DBF driver error:
Table 'tafelnX' doesn't exist

Done.
-----------------------------------------------

Peter

-------------------------------------------- Managed by Request Tracker

this bug's URL: http://intevation.de/rt/webrt?serial_num=3153
---------------------------------------------------------------------

Subject: v.in.garmin waypoint import

Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.0 release

The waypoint-import works fine for LL-locations.
If a UTM-location is used, there's a problem about the database:

v.in.garmin -v -w out=tafelnX port=/dev/ttyS0
---------snip----------------------------------
Uploading Waypoints
Coordinate format: DDD
Attempting waypoint projection transform with cs2cs
Importing Waypoints...
Maximum input row length: 0
Maximum number of columns: 0
Minimum number of columns: -1
ERROR: x column number > minimum last column number

<tafelnX> columns:
DBMI-DBF driver error:
Table 'tafelnX' doesn't exist

Done.

can you try without setting the output= option? then it will send
data to stdout and you can see why v.in.ascii is unhappy.

Maximum input row length: 0

doesn't look like any data is getting there.

You might try commenting out the "rm" line at the end of the file and
then looking at the bits left over in $MAPSET/.tmp/$HOST/ to see how
far the data makes it.

note: known bug (unreleated), db link must be set with db.connect
before using the module; if DBF, then a $MAPSET/dbf/ dir must exist
too? [haven't tested in a while]

Hamish

On Tue, Apr 12, 2005 at 09:00:49PM +1200, Hamish wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=3153
> ---------------------------------------------------------------------

...

note: known bug (unreleated), db link must be set with db.connect
before using the module; if DBF, then a $MAPSET/dbf/ dir must exist
too? [haven't tested in a while]

I tested yesterday: yes, the $MAPSET/dbf/ dir must be created manually.
Let me propose to automate that for dbf... but no idea where.

Markus

> > this bug's URL: http://intevation.de/rt/webrt?serial_num=3153
> > -----------------------------------------------------------------
...
> note: known bug (unreleated), db link must be set with db.connect
> before using the module; if DBF, then a $MAPSET/dbf/ dir must exist
> too? [haven't tested in a while]

I tested yesterday: yes, the $MAPSET/dbf/ dir must be created
manually. Let me propose to automate that for dbf... but no idea
where.

Waypoint mode (or with -p flag) should create/link as needed with
v.in.ascii format=point
as needed (I think..?).

But when the script makes track or route lines with:
v.in.ascii format=standard
it does not create a table; the script creates one by hand with

echo "CREATE TABLE ..." | db.execute

  [this step needs db to be set]

then populate the table it with

echo "INSERT INTO ..." | db.execute

then links with v.db.connect.

So it is hard to see what could be automated to create & link dbf/.

Maybe a test for $MAPSET/dbf and 'db.connect -p' before CREATE TABLE
in the v.in.garmin script is correct after all and no automation?

Hamish