- # gpx = OSM::GPXImporter.new('/tmp/2.gpx')
- # gpx.points do |point|
- # puts point['latitude']
- # end
-
- Notifier::deliver_gpx_success(trace)
- rescue
- Notifier::deliver_gpx_failure(trace)
+ if gpx.actual_points > 0
+ Notifier::deliver_gpx_success(trace, gpx.actual_points)
+ else
+ trace.destroy
+ Notifier::deliver_gpx_failure(trace, '0 points parsed ok. Do they all have lat,lng,alt,timestamp?')