Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TWL files are downloaded empty #689

Closed
hagai-lvi opened this issue Apr 24, 2018 · 7 comments
Closed

TWL files are downloaded empty #689

hagai-lvi opened this issue Apr 24, 2018 · 7 comments
Assignees
Labels
bug Low Nice to have or feature or a very edge case bug

Comments

@hagai-lvi
Copy link

Bug

What I expect to happen

When I download a TWL, I expect it to work

What really happened

I get a file with 0 bytes, that I can't open

What I did that caused the issue - step by step

  1. Create a route
  2. Click save as
  3. select twl

My environment

  • Operating System and version: macOS 10.13.1
  • Web Browser and version: Google chrome Version 65.0.3325.181 (Official Build) (64-bit)

Thing I think the developers should know, images, links etc.

Link to the route I couldn't download:
https://israelhiking.osm.org.il/#!/?s=oxIsxvfVVj

I've also tried with a simple route with 2 points

I have originally saw the bug in a discussion in jeepolog.com:
http://www.jeepolog.com/forums/showthread.php/107954-%D7%94%D7%9E%D7%A8%D7%AA-%D7%A7%D7%91%D7%A6%D7%99%D7%9D?p=789862#post789862

@HarelM
Copy link
Member

HarelM commented Apr 24, 2018

As a rule, I wouldn't recommend trying to convert to twl. it's a very old format that doesn't support most of what exists today.
Having said that, we are using GPSBabel to covert data from one type to the other.
The way GPSBabel works is that it will convert TWL to way points and the other way around.
So in order to create a TWL file you need to create way points (markers) and not use the regular route planning.
See here:
https://www.gpsbabel.org/htmldoc-development/fmt_naviguide.html

I'm not sure this is a bug, but rather a limitation of the TWL format.

@hagai-lvi
Copy link
Author

Thanks Harel
any chance it didn't always work like this? for some reason I remember myself downloading a twl that I made from a route, and not waypoints, but maybe I'm wrong.

Either way, maybe it is worth considering telling it to the user when he is trying to download a twl, if there is a route and not only waypoints, or better, to convert (somehow) a route to waypoints?

Today as a user, I have no way to understand what you've just told me from the map...

@HarelM
Copy link
Member

HarelM commented Apr 24, 2018

I don't think it ever worked differently, but I agree the user experience is not ideal.
To be honest, I'm not sure why anyone would still use this format. I tend to think it will be better just to remove it from the save-as list and allow only to open this type of file.
I'll keep it open until we decide what to do with this.
Thanks for reporting the issue!

@HarelM HarelM added bug enhancement Low Nice to have or feature or a very edge case bug labels Apr 24, 2018
@zstadler
Copy link
Member

@hagai-lvi,
Thanks for the report. It definitely worked in the past.

As far as I understand, the site generates gpx files containing tracks and waypoints while GPSBabel can only convert gpx routes to Naviguide (twl) files. Since the input gpx file does not contain any route, the output twl file is empty. Luckily, gpsbabel is able to transform the track into a route given the -x transform,rte=trk parameter.

@HarelM,
I could not locate the gpsbabel invocation code in the repository, so I was unable to test the proposed fix.

@HarelM
Copy link
Member

HarelM commented Apr 24, 2018

@zstadler
Copy link
Member

It seems like the GpsBabel interface is accepting only input and output formats, which are determined by the file type.

To solve this issue, if the output format is Naviguide (twl) then either the input to GPSBabel sould be a route gpx file, or the above conversion parameter should be added. Neither approach seems to comply with the existing GpsBabel interface. If indeed the interface needs to change, it seems like the ability to add conversion parameters is a more general approach.

@HarelM
Copy link
Member

HarelM commented Apr 25, 2018

I agree the interface may need to change, but you can also use the flag just after the format. i.e in:

public const string TWL_BABEL_FORMAT = "naviguide";

TWL_BABEL_FORMAT = "naviguide -x transform,rte=trk"
It's a hack, but doesn't require interface change and it currently only applies to twl.

zstadler added a commit to IsraelHikingMap/gpsbabel that referenced this issue Apr 30, 2018
Following GPSBabel#81 and IsraelHikingMap/Site#689

Add option for specifying the input data type when writing a Naviguide file.
zstadler added a commit that referenced this issue May 1, 2018
@HarelM HarelM self-assigned this May 3, 2018
@HarelM HarelM added this to Waiting for release in IHM Kanban May 3, 2018
HarelM added a commit that referenced this issue May 3, 2018
@HarelM HarelM removed this from Waiting for release in IHM Kanban May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Low Nice to have or feature or a very edge case bug
Projects
None yet
Development

No branches or pull requests

3 participants