As far as I know, there is no standard library, interface, or even a set of established best practices when it comes to storing / processing / processing route data. We put a lot of effort into these issues in Ride with GPS, and I know that the same thing can be said on other sites that solve related problems. I wish there was a standard, and I would like to work with someone on one.
GPX is fine and seems standard ... at least until you start processing GPX files and find that each one simultaneously adds its own custom extensions to a format for processing data such as heart rate, speed power etc. In addition, there is no standard way to associate a waypoint with a track point. Your "bread path" of the route is represented as a series of trkpt elements, and course points (for example, "turn left onto 4th street") are presented in a separate rtept series of elements. Ideally, you want to associate a given course point with a specific track point, and not just point the course point to latitude and longitude. If your path makes several cycles along the same streets, it may introduce some ambiguity in where the course points should be attached along the route.
The KML and Garmin TCX format is similar to the GPX with its pros and cons. After all, these formats only serve to transfer data between programs. They do not consider how to present data in your program, or what types of operations can be performed on data.
We save our track data as an array of objects with keys corresponding to various attributes, such as latitude, longitude, height, time from the beginning, distance from the beginning, speed, heart rate, etc. In addition, we store some metadata along the route to indicate the details of each section. When analyzing our array of track points, we use this metadata to divide the route into a series of segments. Segments can be divided, combined, deleted, attached, reversed, etc. They also encapsulate the method of generating trackpoints, whether by interpolating points along a straight line or by querying a path representing directions between endpoints. These methods make it easy to implement drag / drop editing and other general manipulations. You can use the Route object to handle operations with multiple segments. For example, if you have a route consisting of segments — some directions of movement, straight lines, walking routes, whatever — and want to change the route. You can ask each segment to cancel itself, saving its settings in the process. At a higher level, we use the Map class to connect the interface, send commands to the Route, and save a series of snapshots or transition functions that are updated properly to intelligently support cancellation / redo.
Manual manipulation and generation is one of the goals. Others aggregate summary statistics, structuring data for effective visualization / interaction. To some extent, these problems have been solved by any system that will receive data and create a linear graph. This is not a completely new territory. One interesting characteristic of route data is that you will often have two variables that you can choose for the x axis: time from start and distance from start. Both monotonously increase, and both offer a useful but different interpretation of the data. Looking at the height graph with the x-axis of the distance, you will see that the bike path rises and falls along the hill as symmetrical. Using the x axis of time, the lift height is much wider. It is not only about visualizing the data on the chart, but also about the decisions that you make when processing the data into summary statistics. Some weighted average values make sense based on time, some on distance. The operations that you ultimately want are the minimum, maximum, weighted (depending on your choice of the independent var) average, the ability to filter points and perform min / max / avg filtering (use only those points at which you moved, ignore emissions, etc.), various smoothing functions (for example, to calculate the overall increase in altitude), the basic concept of map / reduction functionality (how much time I spent between 20-30 mph, etc.) and fixed moving averages which are associated with some inter by polarity. The latter is necessary if you want to determine your fastest 10 minutes or 10 minutes of the highest average heart rate, etc. Finally, you will need a simple and effective way to perform any calculations that you perform on a subset of your trackpoints.
Here you can see an example of all this in action if you are interested: http://ridewithgps.com/trips/964148
The chart below can be flipped, dragged to enlarge. The X axis has a link for switching between distance / time. On the left side panel below you will see the best 30 and 60 second efforts - this is done with fixed moving averages with interpolation. In the right sidebar, click the Metrics tab. Drag-select to enlarge in the section on the graph, and you will see all updates of indicators to reflect your choice.
We are happy to answer any questions or work with someone on some standard or open implementation of some of these ideas.
This is probably not quite the answer you were looking for, but thought that I would suggest some details on how we do something in Ride with GPS, since we don’t know any real standards, as you seem to are looking for.
Thanks!