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

Exception when calculating border coordinates #7

Closed
roelderickx opened this issue Feb 4, 2022 · 1 comment
Closed

Exception when calculating border coordinates #7

roelderickx opened this issue Feb 4, 2022 · 1 comment
Assignees
Labels

Comments

@roelderickx
Copy link
Owner

As reported by @hspitzer in the comments on commit ef33f07:

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

Reading file render_osm/data/GPX_all.gpx
Found track HRP
=> new track 0
Found track GR10
=> new track 1
Found track GR11
=> new track 2
Generating waypoints for track 0: -1.773994,43.373254 - 3.129561,42.481879
Total track distance: 741.91 km
Generating waypoints for track 1: -1.77406,43.373138 - 3.129097,42.482052
Total track distance: 892.09 km
Generating waypoints for track 2: -1.792386,43.393209 - 3.321879,42.319296
Total track distance: 818.52 km
Too many tracks to calculate all track permutations
Traceback (most recent call last):
  File "/Users/hannah.spitzer/opt/miniconda3/envs/hrp/bin/hikingmap", line 33, in <module>
    sys.exit(load_entry_point('hikingmap', 'console_scripts', 'hikingmap')())
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/hikingmap.py", line 74, in main
    trackfinder.calculate_pages(tracks)
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/trackfinder.py", line 80, in calculate_pages
    prev_coord = self.__add_point(prev_coord, coord)
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/trackfinder.py", line 101, in __add_point
    prev_coord = self.__add_next_point(prev_coord, coord)
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/trackfinder.py", line 137, in __add_next_point
    self.__currentpage.add_next_point(border_coord)
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/page.py", line 133, in add_next_point
    self.__add_point_to_track_area(coord)
  File "/Users/hannah.spitzer/projects/personal/render_osm/hikingmap/hikingmap/page.py", line 99, in __add_point_to_track_area
    if coord.lon < self.track_area.minlon:
AttributeError: 'NoneType' object has no attribute 'lon'
Removing temp file /var/folders/s9/0d6yy20d44v60qd0nfkjlqdd541mvv/T/hikingmap_temp_waypointsmue94igj.gpx
@roelderickx
Copy link
Owner Author

Fixed and merged into the main branch

roelderickx referenced this issue in hspitzer/hikingmap Feb 4, 2022
@roelderickx roelderickx self-assigned this Feb 6, 2022
@roelderickx roelderickx added the bug label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant