I built a simple website that displays the altitude profile for four different example routes. But you can already get the altitude profile for any route in Australia through an XML-RPC request to:
And then call one of the following two functions:
altitude_profile(route) : returns an xml document
altitude_profile_gchart(route) : returns a Google Chart like the one on the left.
The route argument has to look like this:
<route> <point id="1" lat="61.8083953857422" lon="10.8497076034546" /> <point id="2" lat="61.9000000000000" lon="10.8600000000000" /> <point id="3" lat="61.9000000000000" lon="10.8800000000000" /> </route>
Please be nice to my home computer and if you find any security issues, please tell me.
So what shall I focus on next?
There’s the actual profile:
- interpolation : when two points in a route are far apart, add extra points between them
- better altitude estimation : currently I get the altitude from the nearest SRTM data point; I will combine information from multiple points
I hope that with these changes the profiles will look a bit more smooth.
- generate lots of example routes; I created these four routes manually. I would probably need to find a way to automatically extract a whole bunch of routes from the Google route planner or something similar.
- stress test with these routes; I want to get some idea of what kind of hardware & bandwidth requirements are involved.
- I would really like to get my hands on the Google Apps Engine as that would outsource part of the work to Google. Two problems there: I don’t have an API key yet and I would need more storage space then they currently allow; it would be great if I could store the whole planet, but Australia already needs 123 GB.
- Don’t know a lot about that, except that it is very important.
- Something a little more pretty than the Google Chart?
- Add some ‘landmarks’, e.g. place names, road type.
- I’m new to Python, so I want to go over my code and make things a bit nicer: refactoring.
Last but not least, how can this tool best be integrated with other websites? One scenario that I have in mind would be a third party website that uses both the OpenRouteService and my altitude profile application. A user would enter origin and destination. Then the website sends this origin and destination to OpenRouteService (through xml_rpc?), which sends the route back, both as a map figure and as an xml document. Next the website sends this route to the Altitude Profile service (through xml_rpc), which then returns the Google Chart (or an XML document). The website then displays the map and Google Chart for the user to enjoy.
There’s many ways to go from here and although I have plenty of time left for the project, I probably can’t do everything. So what would you like to see next?
Update: More information about my project can be found here.