howto: creare p.o.i. (ov2) per tomtom con linux

 

In riferimento al post "howto: punti di interesse per tom tom in php", come posso creare un file P.O.I ( .ov2 ) con linux?

Una volta creato il file di testo (asc) contenente i campi "longitudine","latitudine","nome" posso anche generare il file ov2: per windows esiste il comando MAKEOV2.EXE.

Lo stesso risultato può essere ottenuto anche in linux grazie a gpsbabel .

apt-get install gpsbabel

Questa è la guida di riferimento per raggiungere l'obiettivo: purtroppo non è molto chiara e quindi do il mio contributo con un esempio.

Ammettiamo che il file di input sia poi_list.asc e che il file di output sia poi_list.ov2. tomtom.style è un file ma che vediamo dopo.

poi_list.asc contiene un punto di interesse per riga:

9.03544, 45.81278, "2V.SRL. Cavallasca"

il comando per ottenere il file ov2 è:

gpsbabel -i xcsv,style=tomtom.style -f poi_list.asc -o tomtom -F poi_list.ov2

importante!!!: il -F alla fine DEVE essere scritto in maiuscolo!

Il file tomtom.style non è disponibile sul sito di gpsbabel, quindi l'ho scritto io studiandomi la documentazione e rompendo l'anima a quelli della mailing list.

il contenuto del file tomtom.style è il seguente:

# gpsbabel XCSV style file
# Format: tomtom asc
# Author: Damiano Venturin
#   Date: 09/11/2007
#
DESCRIPTION  TomTom Navigator Poi (.asc)
EXTENSION               asc
#
# FILE LAYOUT DEFINITIIONS:
#
FIELD_DELIMITER COMMA
RECORD_DELIMITER NEWLINE
BADCHARS ,|
#
# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
#
IFIELD LON_DECIMAL,”",”%f”
IFIELD LAT_DECIMAL,”",”%f”
IFIELD DESCRIPTION,”",”%s”

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
4 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.