remisalmon / Strava-local-heatmap

Python script to generate a high resolution heatmap from Strava GPX files
https://git.io/fjXTL
MIT License
157 stars 34 forks source link

ERROR during import of DJI flight logs #15

Closed buhln closed 2 years ago

buhln commented 2 years ago

First: Great tool and thank you for your effort!

By importing GPX-tracks from my DJI drone I get in some trouble.

RuntimeWarning: invalid value encountered in true_divide
  data = (data-data.min())/(data.max()-data.min()) # normalize to [0,1]

The heatmap is saved but without any tracks. I pinpointed the error to line 239f. It looks like the data array is not correctly assigned.

    for i, j in ij_data:
        data[i-sigma_pixel:i+sigma_pixel, j-sigma_pixel:j+sigma_pixel] += 1.0

At the end the data array contains only zeros.

I uploaded the gpx track here for debugging (just rename it to *.gpx): DJIFlightRecord_2022-02-09_16-07-50.txt

I am ready to support, but at the moment I am not able to find the problem. ;-) Thanks in advance. nico

remisalmon commented 2 years ago

Should be fixed with that last commit, feel free to re-open if you still see this issue.