Tomtom .itn file creation

View: New views
2 Messages — Rating Filter:   Alert me  

Tomtom .itn file creation

by Nigel Cross :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HI!

I've been writing a front-end to GPSBabel to convert files of my  
creation into others.

As I am based in UK where most people use tomtom I've been trying to  
convert a csv file to itn file.

Firstly, on a Windows XP64 OS I used GPSBabel 1.3.4 through  
GPSBabelGUI-2 and used the transform filter to convert the waypoint to  
a route.
        This appeared to work but when trying to see this on a Tomtom GO and  
also via TYRE and through Tomtom Home I only saw the first waypoint.

Secondly, I tried the new beta 1.3.7 but this only created an empty  
file!!!

Thirdly, I tried GPSBabel+ on my MacPro under 10.6.1 and GPSBabel  
1.3.6. I transferred the resulting file to TYRE under Windows and it  
worked.

I've subsequently used a hex editor to analyse the output itn files of  
the various runs and found the following :

        1. The output from TYRE (as used by Tomtom) contains NO hex 0D  
characters (ie CR) but terminates each line with a pipe hex 7C and  
newline (or LF) hex 0A.

        2. Output from Windows GPSBabel terminates with no pipe but CR CR LF  
ie 0D 0D 0A - this does not work.

        3. Output from Mac GPSBabel terminates with no pipe but CR LF ie 0D  
0A - this works!

        4. As a test I edited the hex to remove the 0D 0D from the output in  
2 and this worked too.

I hope this will help in creating more accurate Tomtom files as this  
is highly necessary for my application to work in UK.

Many thanks

Picrosso


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

Re: Tomtom .itn file creation

by Robert Lipe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Tue, Oct 6, 2009 at 9:26 AM, Nigel Cross <nigel@...> wrote:
HI!

I've been writing a front-end to GPSBabel to convert files of my
creation into others.

Interesting.   Remember to consider licensing issues.

As I am based in UK where most people use tomtom I've been trying to
convert a csv file to itn file.

Firstly, on a Windows XP64 OS I used GPSBabel 1.3.4 through
GPSBabelGUI-2 and used the transform filter to convert the waypoint to
a route.
       This appeared to work but when trying to see this on a Tomtom GO and
also via TYRE and through Tomtom Home I only saw the first waypoint.

Secondly, I tried the new beta 1.3.7 but this only created an empty
file!!!

Thirdly, I tried GPSBabel+ on my MacPro under 10.6.1 and GPSBabel
1.3.6. I transferred the resulting file to TYRE under Windows and it
worked.

I've subsequently used a hex editor to analyse the output itn files of
the various runs and found the following :

       1.      The output from TYRE (as used by Tomtom) contains NO hex 0D
characters (ie CR) but terminates each line with a pipe hex 7C and
newline (or LF) hex 0A.

       2.      Output from Windows GPSBabel terminates with no pipe but CR CR LF
ie 0D 0D 0A - this does not work.

       3.      Output from Mac GPSBabel terminates with no pipe but CR LF ie 0D
0A - this works!

       4.      As a test I edited the hex to remove the 0D 0D from the output in
2 and this worked too.

I hope this will help in creating more accurate Tomtom files as this
is highly necessary for my application to work in UK.


What a tangly bugreport.  Multiple versions and multiples OSes make this pretty hard to pick through.  So instead of giving you a fish, I'm going teach you to fish. :-)

The tomtom_itn format is one of 34 formats we ship that are built using our style scheme described at http://www.gpsbabel.org/htmldoc-development/Styles.html   As you can see, a simple text file describes what we think is in that file.  

You can find the file we use in the source tree (or online at http://gpsbabel.cvs.sourceforge.net/viewvc/gpsbabel/gpsbabel/style/tomtom_itn.style?view=markup) and you can make changes in it and tell GPSBabel to use  your new description.

I think you're saying that there's now an extra field at the end of each line that's blank in all your data.  That's where the extra pipe is coming from   If you're sure that older versions of the TomTom software won't choke on it, just add

IFIELD    CONSTANT, "", "%s"

to the end of the file to get that extra pipe.

The newline thing is a little trickier given the different definitions of "newline" on the UNIX and DOS lineage OSes.  We've generally tried to lean toward native definition of "newline" which does mean when we write, say, a CSV file on a Mac or Linux system we write 0x0d and when we write the "same" file on Windows, we let the OS spit that as 0x0d 0x0a.   In practical terms, such formats tend to be pretty liberal with what they accept and writing such files across OSes is rare, so this rarely matters to us.

As you can now see, the author of our tomtom_itn module described the line spacer as CRNEWLINE which gets internally expanded to "\r\n"

So I think you're saying that this formats use of CRNEWLINE is inappropriate and NEWLINE would be better.

Please tweak the style file to verify your changes on both OSes and with earlier version of TomTom Itenerary to insure the changes are compatible.   Send us the new version and we'll drop it in.

Thanx,
RJL

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
Gpsbabel-misc@...
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc