forked from roelderickx/hikingmap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ef33f07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @hspitzer
Interesting bugfix. I'd expect border_coord not to be None if the next point is outside the page. Can you point me to an example gpx track demonstrating this problem?
I noticed some undesirable behaviour a while ago when a track touches the page overlap zone but returns back into the same page again. Hikingmap will create a new page anyway in this case, but I consider that incorrect. I haven't had the time to look into this issue though, but maybe it is the problem you're trying to resolve here?
ef33f07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @roelderickx
I implemented this fix a few months ago while I was using Hikingmap (which is awesome by the way, thanks a lot!) to prepare a large set of maps. I did not look into it too deeply, but I agree, I also would not have expected border_coord to be None, but exactly that happens with the GPX that I was using. I did not really get to the bottom of this once I figured out that with this extra check everything works as expected.
I attach the GPX that throws the error (its actually three tracks combined in one).
I'm running the following command:
hikingmap --pagewidth 28.1 --pageheight 40.4 --pageoverlap 1 --overview --gpx render_osm/data/GPX_all.gpx -- hm_render_maperitive/hm_render_maperitive.py -d 300
output and error traceback without my fix
I'm happy to open an issue on Hikingmap and move the conversation there, but I won't have much time to do actual debugging I'm afraid.
GPX_all.gpx.zip
ef33f07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I see, it is the track from your render_osm project, a very popular route among hikingmap users 😉 Good to see creativity based on my work too, I can only encourage that.
I think the same problem exists between pages 39 and 40. A small section of about 150 meters is not on any map but at that point there is no error. The result is still usable but it shouldn't happen.
![image](https://user-images.githubusercontent.com/33570192/152538786-0194e20c-ffcc-4b1c-a738-bfb65737110a.png)
I'll see if I can free up some time to investigate, but unfortunately there is no easy way to debug this. It may take a while.
ef33f07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to know what the problem was, after half a day I finally found it 🙂 As usual the fix is just 1 character... Issue roelderickx#7 was created which is merged now.
For the gap between the pages I created issue roelderickx#6. I know what the problem is and have a solution, but it is not yet working as expected. I'll keep you up to date in the issue.