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
Route import generates error #19
Comments
Hi, You're right, routes should be defined ahead of time. Will look at fixing that. Odd that you've had to explicitly suppress those - obviously they're missing from your file, but as of GPXIN-16 it should auto-detect and suppress speed. I'm guessing the way I implemented it doesn't get applied to routes. Will take a look at it (thanks for providing an example file, makes life much easier). They won't be in the project mirror quite yet, but have raised the following to track |
Hi,
So, importing a track was working back but I had issues with the import of a route. Here are some quick fix that I did in order to make everthing working fine:
You can see that I added isset and isempty... This is just a patch but that might give you some hint about making everthing working fine including "speed" and "date"... BTW, you should hamonize "ele" vs "elevation" for a track point. A route is "ele" and a track is "elevation". My guess is that "ele" would be better for both as you us "lat" and "lon" for coordinates. Thanks. |
Hi, Yup thats more or less along the lines of the fix I was thinking about. I may also split the suppression out into being grouped by type (i.e. route vs track) so that if auto suppress fires on one it won't affect the other. Will take a look at this when I have some time, which should hopefully be within the next couple of days. I think you're right about ele vs elevation, I'll likely look at changing that too to keep things consistent. If you want, I'm happy to merge a pull with the changes you've made in the meantime? |
#19) to prevent WARNING level entries Test case is fairly simple: {noformat} <?php error_reporting(E_ALL); ini_set('display_errors','On'); require 'src/GPXIngest/GPXIngest.php'; $gpx = new GPXIngest\GPXIngest; $gpx->loadFile('gpx-ingest-pb.gpx'); {noformat} Where gpx-ingest-pb is a GPX file that makes use of rte points (see #19 for an example)
…d and only fire if some tracks have been processed This prevents the fatal error from occurring. There may be other edge cases that can still trigger errors though, so more testing is needed
Hi, So as I had a bit of time free and haven't touched this project in ages, I've been catching up on the backlog of issues in JIRA. If you want to give the master branch a try, you should find this issue is resolved. I've added some route related stats GPXIN-33, as well as methods to get the route data - https://www.bentasker.co.uk/documentation/development-programming/222-php-gpx-ingest#routes (might need to wait for the CDN caches to update) As your GPX file seemed to be about a marathon, I figured elevation stats might be useful (where the data's available) so you can see how knackering a given route might actually be (i.e. is it mostly uphill?) |
Hi,
Route import generates error. Adding this line fix the problem:
$this->journey->related->routes = new \stdClass();
See attached file.
Moreover, in order to make this file work, I had to add thoses lines before ingesting the file:
gpx-ingest-pb.zip
Thanks
The text was updated successfully, but these errors were encountered: